1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-29 19:48:19 +00:00
Commit Graph

159688 Commits

Author SHA1 Message Date
Michael Albinus
2a4f2ba91a Fix Tramp test
* lisp/net/tramp-compat.el (tramp-compat-rx):
Add `tramp-autoload' function property.
2022-09-12 08:52:08 +02:00
Po Lu
239bad7921 Fix focus restoration upon x_mouse_leave again
* src/xterm.c (x_mouse_leave): Call xi_handle_focus_change after
changing the implicit focus.
2022-09-12 14:01:52 +08:00
Dmitry Gutov
e0f137f079 * lisp/progmodes/xref.el: Bump the version. 2022-09-12 00:45:37 +03:00
Kévin Le Gouguec
d8f392bccd Restrict replace-*-in-region to the bounds defined by caller
* lisp/subr.el (replace-string-in-region, replace-regexp-in-region):
Narrow to region before iterating over matches, instead of giving a
bound to the search functions.
* test/lisp/subr-tests.el (test-replace-string-in-region): Add
regression tests (bug#57733).
2022-09-11 19:55:36 +02:00
Michael Albinus
cba83d9893 Disable Tramp cache for relative file names
* lisp/net/tramp.el (tramp-file-name-unify):
Return `tramp-cache-undefined' if LOCALNAME is a relative file name.

* lisp/net/tramp-cache.el (tramp-get-file-property)
(tramp-set-file-property, tramp-file-property-p)
(tramp-flush-file-property, tramp-flush-file-upper-properties)
(tramp-flush-file-properties): Handle KEY being
`tramp-cache-undefined'.
(tramp-flush-file-function): Revert last change.
2022-09-11 14:53:14 +02:00
Richard Hansen
f47a5324f4 whitespace: Redo BoB/EoB empty line highlighting
* lisp/whitespace.el (whitespace--empty-at-bob-matcher,
whitespace--empty-at-eob-matcher, whitespace--update-bob-eob,
whitespace-color-off, whitespace-color-on,
whitespace-empty-at-bob-regexp, whitespace-empty-at-eob-regexp,
whitespace-looking-back, whitespace-post-command-hook): Redo the
`empty' line highlighting logic to ensure that a buffer change causes
all affected `empty' lines to become (un)highlighted (bug#37467).
Also, for improved UX, don't highlight BoB empty lines at or below
point (not just when point is at 1), or EoB empty lines at or above
point (not just when point is `eobp').
(whitespace-bob-marker, whitespace-eob-marker): Clarify documentation.
* test/lisp/whitespace-tests.el (whitespace--with-test-buffer,
whitespace--fu, whitespace-tests--empty-bob,
whitespace-tests--empty-eob): Add tests.
2022-09-11 13:46:30 +02:00
Richard Hansen
395786f42b whitespace: Include empty final line in BoB empty match
* lisp/whitespace.el (whitespace-empty-at-bob-regexp): Include any
last line trailing whitespace in the BoB empty line match to ensure
that those characters get highlighted.
2022-09-11 13:46:30 +02:00
Richard Hansen
99e8faa725 whitespace: Reset `whitespace-buffer-changed' when refontifying
* lisp/whitespace.el (whitespace-post-command-hook): Add missing reset
of `whitespace-buffer-changed' back to nil between commands.
2022-09-11 13:46:30 +02:00
Richard Hansen
dd02725c57 ; whitespace: Use `defvar-local' for buffer-local vars 2022-09-11 13:46:30 +02:00
Richard Hansen
b6da1e4221 ; whitespace: Delete unused `whitespace-font-lock-refontify' var 2022-09-11 13:46:30 +02:00
Richard Hansen
10573e0db7 ert-x: New `ert-with-test-buffer-selected' convenience macro
* lisp/emacs-lisp/ert-x.el (ert-with-test-buffer-selected): New
convenience macro that extends `ert-with-test-buffer' by displaying
the test buffer in a temporary selected window.  This makes it easier
to simulate user input in the body via `execute-kbd-macro'.
* test/lisp/emacs-lisp/ert-x-tests.el
(ert-test-test-buffer-selected/*): Add tests.
2022-09-11 13:46:30 +02:00
Philip Kaludercic
feffb03a36
Revert "Add new command 'toggle-theme'"
This reverts commit f31b9d86a6.
2022-09-11 13:28:38 +02:00
Philip Kaludercic
3f0944c51f
Revert "Add new user option 'custom-ensure-single-theme'"
This reverts commit b4dbf7184c.
2022-09-11 13:28:36 +02:00
Philip Kaludercic
1c1aaa0ecd
; Use US spelling docstring
* lisp/vc/diff-mode.el (diff-add-log-use-relative-names): Update docstring.
2022-09-11 13:12:39 +02:00
Philip Kaludercic
b4dbf7184c
Add new user option 'custom-ensure-single-theme'
* etc/NEWS: Mention it.
* lisp/custom.el (custom-ensure-single-active-theme): Add it.
(load-theme): Use it.
2022-09-11 13:10:55 +02:00
Philip Kaludercic
f31b9d86a6
Add new command 'toggle-theme'
* doc/emacs/custom.texi (Custom Themes): Mention it.
* etc/themes/leuven-dark-theme.el (leuven-dark): Add dual theme.
* etc/themes/leuven-theme.el (leuven): Add dual theme.
* etc/themes/tango-dark-theme.el (tango-dark): Add dual theme.
* etc/themes/tango-theme.el (tango): Add dual theme.
* etc/themes/tsdh-dark-theme.el (tsdh-dark): Add dual theme.
* etc/themes/tsdh-light-theme.el (tsdh-light): Add dual theme.
* lisp/cus-theme.el (describe-theme-1): Say if a theme has a dual.
* lisp/custom.el (toggle-theme): Add new command.
2022-09-11 13:10:55 +02:00
Miha Rihtaršič
1d08e48020 Improve some shell highlight doc strings
* lisp/shell.el (shell-highlight-undef-mode-restart): Rename function.
* lisp/shell.el (shell-comint-fl-enable):
(shell--highlight-undef-indirect)
* lisp/ielm.el (ielm-comint-fl-enable):
* lisp/comint.el: (comint--fl-fontify-region): Improve doc strings.
2022-09-11 12:59:02 +02:00
Po Lu
a380ce2008 Make it easier to clear the Motif drag window for debugging
* src/xterm.c (xm_get_drag_window_1): Add comment explaining
side effect of x_special_window_exists_p.
(handle_one_xevent): Clear Motif drag window upon DestroyNotify.
In addition to debugging, it also reduces syncs necessary to
communicate via the Motif protocol after a defective/old client
sets the drag window without setting the disconnect mode.
2022-09-11 16:50:26 +08:00
Juri Linkov
8a902013e4 * lisp/vc/vc.el (vc-diff-patch-string): Fix arg in revert-buffer-function. 2022-09-11 11:22:11 +03:00
Sean Whitton
03969ddcac * lisp/vc/vc.el (vc-deduce-backend): Handle eshell-mode. 2022-09-10 23:10:45 -07:00
ookami
4cf9c92e27 Fix project-remember-projects-under when recursing
* lisp/progmodes/project.el (project-remember-projects-under):
Actually recurse into directories (bug#57714).

Copyright-paperwork-exempt: yes
2022-09-10 14:57:48 +02:00
Michael Albinus
b2956a3f09 Ensure, that Tramp cache works over absolute file names
* lisp/net/tramp.el (tramp-skeleton-directory-files)
(tramp-skeleton-directory-files-and-attributes)
(tramp-skeleton-set-file-modes-times-uid-gid)
(tramp-handle-add-name-to-file, tramp-handle-file-exists-p)
(tramp-handle-file-readable-p, tramp-handle-file-writable-p):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-executable-p)
(tramp-adb-handle-file-exists-p)
(tramp-adb-handle-file-readable-p)
(tramp-adb-handle-file-writable-p)
* lisp/net/tramp-gvfs.el (tramp-gvfs-info, tramp-gvfs-handle-delete-file)
(tramp-gvfs-get-directory-attributes)
(tramp-gvfs-get-root-attributes)
(tramp-gvfs-handle-file-executable-p):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
(tramp-sh-handle-file-exists-p)
(tramp-sh-handle-set-visited-file-modtime)
(tramp-sh-handle-file-selinux-context)
(tramp-sh-handle-set-file-selinux-context)
(tramp-sh-handle-file-acl, tramp-sh-handle-file-executable-p)
(tramp-sh-handle-file-readable-p)
(tramp-sh-handle-file-directory-p)
(tramp-sh-handle-file-writable-p)
(tramp-sh-handle-file-ownership-preserved-p)
(tramp-sh-handle-add-name-to-file)
(tramp-sh-handle-copy-directory, tramp-sh-handle-delete-file)
(tramp-sh-handle-dired-compress-file):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-add-name-to-file)
(tramp-sudoedit-handle-delete-file)
(tramp-sudoedit-handle-file-acl)
(tramp-sudoedit-handle-file-executable-p)
(tramp-sudoedit-handle-file-exists-p)
(tramp-sudoedit-handle-file-readable-p)
(tramp-sudoedit-handle-file-selinux-context)
(tramp-sudoedit-handle-file-writable-p)
(tramp-sudoedit-handle-make-symbolic-link)
(tramp-sudoedit-handle-set-file-selinux-context):
Use `expand-file-name'.  (Bug#57572)

* lisp/net/tramp-cache.el (tramp-flush-file-function):
Expand `buffer-file-name'.  (Bug#57676)

* lisp/net/tramp.el (tramp-file-name-unify): Extend error message.

* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link):
* lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-make-symbolic-link):
Do not check remoteness of TARGET anymore.
2022-09-10 13:10:47 +02:00
Po Lu
2a1608a960 Fix compliance with the XDND specification when dropping on a proxy
* src/xterm.c (x_dnd_send_enter, x_dnd_send_position)
(x_dnd_send_leave, x_dnd_send_drop, x_dnd_do_drop): New
parameter `toplevel'.  Use it as the window in sent client
messages.
(x_dnd_cancel_dnd_early, x_dnd_cleanup_drag_and_drop)
(x_dnd_process_quit, x_dnd_update_state, handle_one_xevent)
(x_connection_closed): Give the right toplevel to the client
message sending functions.
2022-09-10 18:51:13 +08:00
Eli Zaretskii
433fc8bebf ; * lisp/minibuffer.el (format-prompt): Doc fix. 2022-09-10 11:48:11 +03:00
Paul Eggert
d22aacd930 Make wdired match dired with symlink permissions
* lisp/wdired.el (wdired-do-perm-changes): Do not follow symlinks,
to be consistent with plain dired (bug#50189).
2022-09-10 08:20:31 +02:00
Lars Ingebrigtsen
3062baf609 Make format-prompt' use substitute-command-keys'
* doc/lispref/minibuf.texi (Text from Minibuffer): Mention it.
* lisp/minibuffer.el (format-prompt): Run through
`substitute-command-keys' (bug#51040).
2022-09-10 08:13:21 +02:00
Lars Ingebrigtsen
0fd24ebc95 Fix diff-mode.el compilation warnings
* lisp/vc/diff-mode.el (diff-auto-refine-mode): Suppress
byte-compile warnings.
2022-09-10 08:01:55 +02:00
Stefan Kangas
6cd9e586cc New function substitute-quotes
* lisp/help.el (substitute-quotes): New function.  (Bug#51040)
* doc/lispref/help.texi (Keys in Documentation): Document
substitute-quotes.
* test/lisp/help-tests.el (help-tests-substitute-quotes): New test.

* lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
* lisp/cus-theme.el (describe-theme-1):
* lisp/emacs-lisp/cl-extra.el (cl--describe-class):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor):
* lisp/emacs-lisp/package.el (describe-package-1):
* lisp/help-fns.el (help-fns--parent-mode, help-fns--var-risky)
(help-fns--var-file-local, help-fns--var-bufferlocal)
(describe-face):
* lisp/help.el (substitute-command-keys):
* lisp/progmodes/octave.el (octave-help): Use the new function
instead of 'substitute-command-keys'.
2022-09-10 07:37:36 +02:00
Stefan Kangas
54c3794899 Doc fixes for 'text-quoting-style'
* doc/lispref/help.texi (Keys in Documentation): Remove duplicate
entry for 'text-quoting-style'.  Document the function with the same
name instead.
* src/doc.c (Ftext_quoting_style): Doc fix: clarify the return values.
(syms_of_doc) <Vtext_quoting_style>: Doc fix: clarify that you should
not read the value of this variable directly; use Ftext_quoting_style
instead (bug#51040).
2022-09-10 07:29:48 +02:00
Lars Ingebrigtsen
ce4f354def Make a flymake.texi code example more resilient
* doc/misc/flymake.texi (An annotated example backend): Make the
example code resilient wrt. narrowed buffers (bug#51437).
2022-09-10 06:52:39 +02:00
Stefan Kangas
72daa8b95a * src/w32image.c (w32_can_use_native_image_api): Fix comment. 2022-09-10 05:30:06 +02:00
Stefan Kangas
1e021ac45b Support outline-minor-mode in emacs-authors-mode
* lisp/textmodes/emacs-authors-mode.el (emacs-authors-mode):
Support and enable outline-minor-mode.
2022-09-10 05:03:58 +02:00
Po Lu
7008fa9fd9 ; * src/alloc.c (check_pure_size): Fix last change. 2022-09-10 09:39:14 +08:00
Po Lu
a1f1072975 Fix several printfs for 32 bit systems
* lib-src/emacsclient.c (main): Use right length modifier when
printing uintmax_t.
* src/alloc.c (check_pure_size): Use right length modifier when
printing ptrdiff_t.
2022-09-10 09:35:49 +08:00
Stefan Kangas
e6dc0cf2d3 * lisp/subr.el (string-split): New alias for split-string. 2022-09-10 01:12:29 +02:00
Stefan Kangas
3ddf1a920d Set vc-git-annotate-switches to "-w" in .dir-locals.el
* .dir-locals.el: Set vc-git-annotate-switches to "-w".
Ref: https://lists.gnu.org/r/emacs-devel/2022-09/msg00453.html
2022-09-10 01:12:29 +02:00
Stefan Kangas
1c1ff3bfd1 Accept "-w" as safe value for vc-git-annotate-switches
* lisp/vc/vc-git.el
(vc-git-annotate-switches-safe-p): New predicate function.
(vc-git-annotate-switches): Use above new predicate function to
check if it's :safe.
2022-09-10 01:12:29 +02:00
Paul Eggert
fa99392618 Fix problem with Glib 2.73.2+ and SIGCHLD handler
This code fix is by Stefan Monnier (Bug#57699).
* src/process.c (init_process_emacs) [HAVE_GLIB && !WINDOWSNT]:
Adjust to Glib 2.73.2 behavior change on Linux kernel 5.3+.
2022-09-09 16:19:49 -05:00
Eli Zaretskii
9189ad4561 ; Fix doc strings in shell.el
* lisp/shell.el (shell-highlight-undef-defined-face)
(shell-highlight-undef-remote-file-name-inhibit-cache)
(shell--highlight-undef-exec-cache): Fix wording and typos.
2022-09-09 22:10:00 +03:00
Miha Rihtaršič
3b105e978c Input indentation for M-x shell
* lisp/comint.el
(comint-indent-input-line):
(comint-indent-input-line-default):
(comint-indent-input-region):
(comint-indent-input-region-default): New functions that implement a
general mechanism for input indentation through an indirect buffer in
comint derived major modes.
* lisp/shell.el (shell-mode): Set up input indentation according to
sh-mode (bug#51940).
2022-09-09 20:13:13 +02:00
Miha Rihtaršič
c7ebe5a798 Highlight non-existent commands in M-x shell
* lisp/shell.el (shell-mode): Enable highlighting of non-existent
commands if requested.
(shell-highlight-undef-aliases):
(shell-highlight-undef-remote-file-name-inhibit-cache): New user
options.
(shell-highlight-undef-mode): New minor mode.
(shell-highlight-undef-defined-face):
(shell-highlight-undef-undefined-face):
(shell-highlight-undef-alias-face): New faces.
(shell-highlight-undef--exec-cache):
(shell-highlight-undef--face):
(shell-highlight-undef-keywords):
(shell-highlight-undef-regexp):
(shell-highlight-undef--executable-find):
(shell-highlight-undef-matcher):
(shell-highlight-undef--indirect):
(shell-highlight--setup):
(shell-highlight-undef-reset-mode): New functions and buffer local
variables (bug#51940).
2022-09-09 20:12:26 +02:00
Miha Rihtaršič
e9ecde5b1d Input fontification for M-x ielm
* lisp/ielm.el (ielm-comint-fl-enable): New user option to control
input fontification.
(ielm-indirect-setup-hook): New hook.
(inferior-emacs-lisp-mode): Set up and enable input fontification.
2022-09-09 20:11:33 +02:00
Miha Rihtaršič
5a8a5e3d57 Input fontification for M-x shell
* lisp/comint.el
(comint-indent-input-line):
(comint-indent-input-line-default):
(comint-indent-input-region):
(comint-indent-input-region-default): New functions that implement a
general mechanism for input indentation through an indirect buffer in
comint derived major modes.
* lisp/shell.el (shell-mode): Set up input indentation according to
sh-mode (bug#51940).
* lisp/comint.el
(comint-indent-input-line):
(comint-indent-input-line-default):
(comint-indent-input-region):
(comint-indent-input-region-default): New functions that implement a
general mechanism for input indentation through an indirect buffer in
comint derived major modes.
* lisp/shell.el (shell-mode): Set up input indentation according to
sh-mode (bug#51940).
2022-09-09 20:10:01 +02:00
Miha Rihtaršič
d278b976d4 Implement a general input fontification mechanism for comint modes
* lisp/comint.el
(comint-indent-input-line):
(comint-indent-input-line-default):
(comint-indent-input-region):
(comint-indent-input-region-default): New functions that implement a
general mechanism for input indentation through an indirect buffer in
comint derived major modes.
* lisp/shell.el (shell-mode): Set up input indentation according to
sh-mode (bug#51940).
2022-09-09 20:08:19 +02:00
Lars Ingebrigtsen
06e4d9cb96 Fix "warn-lambda-malformed-interactive-spec.el" even more
* test/lisp/emacs-lisp/bytecomp-tests.el
("warn-lambda-malformed-interactive-spec.el"): Adjust test further.
2022-09-09 19:43:28 +02:00
Lars Ingebrigtsen
04a6fd378f Don't bind `s' in the normal backtrace map
* lisp/emacs-lisp/backtrace.el (backtrace-mode-map): Don't bind
the "s" command, because it's meaningless outside modes that have
set the backtrace-goto-source-functions variable (and only edebug
does that) (bug#57674).
* lisp/emacs-lisp/edebug.el (edebug-pop-to-backtrace): Use it.
(edebug-backtrace-mode-map, edebug-backtrace-mode): New mode.
2022-09-09 19:29:21 +02:00
Lars Ingebrigtsen
4cc78bcfd1 Update a bytecomp test
* test/lisp/emacs-lisp/bytecomp-tests.el
("warn-lambda-malformed-interactive-spec.el"): Update test to code
change.
2022-09-09 19:18:02 +02:00
Lars Ingebrigtsen
79ae7b3c87 Fix typo in byte-compile-lambda warning
* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Fix typo in
message (bug#57690).
2022-09-09 19:16:01 +02:00
Lars Ingebrigtsen
fc5a421892 Fix --without-x compilation warnings
* lisp/image/image-dired.el (clear-image-cache):
* lisp/image/image-dired-external.el (clear-image-cache): Fix
compilation warning (bug#57695).
2022-09-09 18:09:36 +02:00
Lars Ingebrigtsen
effb5d75a8 Revert "Fix tramp-loaddefs compilation"
This reverts commit 43e9c8e9d2.

The cookie seemed to go to lisp/loaddefs.el for a reason, but a bootstrap is needed.
2022-09-09 17:57:32 +02:00