Commit graph

145347 commits

Author SHA1 Message Date
Robert Pluim
175ebb0104 Don't crash if we can't find a monitor model name
This can happen when running emacs over a forwarded X11 connection.

* src/pgtkfns.c (pgtk_get_monitor_scale_factor): Return 0 if we're
passed a NULL model name.
2021-02-11 17:00:03 +01:00
Yuuki Harano
ef76e64427 Support getting a image from clipboard
* src/pgtkselect.c (Fpgtk_get_selection_internal): Reimplement
referring selection_data_to_lisp_data in xselect.c
(syms_of_pgtkselect): Add symbols.
2021-02-11 19:30:01 +09:00
Yuuki Harano
ed2205a288 Remove unused arg as xmenu.c
* src/pgtkmenu.c (Fx_menu_bar_open_internal): Remove unused arg.
(pgtk_activate_menubar): Remove unused arg.
(set_frame_menubar): Remove unused arg.
(initialize_frame_menubar): Remove unused arg.
2021-02-06 19:19:03 +09:00
Yuuki Harano
afcd13783e Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk 2021-02-06 19:11:51 +09:00
Misha Gusarov
7646793acd Make reading GNOME settings optional.
* src/pgtkterm.c (pgtk_term_init): Make reading GNOME settings optional.
(pgtk_text_scaling_factor): New function to read text scaling factor.

Copyright-paperwork-exempt: yes
2021-02-06 18:54:27 +09:00
Eli Zaretskii
b84b8dff70 Fix copying text properties in 'format'
* src/editfns.c (styled_format): Fix accounting for text
properties that come from the format string.  (Bug#46317)

* test/src/editfns-tests.el (format-properties): Add new tests for
bug#46317.
2021-02-06 11:54:08 +02:00
Stefan Monnier
431b098a20 * lisp/emacs-lisp/pcase.el (let): Reimplement as a pcase macro
(pcase--macroexpand, pcase--u1): Remove handling of `let` from
`pcase`s core.
2021-02-05 15:07:47 -05:00
Eli Zaretskii
a6f23c226e ; * src/xdisp.c (Fwindow_text_pixel_size): Fix comment. 2021-02-05 22:04:15 +02:00
Eli Zaretskii
0484879d3b Fix 'C-d' on the first line in Rmail summary buffer
* lisp/mail/rmailsum.el (rmail-summary-delete-forward): Fix
deleting backward past the beginning of the summary buffer.
(Bug#46325)
2021-02-05 16:27:51 +02:00
Michael Albinus
d5b1deb62e Add command 'dbus-monitor'
* doc/misc/dbus.texi: (Monitoring Messages): Document 'dbus-monitor'.

* etc/NEWS: Mention 'dbus-monitor' but 'dbus-register-monitor'.
Fix typos and other oddities.

* lisp/net/dbus.el (dbus-monitor): New command.

* test/lisp/net/dbus-tests.el (dbus--test-register-service): Extend test.
2021-02-05 14:32:41 +01:00
Lars Ingebrigtsen
a14811fc96 Don't hard-code ignored functions in `indent-according-to-mode'
* lisp/indent.el (indent-line-ignored-functions): New variable
(bug#26945).
(indent-according-to-mode): Use it.
2021-02-05 13:36:06 +01:00
Eli Zaretskii
07ead60a82 ; * src/xdisp.c (Fwindow_text_pixel_size): Another minor fix. 2021-02-05 14:27:46 +02:00
Eli Zaretskii
764db69dd0 Fix last change in 'window-text-pixel-size'
* src/xdisp.c (Fwindow_text_pixel_size): Fix last change: preserve
the original Y coordinate after start_display, instead of zeroing
it out.  Reported by martin rudalics <rudalics@gmx.at>.
2021-02-05 14:24:01 +02:00
Lars Ingebrigtsen
f00afb9bb8 Fontize more automatic variables in makefile-gmake-mode
* lisp/progmodes/make-mode.el (makefile-gmake-font-lock-keywords):
Fontize the $ in more automatic variables (bug#27842).
2021-02-05 13:08:50 +01:00
Lars Ingebrigtsen
9730575f3a Protect against killed buffers in term-emulate-terminal
* lisp/term.el (term-emulate-terminal): Ensure that the buffer is
still alive before selecting it (bug#46323).  This avoids an error
when saying `C-x k' in an ansi-term buffer.
2021-02-05 10:13:23 +01:00
Sean Whitton
7016db933c Fix repeating complex commands
* lisp/repeat.el (repeat): Fix repeating complex commands
(bug#46290).  This makes `M-: date RET C-x z' work again (like in
Emacs 21, apparently).
2021-02-05 10:06:22 +01:00
Lars Ingebrigtsen
f06acf752a Make octave-send-region deactivate the region
* lisp/progmodes/octave.el (octave-send-region): Deactivate mark
after sending the region (bug#32282), since this is how these commands
usually work.
2021-02-05 09:45:49 +01:00
Lars Ingebrigtsen
ff701ce2b2 Correct the lispref manual about flushing ppss info
* doc/lispref/syntax.texi (Syntax Properties): Correct the
information about flushing the state by copying the text from the
doc string (bug#46274).
2021-02-05 09:36:58 +01:00
Stefan Kangas
6bd9dbf959 * lisp/emacs-lisp/checkdoc.el: Doc fix; don't mention built-ins. 2021-02-05 02:52:52 +01:00
Stefan Kangas
de701470b2 Remove some unnecessary references to Emacs 18
* lisp/progmodes/cmacexp.el:
* lisp/progmodes/f90.el:
* lisp/shell.el: Doc fix; don't mention Emacs 18.
2021-02-05 02:27:57 +01:00
Stefan Kangas
620470f0b7 Remove Emacs 19 compat code from dcl-mode.el
* lisp/progmodes/dcl-mode.el: Doc fix.
(dcl-mode-map, dcl-mode): Remove compat code for Emacs 19.
2021-02-05 02:21:50 +01:00
Stefan Kangas
574f71b739 Remove Emacs 20 compat code for header-line-format
* lisp/cedet/semantic/util-modes.el (semantic-stickyfunc-mode):
* lisp/erc/erc.el (erc-update-mode-line-buffer):
* lisp/ibuffer.el (ibuffer-use-header-line): Remove Emacs 20 compat
code; header-line-format is always defined starting with Emacs 21.
2021-02-05 01:33:25 +01:00
Stefan Kangas
1a35d2e673 * lisp/color.el: Remove Emacs 23.2 compat code. 2021-02-05 01:29:20 +01:00
Stefan Kangas
ce1a4cd54c * lisp/textmodes/rst.el (rst-directive): Remove XEmacs compat code. 2021-02-05 01:27:14 +01:00
Stefan Kangas
bbe88cd82e Assume font-lock-mode variable is not void
* lisp/align.el (align-rules-list):
* lisp/cedet/semantic/idle.el
(semantic-idle-summary-useful-context-p):
* lisp/org/org-table.el (org-table-edit-field):
* lisp/org/org.el (org-restart-font-lock):
* lisp/progmodes/antlr-mode.el (antlr-language-option-extra):
* lisp/progmodes/idlwave.el (idlwave-choose):
* lisp/progmodes/sql.el (sql-product-font-lock):
* lisp/progmodes/verilog-mode.el
(verilog-save-font-no-change-functions, verilog-preprocess):
* lisp/vc/cvs-status.el:
* lisp/vc/smerge-mode.el (smerge-mode):
* lisp/woman.el (woman-decode-buffer): Assume font-lock-mode variable
is not void; it is preloaded.
2021-02-05 01:15:02 +01:00
Harald Jörg
a92167674f cperl-mode: eliminate dead code
* lisp/progmodes/cperl-mode.el (cperl-update-syntaxification):
Eliminate check for `syntax-propertize-rules` (always true)
and eliminate unused first parameter.
(cperl-mode): Eliminate obsolete `font-lock-syntactic-keywords`,
Eliminate check for `syntax-propertize-rules` (always true).
(cperl-fontify-syntaxically): Eliminate call to
no-longer-existing function `edebug-backtrace` (bug#46302).
2021-02-04 20:52:29 +01:00
Eli Zaretskii
a2d7f3f171 Avoid overwriting minibuffer prompt by keystrokes echo
* src/lread.c (Fread_char, Fread_event, Fread_char_exclusive):
Call cancel_echoing to make sure the prompt is not obscured by
keystrokes echo.  (Bug#46243)
2021-02-04 19:35:07 +02:00
Lars Ingebrigtsen
3bf21f52b6 Deactivate region in `C-c C-r' in python-mode
* lisp/progmodes/python.el (python-shell-send-region): Deactivate
mark after executing (bug#28789).  This is how this command worked
in Emacs 24, apparently.
2021-02-04 18:24:34 +01:00
Eli Zaretskii
a304b22bc9 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2021-02-04 18:02:27 +02:00
Eli Zaretskii
914cb7a1d6 Fix 'window-text-pixel-size' for short spans of text
* src/xdisp.c (Fwindow_text_pixel_size): Support the use case
where FROM and TO belong to the same screen line.  Reported by
Yuan Fu <casouri@gmail.com>.
2021-02-04 18:00:29 +02:00
Lars Ingebrigtsen
9bf367e184 Improve filling of Emacs Lisp doc strings
* lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): When filling
a Lisp string, try to avoid filling bits that follow it
(bug#28937).
2021-02-04 16:12:41 +01:00
Lars Ingebrigtsen
e1d54bb638 Allow a :variable keyword in define-globalized-minor-mode
* doc/lispref/modes.texi (Defining Minor Modes): Document it.
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Allow specifying a :variable to be used if the underlying mode has
a divergent variable to store the state (bug#29081).
2021-02-04 15:22:40 +01:00
Lars Ingebrigtsen
bd795dd659 Fix previous ibuffer patch
* lisp/ibuffer.el (ibuffer-last-sorting-mode): Restore variable
removed by mistake in previous change.
2021-02-04 14:36:58 +01:00
Lars Ingebrigtsen
d3cb07d784 Make the recency sorting stable when we have inverted sorting
* lisp/ibuffer.el (recency): Remove.
(recency): New macro function so that sorting by recency is
stable when inverted sorting is switched on (bug#30129).
2021-02-04 12:59:16 +01:00
Lars Ingebrigtsen
3b27f2e464 Revert "Tweak how ibuffer-invert-sorting updates the buffer"
This reverts commit b8b3263eab.

This doesn't fix other instances of ibuffer-redisplay
2021-02-04 12:32:08 +01:00
Lars Ingebrigtsen
b8b3263eab Tweak how ibuffer-invert-sorting updates the buffer
* lisp/ibuf-ext.el (ibuffer-invert-sorting): Enable calling this
function repeatedly with more predictable results (bug#30129).
2021-02-04 12:26:00 +01:00
Lars Ingebrigtsen
b12d22f6af Don't ask the user to make a bug report on missing arglists
* lisp/help-fns.el (help-fns--signature): Don't ask the user to
make a bug report (bug#30223) because the symbol may very well be
one that the user has defined themselves.
(help-fns-function-description-header): Ditto.
2021-02-04 12:08:46 +01:00
Lars Ingebrigtsen
859a4cb6b2 Clarify the "Sentinels" node in the lispref manual
* doc/lispref/processes.texi (Sentinels): Mention "run" and that
the strings can be anything (bug#30461).
2021-02-04 12:02:53 +01:00
Lars Ingebrigtsen
828b3d93ec Allow eshell to have an "erasedups"-like history
* lisp/eshell/em-hist.el (eshell-add-input-to-history): Use the
new value (bug#30466).
(eshell-hist-ignoredups): Allow "erasedups"-like value.
2021-02-04 11:55:47 +01:00
Robert Pluim
2f3df36be8 Update description of 'tramp-crypt-remove-directory'
* doc/misc/tramp.texi (Keeping files encrypted): Correct name of
function to use to indicate files should no longer be encrypted,
and update its description.
2021-02-04 11:25:31 +01:00
Lars Ingebrigtsen
517e123f90 Be stricter when going back to the previous node in Info-find-node-2
* lisp/info.el (Info-find-node-2): When going back to the previous
node, be strict (bug#31137) since we have the exact node name.
2021-02-04 11:23:26 +01:00
Juri Linkov
5666955379 * lisp/replace.el (occur-rename-buffer): Check for overlay (bug#46268).
(occur-1): Don't use occur--garbage-collect-revert-args
when reverting the Occur buffer with same bufs.
2021-02-04 11:17:54 +02:00
Lars Ingebrigtsen
a8958640c4 Fix epg filtering out keys that contain revoked IDs
* lisp/epg.el (epg--filter-revoked-keys): Only filter out the
revoked user ids, not the entire key that contains revoked user
ids (bug#46138).
2021-02-04 09:25:32 +01:00
Stefan Kangas
e4cafc5430 Don't set removed variable facemenu-unlisted-faces
* lisp/vc/ediff-init.el (ediff-hide-face): Redefine as obsolete
function alias for 'ignore'; the variable 'facemenu-unlisted-faces'
was removed in Emacs 22.  Remove all calls.

* lisp/mh-e/mh-e.el: Add comment saying that the variable
'facemenu-unlisted-faces' is removed.
2021-02-04 08:16:33 +01:00
Stefan Kangas
b01ee9a114 * lisp/man.el (Man-notify-method): Remove Emacs 19.28 compat code. 2021-02-04 08:12:22 +01:00
Stefan Kangas
7febfe1c2b Use require instead of boundp+load-library in double.el
* lisp/double.el (isearch): Use require instead of
boundp+load-library.
2021-02-04 05:28:00 +01:00
Stefan Kangas
0d8e15757e Remove some unnecessary references to Emacs 19
* lisp/emacs-lisp/elp.el:
* lisp/mouse-copy.el:
* lisp/mouse-drag.el:
* lisp/progmodes/simula.el (simula-mode-map):
* lisp/term.el (term-matching-input-from-input-string):
* lisp/vcursor.el: Doc fix; don't mention Emacs 19.
2021-02-04 05:28:00 +01:00
Stefan Kangas
fd9516238a Remove XEmacs compat code from edebug.el
* lisp/emacs-lisp/edebug.el (edebug-window-live-p, edebug-mark):
Make obsolete.  Update callers.
2021-02-04 05:27:45 +01:00
Dmitry Gutov
c07ebfcbe0 Bind default-directory to the project root
* lisp/progmodes/project.el (project-find-regexp):
Bind default-directory to the project root, to save this value
in the resulting buffer (esp. if the project selector was used,
(https://lists.gnu.org/archive/html/emacs-devel/2021-02/msg00140.html).
(project-or-external-find-regexp): Same.
2021-02-04 03:38:42 +02:00
Michael Albinus
b81516c7fb Tramp code cleanup
* lisp/net/tramp.el (tramp-signal-hook-function)
(tramp-handle-access-file, tramp-handle-copy-directory)
(tramp-handle-directory-files, tramp-handle-file-local-copy)
(tramp-handle-insert-file-contents, tramp-handle-load):
* lisp/net/tramp-adb.el (tramp-adb-handle-directory-files-and-attributes)
(tramp-adb-handle-make-directory)
(tramp-adb-handle-file-local-copy, tramp-adb-handle-copy-file)
(tramp-adb-handle-rename-file):
* lisp/net/tramp-crypt.el (tramp-crypt-do-copy-or-rename-file)
(tramp-crypt-handle-directory-files)
(tramp-crypt-handle-make-directory):
* lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-error)
(tramp-gvfs-do-copy-or-rename-file)
(tramp-gvfs-handle-make-directory):
* lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file)
(tramp-rclone-handle-directory-files):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
(tramp-sh-handle-directory-files-and-attributes)
(tramp-sh-handle-file-name-all-completions)
(tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file)
(tramp-sh-handle-make-directory)
(tramp-sh-handle-file-local-copy)
(tramp-sh-inotifywait-process-filter):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-copy-file, tramp-smb-handle-directory-files)
(tramp-smb-handle-file-local-copy)
(tramp-smb-handle-make-directory, tramp-smb-handle-rename-file):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Unify error report.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler): Sync args
with other `tramp-*-file-name-handler'.

* lisp/net/tramp-compat.el (tramp-error): Declare.
(tramp-compat-file-missing): New defsubst.

* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Handle volatile files.
(tramp-gvfs-set-attribute): New defun.
(tramp-gvfs-handle-set-file-modes)
(tramp-gvfs-handle-set-file-times)
(tramp-gvfs-handle-set-file-uid-gid): Use it.

* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file):
Use `msg-operation'.

* lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
Remove superfluous `format:
(tramp-smb-maybe-open-connection): Simplify loop.

* lisp/net/tramp.el (tramp-handle-file-truename): Drop volume letter from
symlinked files.

* test/lisp/net/tramp-tests.el (tramp--test-gdrive-p): New defun.
(tramp--test-nextcloud-p): Remove.
(tramp-test40-special-characters-with-ls): Do not skip on MS Windows.
(tramp-test41-utf8): Skip if needed.
2021-02-03 18:48:09 +01:00