1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-04 08:47:11 +00:00
Commit Graph

86826 Commits

Author SHA1 Message Date
Philipp Stephani
6d8f5161ea Signal an error if a fallback cl-case is misplaced
* lisp/emacs-lisp/cl-macs.el (cl-case): Warn if the user passes a nil
key list (which would never match).  Warn about quoted symbols that
should probably be unquoted.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-warning): New unit
test (bug#51368).
2022-09-13 17:11:53 +02:00
Lars Ingebrigtsen
07ee1be052 Move imagep in image.c from the debugging section
* lisp/simple.el (imagep): Remove.
* src/image.c (Fimagep): Always define.
2022-09-13 16:37:31 +02:00
Lars Ingebrigtsen
7e374b9663 Fix help--analyze-key problem when not called from menu
* lisp/help.el (help--analyze-key): Don't bug out when not called
from the menu.
2022-09-13 16:14:57 +02:00
Lars Ingebrigtsen
07c0e090bd Add new commands 'image-crop' and 'image-elide'
* doc/lispref/display.texi (Showing Images): Document it.

* lisp/image.el (image-map): Bind commands.

* lisp/image/image-crop.el: New file (bug#51331).
2022-09-13 15:53:42 +02:00
Lars Ingebrigtsen
36993bb9c2 Add new function imagep
* lisp/simple.el (imagep): New function.
2022-09-13 15:53:42 +02:00
Stefan Kangas
aac4965702 Prefer defvar-keymap in several cases
* lisp/calc/calc-embed.el (calc-override-minor-modes-map):
* lisp/calc/calc-yank.el (calc-edit-mode-map):
* lisp/calc/calc.el (calc-trail-mode-map):
* lisp/cedet/semantic/mru-bookmark.el (semantic-mru-bookmark-mode-map):
* lisp/cedet/semantic/util-modes.el (semantic-highlight-edits-mode-map)
(semantic-show-unmatched-syntax-mode-map)
(semantic-show-parser-state-mode-map)
(semantic-stickyfunc-mode-map, semantic-highlight-func-mode-map):
* lisp/cedet/srecode/srt-mode.el (srecode-template-mode-map):
* lisp/gnus/gnus-art.el (gnus-prev-page-map, gnus-next-page-map):
* lisp/gnus/gnus-search.el (gnus-search-minibuffer-map):
* lisp/gnus/score-mode.el (gnus-score-mode-map):
* lisp/gnus/smime.el (smime-mode-map):
* lisp/indent.el (edit-tab-stops-map):
* lisp/isearch.el (minibuffer-local-isearch-map):
* lisp/printing.el (pr-interface-map):
* lisp/progmodes/prog-mode.el (prog-mode-map):
* lisp/progmodes/subword.el (subword-mode-map):
* lisp/reveal.el (reveal-mode-map):
* lisp/strokes.el (strokes-mode-map):
* lisp/textmodes/flyspell.el (flyspell-mouse-map):
* lisp/textmodes/less-css-mode.el (less-css-mode-map):
* lisp/textmodes/remember.el (remember-mode-map)
(remember-notes-mode-map):
* lisp/wid-browse.el (widget-browse-mode-map):
* lisp/wid-edit.el (widget-key-sequence-map): Prefer defvar-keymap in
some easy-to-convert cases.
2022-09-13 15:05:38 +02:00
Lars Ingebrigtsen
280b40cd8a Enable undo in eww buffers
* lisp/net/eww.el (eww-render): Enable undo after rendering.  This
allows using `undo' in text input boxes.
(eww-setup-buffer): Disable undo before rendering (bug#57750).

* lisp/net/shr.el (shr-image-fetched): Inhibit undo tracking.
2022-09-13 14:33:20 +02:00
Stefan Kangas
16d6ef13c2 Prefer defvar-keymap in pixel-scroll-precision-mode-map
* lisp/pixel-scroll.el (pixel-scroll-precision-mode-map): Prefer
defvar-keymap.
2022-09-13 11:06:40 +02:00
Stefan Kangas
4f9902eb0c Prefer defvar-keymap in tab-line.el
* lisp/tab-line.el (tab-line-tab-map, tab-line-add-map)
(tab-line-tab-close-map, tab-line-left-map, tab-line-right-map):
Prefer defvar-keymap.
2022-09-13 11:06:40 +02:00
Stefan Kangas
cbbecd46fd Prefer defvar-keymap in lisp/epa*.el
* lisp/epa-ks.el (epa-ks-search-mode-map):
* lisp/epa.el (epa-key-list-mode-map, epa-key-mode-map): Prefer
defvar-keymap.
2022-09-13 11:06:40 +02:00
Juri Linkov
5e6a7a210b Document the recently added branch commands (bug#50344)
* doc/emacs/maintaining.texi (VC Directory Commands): Change the
prefix key from "B" to "b".  Replace vc-create-tag with vc-create-branch,
and vc-retrieve-tag with vc-switch-branch.
(Switching Branches): Mention vc-switch-branch bound to 'C-x v b s'.
(Creating Branches): Mention vc-create-branch bound to 'C-x v b c'.

* lisp/vc/vc-dir.el (vc-dir-mode-map): In branch keymap 'b' rebind
"c" from vc-create-tag to vc-create-branch, and "s" from
vc-retrieve-tag to vc-switch-branch.
2022-09-12 22:12:50 +03:00
Juri Linkov
bcc95bd66d * lisp/vc/vc.el (vc-print-branch-log): Fix interactive spec.
For reading vc-read-revision in the interactive spec use the same 'backend'
and 'rootdir' as in the body of the same function.
2022-09-12 21:41:17 +03:00
Juri Linkov
71302884dd 'C-x v b' prefix key is used for branch commands to create/switch/print branch
* lisp/vc/vc.el (vc-create-branch): New command.
(vc-retrieve-tag): Add new optional arg 'branchp'.
(vc-switch-branch): New command (bug#50344).

* lisp/vc/vc-hooks.el (vc-prefix-map): Bind "b c" to vc-create-branch,
"b l" to vc-print-branch-log, "b s" to vc-switch-branch.  Remove obsolete
and suppressed "b" from vc-switch-backend.

* lisp/vc/vc-dir.el (vc-dir-mode-map): Rebind 'branch-map' from "B" to "b"
for consistency with 'vc-prefix-map'.

* lisp/vc/vc-git.el (vc-git-create-tag): For a new branch read
its start-point.  Ask a confirmation if modified files exist.
2022-09-12 21:07:05 +03:00
Sean Whitton
1c13ecae66 Add new C-x w prefix map
* window.el (window-prefix-map): New map.
(ctl-x-map): Unbind split-root-window-below and
split-root-window-right.  Bind window-prefix-map to C-x w.
2022-09-12 07:34:13 -07:00
Lars Ingebrigtsen
26e56540da Don't overwrite error message in `x' in package.el
* lisp/emacs-lisp/package.el (package-menu--perform-transaction):
Return whether there were errors.
(package-menu-execute): Don't overwrite the error message(s) with
a success message (bug#51201).
2022-09-12 14:17:25 +02:00
Lars Ingebrigtsen
7ba2dc95a8 Remove some XEmacs references in speedbar.el
* lisp/speedbar.el (speedbar-toggle-etags): Remove some references
to etags support being XEmacs specific (bug#51102).
2022-09-12 13:09:23 +02:00
Arthur Miller
76bec09a42 Remove edebug props in edebug-remove-instrumentation
* lisp/emacs-lisp/edebug.el (edebug--strip-plist): New function
(bug#51026).
(edebug-remove-instrumentation): Use it to remove pros added while
running edebug.
2022-09-12 12:38:09 +02:00
Lars Ingebrigtsen
b283373211 Fix length issues in gnus-cloud-make-chunk
* lisp/gnus/gnus-cloud.el (gnus-cloud-make-chunk): Make buffer
unibyte (bug#50988).
2022-09-12 12:23:52 +02:00
Arash Esbati
191c4fe249 Consider key=val labels when renumbering
* lisp/textmodes/reftex-global.el (reftex-translate): Recognize
key=val labels given in the optional or mandatory argument of
environments (AUCTeX bug#57720).

* test/lisp/textmodes/reftex-tests.el
(reftex-renumber-simple-labels): New Test.
2022-09-12 09:34:23 +02:00
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
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
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
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
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
Stefan Kangas
e6dc0cf2d3 * lisp/subr.el (string-split): New alias for split-string. 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
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
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
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
Lars Ingebrigtsen
43e9c8e9d2 Fix tramp-loaddefs compilation
* lisp/net/tramp-compat.el: Fix build by putting tramp-compat-rx
in the right loaddefs file.
2022-09-09 17:54:40 +02:00
Michael Albinus
08cc6c4d9e Make use of rx in Tramp backward compatoble
* lisp/net/tramp-compat.el (tramp-compat-rx--runtime-params): New defvar.
(tramp-compat-rx--transform-items)
(tramp-compat-rx--transform-item, tramp-compat-rx--transform):
New defuns.  Suggested by Mattias Engdegård <mattiase@acm.org>.
(tramp-compat-rx): New defalias or defmacro.
(tramp-compat-string-replace, tramp-compat-string-search):
Use regexp-quote.

* lisp/net/tramp.el:
* lisp/net/tramp-adb.el:
* lisp/net/tramp-archive.el:
* lisp/net/tramp-cmds.el:
* lisp/net/tramp-crypt.el:
* lisp/net/tramp-fuse.el:
* lisp/net/tramp-gvfs.el:
* lisp/net/tramp-sh.el:
* lisp/net/tramp-smb.el:
* lisp/net/tramp-sudoedit.el: Use `tramp-compat-rx' where indicated.

* test/lisp/net/tramp-archive-tests.el:
* test/lisp/net/tramp-tests.el: Use `tramp-compat-rx' where indicated.
2022-09-09 17:10:28 +02:00
Stefan Kangas
2d9674e865 Don't warn about some deleted variables in rst.el
* lisp/textmodes/rst.el (rst-level-face-max)
(rst-level-face-base-color, rst-level-face-base-light)
(rst-level-face-format-light, rst-level-face-step-light)
(rst-level-1-face, rst-level-2-face, rst-level-3-face)
(rst-level-4-face, rst-level-5-face, rst-level-6-face): Don't issue
obsoletion warnings for variables deleted in 24.3.
2022-09-09 11:27:30 +02:00
Stefan Kangas
ea0b913ab6 Delete variable window-system-version obsolete since 24.3
* lisp/frame.el (window-system-version): Delete variable.
* src/dispnew.c (syms_of_display) <Vwindow_system_version>:
Delete DEFVAR, obsolete since 24.3.
(init_display_interactive, syms_of_display_for_pdumper):
* src/msdos.c (internal_terminal_init):
* src/nsterm.m (ns_term_init):
* src/pgtkfns.c (pgtk_display_info_for_name):
* src/w32fns.c (w32_display_info_for_name, Fx_open_connection):
* src/xfns.c (x_display_info_for_name, Fx_open_connection): Don't
set above deleted variable.
* admin/admin.el (set-version): Don't update above deleted
variable in msdos.c.
* lisp/textmodes/artist.el (artist-submit-bug-report): Don't use
above deleted variable.
2022-09-09 11:27:30 +02:00
Stefan Kangas
1f29ee2d21 Delete many items obsolete since 24.3
* lisp/allout.el (allout-exposure-change-hook)
(allout-structure-added-hook, allout-structure-deleted-hook)
(allout-structure-shifted-hook):
* lisp/arc-mode.el (archive-extract-hooks):
* lisp/buff-menu.el (Buffer-menu-buffer+size-width):
* lisp/calendar/timeclock.el (timeclock-modeline-display)
(timeclock-modeline-display, timeclock-update-modeline):
* lisp/cedet/semantic/db-el.el
(semanticdb-elisp-sym-function-arglist):
* lisp/cedet/semantic/db-file.el (semanticdb-save-database-hooks):
* lisp/cedet/semantic/edit.el (semantic-change-hooks)
(semantic-edits-new-change-hooks)
(semantic-edits-delete-change-hooks)
(semantic-edits-reparse-change-hooks):
* lisp/cedet/semantic/lex.el (semantic-lex-reset-hooks):
* lisp/comint.el (comint--unquote&expand-filename)
(comint-unquote-filename):
* lisp/custom.el (user-variable-p):
* lisp/dired.el (dired-shrink-to-fit, dired-pop-to-buffer)
(dired-sort-set-modeline):
* lisp/ebuff-menu.el (Electric-buffer-menu-mode):
* lisp/emacs-lisp/byte-run.el (macro-declaration-function):
* lisp/emacs-lisp/checkdoc.el (custom-print-functions)
(checkdoc-comment-style-hooks):
* lisp/emacs-lisp/cl-lib.el (custom-print-functions):
* lisp/emacs-lisp/edebug.el (gud-inhibit-global-bindings):
* lisp/erc/erc-dcc.el (erc-dcc-chat-filter-hook):
* lisp/eshell/esh-mode.el (eshell-status-in-modeline):
* lisp/eshell/eshell.el (eshell-add-to-window-buffer-names)
(eshell-remove-from-window-buffer-names):
* lisp/faces.el (set-face-underline-p, font-list-limit):
* lisp/files.el (automount-dir-prefix, toggle-read-only):
* lisp/filesets.el (filesets-cache-fill-content-hooks):
* lisp/frame.el (automatic-hscrolling):
* lisp/generic-x.el (javascript-generic-mode)
(javascript-generic-mode-hook):
* lisp/gnus/gnus-start.el (gnus-subscribe-newsgroup-hooks):
* lisp/gnus/nndiary.el (nndiary-request-create-group-hooks)
(nndiary-request-update-info-hooks)
(nndiary-request-accept-article-hooks):
* lisp/htmlfontify.el (hfy-post-html-hooks):
* lisp/international/mule-cmds.el
(inactivate-current-input-method-function)
(inactivate-input-method, input-method-inactivate-hook)
(ucs-insert):
* lisp/international/quail.el (quail-inactivate)
(quail-inactivate-hook):
* lisp/international/robin.el (robin-inactivate)
(robin-inactivate-hook):
* lisp/leim/quail/hangul.el (hangul-input-method-inactivate):
* lisp/leim/quail/uni-input.el (ucs-input-inactivate):
* lisp/mail/emacsbug.el (report-emacs-bug-info):
* lisp/mh-e/mh-e.el (mh-kill-folder-suppress-prompt-hooks):
* lisp/mpc.el (mpc-string-prefix-p):
* lisp/net/rcirc.el (rcirc-print-hooks, rcirc-sentinel-hooks)
(rcirc-receive-message-hooks, rcirc-activity-hooks):
* lisp/obsolete/crisp.el (crisp-mode-modeline-string):
* lisp/pcomplete.el (pcomplete-arg-quote-list)
(pcomplete-quote-argument):
* lisp/progmodes/cc-mode.el (c-prepare-bug-report-hooks):
* lisp/progmodes/python.el (python-info-ppss-context)
(python-info-ppss-context-type)
(python-info-ppss-comment-or-string-p, python-indent)
(python-guess-indent, python-buffer, python-preoutput-result)
(python-proc, python-send-receive, python-send-string)
(python-use-skeletons):
* lisp/progmodes/sh-script.el (sh-maybe-here-document):
* lisp/replace.el (query-replace-interactive):
* lisp/strokes.el (strokes-modeline-string):
* lisp/subr.el (redraw-modeline):
* lisp/term.el (term-default-fg-color, term-default-bg-color):
* lisp/textmodes/tex-mode.el (latex-string-prefix-p)
(tex-string-prefix-p):
* lisp/url/url-parse.el (url-recreate-url-attributes):
* lisp/vc/add-log.el (change-log-acknowledgement):
* lisp/vc/ediff-wind.el
(ediff-choose-window-setup-function-automatically):
* lisp/vc/pcvs-util.el (cvs-string-prefix-p):
* lisp/vc/vc.el (vc-string-prefix-p):
* lisp/window.el (display-buffer-function):
* lisp/winner.el (winner-mode-leave-hook): Remove many functions and
variables obsolete since 24.3.

* lisp/buff-menu.el (list-buffers--refresh):
* lisp/dired.el (dired-mode-map):
* lisp/files.el (abbreviate-file-name):
* lisp/generic-x.el (generic-default-modes):
* lisp/mh-e/mh-funcs.el (mh-kill-folder):
* lisp/progmodes/hideif.el (hide-ifdef-mode-submap):
* lisp/replace.el (query-replace-read-from):
* lisp/term.el (term):
* lisp/window.el (display-buffer): Don't use above deleted
functions and variables.

* src/marker.c (Fbuffer_has_markers_at): Delete DEFUN obsolete
since 24.3.
(syms_of_marker) <Sbuffer_has_markers_at>: Delete defsubr.
* lisp/subr.el (buffer-has-markers-at): Remove obsoletion
of above deleted DEFUN.
* etc/TODO: Doc fix; don't mention above deleted function.

* admin/cus-test.el (cus-test-get-options):
* lisp/pcomplete.el: Doc fixes; don't mention removed items.
; * etc/NEWS: List removed items.
2022-09-09 11:27:30 +02:00
Stefan Kangas
a8a1595cc3 Prefer defvar-keymap in proced.el
* lisp/proced.el (proced-mode-map): Prefer defvar-keymap.
2022-09-09 03:40:53 +02:00
Richard Stallman
0fab6328dc Decode base64 attachments revealed by decryption.
* lisp/mail/rmail.el (rmail-epa-decode): New function.
(rmail-epa-decrypt): Call rmail-epa-decode.
2022-09-08 18:10:12 -04:00
Phil Sainty
b836405138 Add new user option ecomplete-auto-select
* lisp/ecomplete.el (ecomplete-auto-select): New user option
(bug#53935).
(ecomplete-display-matches): Use it.
2022-09-08 14:53:00 +02:00
Augusto Stoffel
f10645d260 Add prefix argument to outline-cycle-buffer
* lisp/outline.el (outline-cycle-buffer): Add prefix argument to show
headings up to a given level.  Handle the case where the top
heading level is not 1.
2022-09-08 14:40:02 +02:00
Lars Ingebrigtsen
aa02ffb2ab Fix diff-add-log-use-relative-names prompting
* lisp/vc/diff-mode.el (diff-add-log-use-relative-names): Autoload
to avoid prompting when set via dir-locals.
2022-09-08 14:23:21 +02:00
Eli Zaretskii
5bc44026b5 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-09-08 11:49:17 +03:00
Sam James
6b7dc132af Recognize zstandard (.zst) compressed Info files
* lisp/info.el (Info-suffix-list): Recognize .zst file extension
from the zstd compression tool.  This allows reading Info pages
compressed with 'zstd'.  (Bug#57636)

Copyright-paperwork-exempt: yes
2022-09-08 11:48:33 +03:00
Michael Albinus
684950eb94 Make call of remote `id' more performant in Tramp
* lisp/net/tramp-adb.el (tramp-adb-handle-file-exists-p): New defun.
(tramp-adb-file-name-handler-alist): Use it.
(tramp-adb-handle-file-executable-p)
(tramp-adb-handle-file-readable-p)
(tramp-adb-handle-file-writable-p)
(tramp-adb-handle-get-remote-uid)
(tramp-adb-handle-get-remote-gid)
(tramp-adb-handle-get-remote-groups): Use caches consequently.

* lisp/net/tramp-sh.el (tramp-perl-id, tramp-python-id): New defconsts.
(tramp-sh-handle-get-remote-uid, tramp-sh-handle-get-remote-gid)
(tramp-sh-handle-get-remote-groups): Use caches consequently.
(tramp-sh-handle-file-writable-p): Use `file-writable-p'.
(tramp-expand-script): Handle also "python" expansion.
(tramp-get-remote-id): Do not set connection property anymore,
this is done differently now.
(tramp-get-remote-uid-with-id, tramp-get-remote-uid-with-perl)
(tramp-get-remote-uid-with-python, tramp-get-remote-gid-with-id)
(tramp-get-remote-gid-with-perl)
(tramp-get-remote-gid-with-python): Remove.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-executable-p)
(tramp-sudoedit-handle-file-exists-p)
(tramp-sudoedit-handle-file-readable-p)
(tramp-sudoedit-handle-file-writable-p):
(tramp-sudoedit-handle-get-remote-uid)
(tramp-sudoedit-handle-get-remote-gid)
(tramp-sudoedit-handle-get-remote-groups): Use caches consequently.

* lisp/net/tramp.el (tramp-check-cached-permissions):
Call `tramp-get-remote-groups' only if needed.
(tramp-get-remote-groups): Do not return default value.
(tramp-read-id-output): New defun.

* test/lisp/net/tramp-tests.el (tramp--test-deftest-with-perl):
Suppress also remote `id'.
2022-09-08 10:36:08 +02:00
Eli Zaretskii
e97ca476a1 ; Minor improvements in 'standard-display-by-replacement-char'
* lisp/disp-table.el (standard-display-by-replacement-char): Minor
improvements.  Suggested by Richard Stallman <rms@gnu.org>.
2022-09-08 10:14:10 +03:00
Philip Kaludercic
740a1a3d0e Add new user option 'diff-add-log-use-relative-names'
* .dir-locals.el: Set new option to t
* etc/NEWS: Mention new option.
* lisp/vc/diff-mode.el (diff-add-log-use-relative-names): Add new option.
(diff-add-log-current-defuns): Use new option.
* doc/emacs/maintaining.texi (Log Buffer): Mention new option.
2022-09-08 08:21:15 +02:00
Stefan Kangas
cb036a79e2 dired-guess: Support zstandard archives
* lisp/dired-aux.el (dired-guess-shell-alist-default): Support
zstandard archives.
2022-09-08 02:48:46 +02:00
Morgan Smith
ffe50d41d9 image-dired: Fix moving forward when marking files
* lisp/image/image-dired.el (image-dired--do-mark-command): Make
movement consistent regardless of the value of
image-dired-marking-shows-next.  (Bug#57651)
2022-09-08 02:15:22 +02:00
Morgan Smith
c6b25b55b3 Make image-dired-rotate-original-{left,right} respect marks
* lisp/image/image-dired.el (image-dired-rotate-original-left)
(image-dired-rotate-original-right): Rotate all marked
files.  (Bug#57651)
2022-09-08 02:15:14 +02:00
Stefan Kangas
7db52f611c Prefer defvar-keymap in icomplete.el
* lisp/icomplete.el (icomplete-minibuffer-map)
(icomplete-fido-mode-map)
(icomplete-vertical-mode-minibuffer-map): Prefer defvar-keymap.
2022-09-07 23:38:55 +02:00
Mattias Engdegård
35b4205dee Improve save-match-data hygiene
* lisp/subr.el (save-match-data): Use uninterned variable symbol.
Remove outdated comments.
2022-09-07 18:02:26 +02:00
Eli Zaretskii
e1282c8c66 Add instructions to 'standard-display-by-replacement-char'
* lisp/disp-table.el (standard-display-by-replacement-char): Add a
preamble to the generated code with instructions.  Suggested by
Richard Stallman <rms@gnu.org>.
2022-09-07 16:20:29 +03:00
Mattias Engdegård
c6c9dfc867 Simplify dolist and dotimes
We no longer care enough about non-lexbind code generation for it
to merit special attention; better to keep the code simple.

Suggested by Philip Kaludercic in
https://lists.gnu.org/archive/html/emacs-devel/2022-09/msg00354.html .

* lisp/subr.el (dolist, dotimes): Use uninterned symbols for variable
bindings generated by the macros, and discard the alternative code
versions for non-lexbind code.  Use sensible variable names.
2022-09-07 14:05:28 +02:00
Philip Kaludercic
50020d026c Untabify rcirc.el 2022-09-07 11:18:32 +02:00
Stefan Kangas
9acb278af5 Bump Emacs version to 28.2
* README:
* configure.ac:
* msdos/sed2v2.inp:
* nt/README.W32: Bump Emacs version to 28.2.
2022-09-07 01:20:12 +02:00
Stefan Monnier
e09872ccb3 * lisp/jit-lock.el (jit-lock-function): Update comment 2022-09-06 17:29:34 -04:00
Stefan Monnier
91a79eedf6 * lisp/jit-lock.el (jit-lock-function): Don't fontify invisible text
See bug#57447.  This can speed up fontification significantly when using
things like outline-mode.
2022-09-06 17:24:11 -04:00
Kai Tetzlaff
ae963e80a7 Fix (mostly multibyte) issues in sieve-manage.el (Bug#54154)
The managesieve protocol (s. RFC5804) requires support for (a sightly
restricted variant of) UTF-8 in script content and script names. This
commit fixes/improves the handling of multibyte characters.

In addition, `sieve-manage-getscript' now properly handles NO
responses from the server instead of inflooping.

There are also some logging improvements.

* lisp/net/sieve-manage.el
(sieve-manage--append-to-log):
(sieve-manage--message):
(sieve-manage--error):
(sieve-manage-encode):
(sieve-manage-decode):
(sieve-manage-no-p): New functions.
(sieve-manage-make-process-buffer): Switch process buffer to unibyte.
(sieve-manage-open-server): Add `:coding 'raw-text-unix` to
`open-network-stream' call. Use unix EOLs in order to keep matching
CRLF (aka "\r\n") intact.
(sieve-manage-send): Make sure that UTF-8 multibyte characters are
properly encoded before sending data to the server.
(sieve-manage-getscript):
(sieve-manage-putscript): Use the changes above to fix down/uploading
scripts containing UTF-8 multibyte characters.
(sieve-manage-listscripts):
(sieve-manage-havespace)
(sieve-manage-getscript)
(sieve-manage-putscript):
(sieve-manage-deletescript):
(sieve-manage-setactive): Use the changes above to fix handling of
script names which contain UTF-8 multibyte characters.
(sieve-manage-parse-string):
(sieve-manage-getscript): Add handling of server responses with type
NO. Abort `sieve-manage-getscript' and show error message in message
area.
(sieve-manage-erase):
(sieve-manage-drop-next-answer):
(sieve-manage-parse-crlf): Return erased/dropped data (instead of nil).
(sieve-sasl-auth):
(sieve-manage-getscript):
(sieve-manage-erase):
(sieve-manage-open-server):
(sieve-manage-open):
(sieve-manage-send): Improve logging.
2022-09-06 13:33:48 +02:00
Kai Tetzlaff
46963d0bc9 Improve robustnes of `sieve-manage-quit' in case of errors
* lisp/net/sieve.el (sieve-manage-quit): Avoid killing buffers it's
not supposed to touch (bug#54154).
2022-09-06 13:33:48 +02:00
Drew Adams
653bc39434 Add some new find-lisp commands
* lisp/find-lisp.el (find-lisp-find-dired-other-window): New command.
(find-lisp-find-dired): Improve the doc string.
(find-lisp-find-dired-subdirectories): Clarify doc string.
(find-lisp-find-dired-subdirs-other-window): New command.
(find-lisp-find-dired-internal): Adjust to allow being called by
the new command.
(find-lisp-format): Make symlink output more regular.
2022-09-06 12:54:42 +02:00
Laurence Warne
969983ea1f Apply syntax highlighting for all python f-strings
* lisp/progmodes/python.el (python--f-string-p)
(python--font-lock-f-strings): Edit functions to use a regular
expression matching all f-strings (bug#56757).
2022-09-06 12:54:42 +02:00
Michael Albinus
91423627b4 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2022-09-06 12:33:45 +02:00
Michael Albinus
106456d01b Use secondary groups when checking permissions in Tramp (Bug#57044)
* lisp/net/tramp.el (tramp-check-cached-permissions): Check also for
secondary groups.  (Bug#57044)
(tramp-get-remote-groups):
* lisp/net/tramp-adb.el (tramp-adb-handle-get-remote-groups):
* lisp/net/tramp-sh.el (tramp-sh-handle-get-remote-groups):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-get-remote-groups):
New defuns.

* lisp/net/tramp.el (tramp-file-name-for-operation):
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add `tramp-get-remote-groups'.

* lisp/net/tramp.el:
* lisp/net/tramp-adb.el:
* lisp/net/tramp-cache.el:
* lisp/net/tramp-crypt.el:
* lisp/net/tramp-fuse.el:
* lisp/net/tramp-gvfs.el:
* lisp/net/tramp-integration.el:
* lisp/net/tramp-rclone.el:
* lisp/net/tramp-sh.el:
* lisp/net/tramp-smb.el:
* lisp/net/tramp-sudoedit.el: Use `blank' in `rx' forms.

* test/lisp/net/tramp-archive-tests.el:
* test/lisp/net/tramp-tests.el: Use `blank' in `rx' forms.
2022-09-06 12:33:19 +02:00
Lars Ingebrigtsen
9f3f7f1ec4 Make ffap-file-finder work again
* lisp/ffap.el (find-file-at-point): Allow people to set
ffap-file-finder again (bug#50279).

* lisp/ido.el (ido-everywhere): Add an interstitial to fulfil
ffap-file-handler semantics.
2022-09-06 12:24:32 +02:00
Stefan Kangas
eaca6378d2 Merge from origin/emacs-28
ecbdb3b0ad * lisp/server.el: Improve Commentary.
ee5c591249 Explain how the font appearance can be fine-tuned in fbterm.
2022-09-06 06:30:27 +02:00
Stefan Monnier
2a78f06ef4 cl-symbol-macrolet: Fix recent regression
The recent fix for bug#57397 introduced a regression, breaking
the `cl-lib-symbol-macrolet-hide` test.  It turned out that the
origin of the problem was that `gv.el` uses `macroexpand-1` which
does not (can't) use `macroexpand` but `cl-symbol-macrolet` failed
to advise `macroexpand-1` the way it advised `macroexpand`.

To fix this, we change `cl-symbol-macrolet` so it advises both, and we
do that with a new `macroexpand` advice which delegates the bulk of
the work to `macroexpand-1`.

Along the way, I bumped into another bug in the interaction between
`cl-letf` and `cl-symbol-macrolet`, which I tried to fix in `cl-letf`.

I hear the war on `cl-symbol-macrolet` was a failure.
Maybe ... just say no?

* lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand-1): New function,
extracted from `cl--sm-macroexpand`.
(cl--sm-macroexpand): Rewrite completely.
(cl-symbol-macrolet): Advise both `macroexpand` and `macroexpand-1`.
(cl--letf): Don't use the "simple variable" code for symbol macros.

* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-symbol-macrolet-hide):
Revert last change because the test was right.

* test/lisp/emacs-lisp/cl-macs-tests.el
(cl-macs-test--symbol-macrolet): Add a test case.
2022-09-06 00:08:35 -04:00
Sean Whitton
9219e83b3c ; Document that a value of any other type means no highlighting
* lisp/vc/vc-git.el (vc-git-log-edit-summary-target-len)
(vc-git-log-edit-summary-max-len): Document that a value of any other
type means no highlighting.
2022-09-05 17:39:21 -07:00
Gregory Heytings
b648634982 ; * lisp/help-fns.el (help-fns--key-bindings): Fix previous change. 2022-09-06 00:15:49 +02:00
Gregory Heytings
c641848bce Simplify describe-function.
* lisp/help-fns.el (describe-function-1): Do not pass
'describe-function-orig-buffer' as argument to...
(help-fns--key-bindings): but use it directly there instead.
This simplifies 1d1158397b.
2022-09-05 23:30:14 +02:00
Juri Linkov
1763cd4727 Fit the re-builder window to the buffer
* lisp/emacs-lisp/re-builder.el (re-builder): Fit the height to
the buffer (bug#56772).
2022-09-05 20:58:27 +02:00
Hugo Heagren
6a2ee981c3 Add new functions for splitting the root window
* lisp/window.el (split-window-right): Add optional argument to
control which window is split (previously, would only split selected
window).  Update docstring.
* doc/lispref/windows.texi (Splitting Windows): Update docs for
`split-window-right'.
* lisp/window.el (split-window-below): Add optional argument to
control which window is split (previously, would only split selected
window).  Update docstring.
* doc/lispref/windows.texi (Splitting Windows): Update docs for
`split-window-below'.
* lisp/window.el (ctl-x-map): Bind `split-root-window-right' to 9 in
ctl-x-map.  This is consistent with binding other window-splitting
operations to numbers in this map.
* lisp/window.el (ctl-x-map): Bind `split-root-window-below' to 7 in
ctl-x-map.  This is consistent with binding other window-splitting
operations to numbers in this map.
* lisp/window.el (split-root-window-right): New function to split
whole frame.
* doc/lispref/windows.texi (Splitting Windows): Add documentation for
`split-root-window-right'.
* lisp/window.el (split-root-window-below): New function to split
whole frame.
* doc/lispref/windows.texi (Splitting Windows): Add documentation for
`split-root-window-below' (bug#56791).
2022-09-05 20:57:21 +02:00
Sean Whitton
21c725dfe0 Font lock long Git commit summary lines
* lisp/vc/vc-git.el (vc-git-log-edit-summary-target-len)
(vc-git-log-edit-summary-max-len): New defcustoms.
(vc-git-log-edit-summary-target-warning)
(vc-git-log-edit-summary-max-warning): New faces.
(vc-git--log-edit-summary-check): New function.
(vc-git-log-edit-mode): Add vc-git--log-edit-summary-check to
log-edit-font-lock-keywords to font lock long Git commit summary
lines.
* etc/NEWS (VC): Document the change.
* .dir-locals.el: Set vc-git-log-edit-summary-target-len.
2022-09-05 11:12:23 -07:00
Stefan Kangas
ecbdb3b0ad * lisp/server.el: Improve Commentary. 2022-09-05 15:46:30 +02:00
Stefan Kangas
5c8b76fc87 Merge from origin/emacs-28
5713c730f2 Update to Org 9.5.5
aad38d6010 * lisp/emacs-lisp/comp.el (comp-run-async-workers): Fail m...
2022-09-05 06:30:32 +02:00
Jim Porter
f07505d1ec Let external Eshell processes send stdout and stderr to different places
* lisp/eshell/esh-proc.el (eshell-put-process-properties): Pass INDEX.
(eshell-gather-process-output): Create a pipe process for stderr when
stderr goes somewhere different than stdout.
(eshell-insertion-filter, eshell-sentinel): Consult
':eshell-handle-index' property.

* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/output/stdout-to-buffer)
(esh-proc-test/output/stderr-to-buffer)
(esh-proc-test/exit-status/with-stderr-pipe): New tests (bug#21605).
2022-09-04 15:15:01 -07:00
Jim Porter
a87c7aff55 Put Eshell's bookkeeping data for external processes on the process object
This allows tracking this information for process objects not recorded
in 'eshell-process-list', which will be useful for pipe processes for
stderr output.

* lisp/eshell/esh-proc.el (eshell-process-list): Add docstring.
(eshell-record-process-object): Only record the process object and
whether it's a subjob.
(eshell-remove-process-entry): Adapt to changes in
'eshell-record-process-object'.
(eshell-record-process-properties): New function...
(eshell-gather-process-output): ... call it.
(eshell-insertion-filter, eshell-sentinel): Use new process
properties, don't require process to be in 'eshell-process-list'.

* test/lisp/eshell/esh-proc-tests.el (esh-proc-test--output-cmd): New
variable.
(esh-proc-test--detect-pty-cmd): Add docstring.
(esh-proc-test/output/to-screen)
(esh-proc-test/output/stdout-and-stderr-to-buffer)
(esh-proc-test/exit-status/success, esh-proc-test/exit-status/failure)
(esh-proc-test/kill-process/foreground-only): New tests.
(esh-proc-test/kill-background-process): Rename to...
(esh-proc-test/kill-process/background-prompt): ... this, and use
'eshell-wait-for-subprocess' instead of 'sit-for'.
2022-09-04 15:15:01 -07:00
Jim Porter
ab7e94fb1d Add support for more kinds of redirect operators in Eshell
* lisp/eshell/esh-arg.el: Require cl-lib.
(eshell-finish-arg): Allow passing multiple ARGUMENTS.
(eshell-quote-argument): Handle the case when 'eshell-finish-arg' was
passed multiple arguments.

* lisp/eshell/esh-cmd.el (eshell-do-pipelines)
(eshell-do-pipelines-synchronously): Only set stdout output handle.

* lisp/eshell/esh-io.el (eshell-redirection-operators-alist): New
constant.
(eshell-io-initialize): Prefer sharp quotes for functions.
(eshell-parse-redirection, eshell-strip-redirections): Add support for
more redirection forms.
(eshell-copy-output-handle, eshell-set-all-output-handles): New
functions.

* test/lisp/eshell/esh-io-tests.el
(esh-io-test/redirect-all/overwrite, esh-io-test/redirect-all/append)
(esh-io-test/redirect-all/insert, esh-io-test/redirect-copy)
(esh-io-test/redirect-copy-first, esh-io-test/redirect-pipe): New
tests.

* doc/misc/eshell.texi (Redirection): Document new redirection syntax.
(Pipelines): Document '|&' syntax.
(Bugs and ideas): Update item about redirection syntax.

* etc/NEWS: Announce this change.
2022-09-04 15:15:01 -07:00
Jim Porter
3d6c013a27 Allow checking specific Eshell handles for interactive output
This changes the default behavior of the function to check only stdout
for interactivity, but for most cases this should be what we want.

* lisp/eshell/esh-io.el (eshell-interactive-output-p): Pass HANDLES
and handle INDEX.

* lisp/eshell/em-term.el (eshell-visual-command-p): Check for
interactivity of both stdout and stderr.
2022-09-04 15:15:01 -07:00
Jim Porter
1be925faa1 Simplify Eshell handle functions and add tests/documentation
* lisp/eshell/esh-arg.el (eshell-parse-argument-hook): Explain how to
use 'eshell-finish-arg'.

* lisp/eshell/esh-io.el (eshell-create-handles): Only call
'eshell-get-target' for stderr if necessary.
(eshell-protect-handles): Use 'dotimes'.
(eshell-set-output-handle): Pass HANDLES and fix an edge case with
setting a duplicate TARGET.

* test/lisp/eshell/eshell-tests-helpers.el (eshell-with-temp-buffer):
New macro.

* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/quoted-lisp-form)
(esh-cmd-test/backquoted-lisp-form)
(esh-cmd-test/backquoted-lisp-form/splice): New tests.

* test/lisp/eshell/eshell-tests.el (eshell-test/redirect-buffer)
(eshell-test/redirect-buffer-escaped): Move to...
* test/lisp/eshell/esh-io-tests.el: ... here, and add other I/O tests.

* doc/misc/eshell.texi (Arguments): Add documentation for special
argument types.
(Input/Output): Expand documentation for redirection and pipelines.
2022-09-04 15:15:01 -07:00
Michael Albinus
4eb3e6bdda Fix comment in tramp.el 2022-09-04 19:25:21 +02:00
Juri Linkov
2dfce43103 Don't replace the first character with an arrow in outline-minor-mode
* lisp/outline.el (outline--make-button-overlay): Add the first character
to the displayed outline button (bug#56820).
2022-09-04 20:02:20 +03:00
Juri Linkov
40cdbf6dc1 Use use-region-beginning/end in replacement commands (bug#45607)
* lisp/isearch.el (isearch-query-replace): Use use-region-beginning
and use-region-end.

* lisp/textmodes/paragraphs.el (repunctuate-sentences):
* lisp/replace.el (query-replace, query-replace-regexp)
(map-query-replace-regexp, replace-string, replace-regexp):
Add 'interactive-args' to 'declare' and use use-region-beginning,
use-region-end, use-region-noncontiguous-p.

* lisp/simple.el (use-region-noncontiguous-p): New function.
(region-noncontiguous-p): Return more meaningful value.
2022-09-04 19:55:59 +03:00
Lars Ingebrigtsen
ad6878005d Add a basic widget type for buffer predicates
* lisp/paren.el (show-paren-predicate):
* lisp/outline.el (outline-minor-mode-use-buttons): Use it.
* lisp/wid-edit.el (buffer-predicate): New widget type.
2022-09-04 16:29:06 +02:00
Michael Albinus
f1635c8efb Fix rx forms in Tramp
* lisp/net/tramp.el (tramp-restricted-shell-hosts-alist)
(tramp-local-host-regexp, tramp-echoed-echo-mark-regexp)
(tramp-login-prompt-regexp, tramp-terminal-prompt-regexp)
(tramp-antispoof-regexp)
(tramp-build-completion-file-name-regexp)
(tramp-debug-outline-regexp)
(tramp-use-absolute-autoload-file-names)
(tramp-lock-file-info-regexp, tramp-shell-quote-argument):
* lisp/net/tramp-adb.el (tramp-do-parse-file-attributes-with-ls)
* lisp/net/tramp-cache.el (tramp-flush-file-function):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name):
* lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay-regexp)
(info-lookup-maybe-add-help):
* lisp/net/tramp-sh.el (tramp-default-user-alist, tramp-sunos-unames)
(tramp-scp-direct-remote-copying, tramp-get-remote-locale):
* lisp/net/tramp-smb.el (tramp-smb-prompt, tramp-smb-wrong-passwd-regexp)
(tramp-smb-errors, tramp-smb-get-localname)
(tramp-smb-read-file-entry): Simplify rx forms.

* lisp/net/tramp.el (tramp-handle-find-backup-file-name)
(tramp-handle-lock-file, tramp-handle-make-auto-save-file-name):
* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times)
(tramp-adb-maybe-open-connection):
* lisp/net/tramp-gvfs.el
(tramp-gvfs-file-attributes-with-gvfs-ls-regexp):
* lisp/net/tramp-sh.el (tramp-open-shell, tramp-find-shell): Do not use
`eval-when-compile'.

* lisp/net/tramp-cmds.el (tramp-rename-files, tramp-rename-these-files):
Use rx.

* lisp/net/tramp-gvfs.el (tramp-gvfs-password-tcrypt): New defonst.
(tramp-gvfs-handle-file-attributes): Use `number-to-string'.

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test17-insert-directory):
* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory)
(tramp--test-share-p): Simplify rx forms.
2022-09-04 13:44:30 +02:00
Damien Cassou
4751b51d5e Add new function `seq-positions'
* doc/lispref/sequences.texi (Sequence Functions): Document it.

* lisp/emacs-lisp/seq.el (seq-positions): New function.

* lisp/emacs-lisp/shortdoc.el (sequence): Mention it.

* test/lisp/emacs-lisp/seq-tests.el (test-seq-positions): Test it
(bug#57548).
2022-09-04 13:21:59 +02:00
Augusto Stoffel
4d50d413e6 Add Python import management commands
* lisp/progmodes/python.el (python-interpreter): New variable
(python-mode-map): Keybindings and menu entries for new commands
(python--list-imports, python-import-history, python--query-import)
(python--do-isort):  New variables and helper functions.
(python-add-import, python-import-symbol-at-point)
(python-remove-import, python-sort-imports, python-fix-imports): New
interactive commands (bug#57574).
2022-09-04 13:14:58 +02:00
Augusto Stoffel
4932d26b5d Python shells dedicated to a project
* lisp/progmodes/python.el: Require 'seq' and (optionally) 'compat'
and 'project' libraries.
(python-shell-dedicated): New user option
(python-shell-get-process-name): Adapt to project-dedicated shells.
(run-python): Offer possibility to create a project-dedicated shell,
or use 'python-shell-dedicated' as the default behavior.
(python-shell-get-buffer): Adapt to project-dedicated shells
(bug#56997).
2022-09-04 13:13:57 +02:00
Damien Cassou
2db8b0e12f Add new function `seq-remove-at-position'
* doc/lispref/sequences.texi (Sequence Functions): Document it.

* lisp/emacs-lisp/seq.el (seq-remove-at-position): New function.

* lisp/emacs-lisp/shortdoc.el (sequence): Mention it.

* test/lisp/emacs-lisp/seq-tests.el (test-seq-remove-at-position):
Test it.
2022-09-04 13:07:18 +02:00
Damien Cassou
77b761dafa Improve documentation of several functions in seq.el
* doc/lispref/sequences.texi (Sequence Functions):
* lisp/emacs-lisp/seq.el (seq-contains):
(seq-contains-p):
(seq-set-equal-p):
(seq-position):
(seq-union):
(seq-intersection):
(seq-difference): Use more standard wording in the docstrings
(bug#57561).
2022-09-04 13:00:22 +02:00
Lars Ingebrigtsen
500af031c8 Fix some help-fns test failures
* lisp/help-fns.el (help-fns--key-bindings): Fix test failures
from recent change.
2022-09-04 11:37:32 +02:00
Eli Zaretskii
d2abe9adf7 ; * lisp/disp-table.el (standard-display-by-replacement-char): Doc fix. 2022-09-04 10:03:22 +03:00
Eli Zaretskii
b35a93a061 New command to facilitate text-mode display of unsupported chars
* lisp/disp-table.el (standard-display-by-replacement-char): New
command.

* etc/NEWS: Announce it.
2022-09-04 09:03:30 +03:00
Eli Zaretskii
1d9e4900a3 Fix update of Dired display when it was called on a cons cell
* lisp/dired.el (dired-internal-do-deletions): Make sure that FN's
directory entry is updated on display.  (Bug#57565)
2022-09-04 08:40:52 +03:00
Stefan Monnier
0ffde8a81f * lisp/term/linux.el (gpm-mouse-enable): Remove left-over declaration 2022-09-03 22:58:44 -04:00
Stefan Monnier
2dd1c2ab19 gv.el and cl-macs.el: Fix bug#57397
* lisp/emacs-lisp/gv.el (gv-get): Obey symbol macros.
* lisp/emacs-lisp/cl-macs.el (cl--letf): Remove workaround placed to
try and handle symbol macros.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-test--symbol-macrolet):
Add new testcase.
2022-09-03 22:38:28 -04:00
Kyle Meyer
5713c730f2 Update to Org 9.5.5 2022-09-03 21:32:20 -04:00
Gregory Heytings
1d1158397b Look up keybindings in correct buffer in describe-function.
* lisp/help-fns.el (help-fns--key-bindings): New parameter.
Use it when looking up keybindings.
(describe-function-1): Add the buffer in which the command
was invoked as argument to 'help-fns--key-bindings'.
Fixes bug#57568.
2022-09-04 00:45:04 +02:00
Stefan Monnier
aad38d6010 * lisp/emacs-lisp/comp.el (comp-run-async-workers): Fail more gracefully
Otherwise Emacs may fail to start if it can't find a writable
`~/.emacs.d/eln-cache` directory.
Fixes bug#57562.  See also Debian's bug #1017739.
2022-09-03 15:14:58 -04:00
Mattias Engdegård
99a5a72537 lisp/emacs-lisp/seq.el: remove unnecessary compatibility code
* lisp/emacs-lisp/seq.el (seq-take, seq--activate-font-lock-keywords):
Simplify unnecessarily guarded code, as this file will only ever be
used with the same version of Emacs.
2022-09-03 17:59:42 +02:00
Stefan Monnier
b01d529e8d * lisp/emacs-lisp/macroexp.el (macroexp--compiler-macro): Soften message
Clarify that the error is "harmless".
2022-09-03 11:03:32 -04:00
Stefan Monnier
d60e930d34 * lisp/emacs-lisp/cl-macs.el: Use define-symbol-prop (bug#50869)
(cl-define-compiler-macro, cl-defstruct, cl-deftype): Prefer
`define-symbol-prop` over `put` so `unload-feature` can undo
those definitions.
2022-09-03 10:55:10 -04:00
Stefan Monnier
bf37ea1873 * lisp/loadhist.el (loadhist-unload-element): Remove auxiliary function info
See bug#50869.
2022-09-03 10:54:50 -04:00
Stefan Monnier
996f8d85d7 * lisp/help-fns.el (find-lisp-object-file-name): Revert last change 2022-09-03 10:33:02 -04:00
Philip Kaludercic
2d337ca577
* subr.el (buffer-match-p): Use 'pcase' (bug#57502) 2022-09-03 14:54:40 +02:00
Lars Ingebrigtsen
6c11214dc1 Inhibit nativecomp of loaddefs files
* lisp/emacs-lisp/generate-lisp-file.el
(generate-lisp-file-trailer): Allow inhibiting nativecomp.

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric):
Inhibit native-comp, because it's not very useful for loaddefs files.
2022-09-03 14:23:26 +02:00
Eli Zaretskii
dcfe3314cd Teach 'max-char' about the Unicode code range
* src/character.c (Fmax_char): Accept an optional argument
UNICODE, and, if non-nil, return the maximum codepoint defined by
Unicode.

* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Update the
signature of 'max-char'.

* etc/NEWS:
* doc/lispref/nonascii.texi (Character Codes): Update the
documentation of 'max-char'.
2022-09-03 13:45:53 +03:00
Stefan Kangas
db2f8b8415 Increase image-dired-show-all-from-dir-max-files to 1000
* lisp/image/image-dired.el
(image-dired-show-all-from-dir-max-files): Increase to 1000.
2022-09-03 11:26:34 +02:00
Lars Ingebrigtsen
01534a2d31 Fix image-dired-util.el compile warning
* lisp/image/image-dired-util.el (require): Require for cl-case.
2022-09-03 11:07:12 +02:00
Stefan Kangas
ec331e172d Add new defgroup image-dired-dired
* lisp/image/image-dired-dired.el
(image-dired-dired-append-when-browsing): Rename from
'image-dired-append-when-browsing'.  Update all uses.
(image-dired-dired): New defgroup.
(image-dired-dired-append-when-browsing)
(image-dired-dired-disp-props): Use above new defgroup.
2022-09-03 10:44:45 +02:00
Stefan Kangas
504d5c2da8 image-dired: Minor cleanups
* lisp/image/image-dired-dired.el
(image-dired-dired-after-readin-hook, image-dired-minor-mode):
Minor doc fixes.
(image-dired-dired-display-image): Don't accept ineffectual prefix
argument.
* lisp/image/image-dired-util.el
(image-dired-file-name-at-point): Use when-let.
(image-dired-display-thumb-properties): Redefine as obsolete function
alias for 'image-dired-update-header-line'.

* lisp/image/image-dired-util.el
(image-dired-window-width-pixels): Make obsolete in favor of
window-body-width.
* lisp/image/image-dired.el (image-dired-line-up-dynamic)
(image-dired-display-window-width): Don't use above obsolete function.
2022-09-03 10:44:04 +02:00
Stefan Kangas
e50674833d image-dired: Prefer defvar-keymap
* lisp/image/image-dired-dired.el (image-dired-minor-mode-map):
* lisp/image/image-dired.el
(image-dired-thumbnail-mode-line-up-map)
(image-dired-thumbnail-mode-tag-map)
(image-dired-thumbnail-mode-map)
(image-dired-display-image-mode-map): Prefer defvar-keymap.
2022-09-03 10:23:38 +02:00
Stefan Kangas
a7d716d1c5 Add new defgroup image-dired-external
* lisp/image/image-dired-external.el (image-dired-external): New
defgroup.
(image-dired-cmd-create-thumbnail-program)
(image-dired-cmd-create-thumbnail-options)
(image-dired-cmd-pngnq-program, image-dired-cmd-pngnq-options)
(image-dired-cmd-pngcrush-program)
(image-dired-cmd-pngcrush-options)
(image-dired-cmd-optipng-program)
(image-dired-cmd-optipng-options)
(image-dired-cmd-create-standard-thumbnail-options)
(image-dired-cmd-rotate-original-program)
(image-dired-cmd-rotate-original-options)
(image-dired-temp-rotate-image-file)
(image-dired-rotate-original-ask-before-overwrite)
(image-dired-cmd-write-exif-data-program)
(image-dired-cmd-write-exif-data-options): Use above new defgroup.
2022-09-03 10:23:37 +02:00
Stefan Kangas
9f82b49398 ; image-dired: Indentation fixes
* lisp/image/image-dired-dired.el:
* lisp/image/image-dired-external.el:
* lisp/image/image-dired-tags.el:
* lisp/image/image-dired-util.el:
* lisp/image/image-dired.el: Fix indentation.
2022-09-03 10:23:37 +02:00
Stefan Kangas
64b208aa6c image-dired: Make HTML gallery generation obsolete
* lisp/image/image-dired.el (image-dired-gallery): Delete
defgroup again.
(image-dired-gallery-dir, image-dired-gallery-image-root-url)
(image-dired-gallery-thumb-image-root-url)
(image-dired-gallery-hidden-tags, image-dired-tag-file-list)
(image-dired-file-tag-list, image-dired--add-to-tag-file-lists)
(image-dired--add-to-file-comment-list)
(image-dired--create-gallery-lists, image-dired--hidden-p)
(image-dired-gallery-generate): Make obsolete.
2022-09-03 10:23:37 +02:00
Stefan Kangas
b52c3527bc image-dired: Do more interactive mode tagging
* lisp/image/image-dired-dired.el
(image-dired-dired-toggle-marked-thumbs)
(image-dired-next-line-and-display)
(image-dired-previous-line-and-display)
(image-dired-toggle-append-browsing)
(image-dired-mark-and-display-next)
(image-dired-toggle-dired-display-properties)
(image-dired-dired-next-line, image-dired-dired-previous-line)
(image-dired-create-thumbs, image-dired-display-thumbs-append)
(image-dired-display-thumb, image-dired-dired-display-external)
(image-dired-dired-display-image)
(image-dired-copy-with-exif-file-name, image-dired-mark-tagged-files)
(image-dired-dired-display-properties):
* lisp/image/image-dired-external.el
(image-dired-thumbnail-set-image-description):
* lisp/image/image-dired-tags.el (image-dired-tag-files)
(image-dired-tag-thumbnail, image-dired-delete-tag)
(image-dired-tag-thumbnail-remove)
(image-dired-dired-comment-files)
(image-dired-dired-edit-comment-and-tags):
* lisp/image/image-dired.el (image-dired-display-thumbs)
(image-dired-track-original-file)
(image-dired-toggle-movement-tracking)
(image-dired-forward-image, image-dired-backward-image)
(image-dired-line-up, image-dired-line-up-dynamic)
(image-dired-line-up-interactive)
(image-dired-thumbnail-display-external)
(image-dired-display-thumbnail-original-image)
(image-dired-rotate-original-left)
(image-dired-rotate-original-right)
(image-dired-comment-thumbnail, image-dired-delete-marked)
(image-dired-rotate-thumbnail-left)
(image-dired-rotate-thumbnail-right): Do interactive mode tagging.

* lisp/image/image-dired.el (image-dired-delete-marked): Signal error
if not in image-dired-thumbnail-mode.
2022-09-03 10:23:37 +02:00
Stefan Kangas
9b4084f4bc Split image-dired.el into several files (part 2/2)
Use a git trick to split a file while preserving line history (for
"git blame", "git log --follow", etc.):

1) Make exact copies of the original file, in the same commit as
   moving it.

2) Next, trim down the extra copies to contain only the relevant
   parts.  [this commit]

* lisp/image-dired.el:
* lisp/image/image-dired-dired.el:
* lisp/image/image-dired-external.el:
* lisp/image/image-dired-tags.el:
* lisp/image/image-dired-util.el:
* lisp/image/image-dired.el: Trim files down to keep only one copy of
each definition.
2022-09-03 10:23:37 +02:00
Stefan Kangas
0504f39259 Split image-dired.el into several files (part 1/2)
Use a git trick to split a file while preserving line history (for
"git blame", "git log --follow", etc.):

1) Make exact copies of the original file, in the same commit as
   moving it.  [this commit]

2) Next, trim down the extra copies to contain only the relevant
   parts.

* lisp/image-dired.el: Move from here...
* lisp/image/image-dired-dired.el:
* lisp/image/image-dired-external.el:
* lisp/image/image-dired-tags.el:
* lisp/image/image-dired-util.el:
* lisp/image/image-dired.el: ...to here.

* test/lisp/image-dired-tests.el: Move from here...
* test/lisp/image/image-dired-tests.el: ...to here.
2022-09-03 10:23:37 +02:00
Stefan Kangas
e13509468b Make "rlogin" method obsolete in url*.el
* lisp/url/url-about.el (url-probe-protocols): Remove "rlogin".
* lisp/url/url-gw.el (url-gateway-rlogin-host)
(url-gateway-rlogin-user-name, url-gateway-rlogin-parameters)
(url-open-rlogin): Make obsolete.  (Bug#56891)
(url-open-stream):
* lisp/url/url-misc.el (url-do-terminal-emulator): Warn when using
"rlogin".
(url-rlogin): Make obsolete.
* lisp/url/url-vars.el (url-gateway-method): Remove "rlogin"
choice.

* lisp/url/url-gw.el (url-gw-rlogin-obsolete-warned-once)
* lisp/url/url-misc.el (url-misc-rlogin-obsolete-warned-once): New
variables, immediately marked obsolete.

* doc/misc/url.texi (telnet/tn3270): Rename section from
"rlogin/telnet/tn3270".
(Gateways in general, Customization): Don't mention "rlogin"
method.
2022-09-03 07:23:08 +02:00
Stefan Kangas
f9f92772dc ; Normalize email
Don't merge to master.
2022-09-03 01:39:55 +02:00
Stefan Kangas
e96acb1007 Merge from origin/emacs-28
917da2641e Minor doc fix; improve sorting of VC backends
89695bce3e Clarify the doc string of 'set-face-attribute'
2022-09-02 23:57:18 +02:00
Stefan Monnier
c12838c73e * lisp/help-fns.el: Minor fixes
(describe-mode--minor-modes): Don't burp on minor modes that lack a docstring.
(describe-mode--minor-modes): Simplify eta-redex.
(find-lisp-object-file-name): Use `autoload-file`.
(help-fns--describe-function-or-command-prompt): Allow the user to
insist on choosing a function even if it appears not to exist.
2022-09-02 09:54:35 -04:00
Robert Pluim
513c5d827d Use format-prompt' in describe-char-fold-equivalences'
* lisp/char-fold.el (describe-char-fold-equivalences): Use `format-prompt'.
2022-09-02 15:11:50 +02:00
Lars Ingebrigtsen
965ebf3484 Fix define-minor-mode :keymap obsoletion warning
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Fix some
warning.
2022-09-02 14:58:30 +02:00
Stefan Kangas
99bf269ca0 Make minibuffer-eldef-shorten-default obsolete
* lisp/minibuf-eldef.el (minibuffer-eldef-shorten-default): Make
variable obsolete in favor of 'minibuffer-default-prompt-format'.
* doc/emacs/mini.texi (Basic Minibuffer): Delete above obsolete
variable (bug#50935).
2022-09-02 14:51:27 +02:00
Lars Ingebrigtsen
9474ac1b61 Default show-paren-mode to off in special-mode buffers
* doc/emacs/programs.texi (Matching): Mention the new user option.

* doc/misc/efaq.texi (Matching parentheses): Adjust text to the
current state of affairs.

* lisp/paren.el (show-paren-function): New user option (bug#50894).
(show-paren-mode): Mention it.
(show-paren-function): Use it.
2022-09-02 14:23:15 +02:00
Lars Ingebrigtsen
3de942542a Clean up ispell "look"-related variables
* lisp/textmodes/ispell.el (ispell-look-p): Make obsolete.
(ispell-lookup-words): Look up the look command at run time
instead (bug#50852).
(ispell-have-new-look): Make obsolete.
(ispell-look-options): Adjust.  Apparently the version of "look"
that had a "-r" (regexp interface) never took off -- it's not
present in GNU/Linux or Macos, at least, as far as we can tell.
2022-09-02 13:34:55 +02:00
Lars Ingebrigtsen
f84c45054a Fix quotes in mailcap-add-mailcap-entry doc string
* lisp/net/mailcap.el (mailcap-add-mailcap-entry): Fix usage of
quotes.
2022-09-02 12:09:59 +02:00
Felix Dietrich
1a2b3fde44 Restructure ‘mailcap-add-mailcap-entry’
* lisp/net/mailcap.el (mailcap-add-mailcap-entry):
Restructure mailcap-add-mailcap-entry to improve readability.
2022-09-02 12:09:59 +02:00
Robert Pluim
865338150e Use frame-monitor-attributes in gamegrid
* lisp/play/gamegrid.el (gamegrid-calculate-glyph-size): Use
`frame-monitor-attributes' to get the frame attributes directly
instead of iterating over `display-monitor-attributes-list'.
2022-09-02 11:36:10 +02:00
Robert Pluim
0ec831b91c Make single char entry easier for `describe-char-fold-equivalences'
* lisp/char-fold.el (describe-char-fold-equivalences): Improve
docstring.  Pass t for 'allow-single' arg in call to
`read-char-by-name' so that single characters can be entered directly.
2022-09-02 10:56:59 +02:00
Robert Pluim
b1c08a9581 Allow easy entry of single chars in `read-char-by-name'
* lisp/international/mule-cmds.el (read-char-by-name): Add optional
'allow-single' argument, meaning to accept single chars as themselves.
2022-09-02 10:56:59 +02:00
Fabrice Bauzac-Stehly
6ffc091e17 ldap-host-parameters-alist: Add auth-source option
* lisp/net/ldap.el (ldap-host-parameters-alist): Add auth-source
to checklist.
2022-09-02 00:28:00 -04:00
Jim Porter
4db596d316 Under no-X builds, allow any value for 'fringe-bitmap' options
* lisp/cus-edit (fringe-bitmap): Always match under no-X.
2022-09-01 18:34:45 -07:00
Lars Ingebrigtsen
119d59531e Make easy-mmode-define-keymap obsolete
* lisp/emacs-lisp/easy-mmode.el (easy-mmode-define-keymap): Make
obsolete.
(define-minor-mode): Add comment.
2022-09-01 13:42:19 +02:00
Lars Ingebrigtsen
8bb5c1bfec Make easy-mmode-defmap obsolete and adjust only caller
* lisp/emacs-lisp/easy-mmode.el (easy-mmode-defmap): Make obsolete.
* lisp/progmodes/gud.el (gud-menu-map): Use easy-menu-define.
2022-09-01 13:39:14 +02:00
Lars Ingebrigtsen
d029ec8d76 Fix outline-minor-mode-map
* lisp/outline.el (outline-minor-mode): Avoid using
easy-mmode-define-keymap, since it doesn't handle :inherit
correctly (bug#57512).
2022-09-01 12:24:17 +02:00
Daanturo
f0319cd86f Make file-parent-directory more efficient
* lisp/files.el (file-parent-directory): Use equal instead of
file-equal-p to compare the found parent and the child
(bug#56355).  This is much faster.
2022-09-01 12:08:05 +02:00
Stefan Kangas
80c5327195 Make some versions in docs match package version
* doc/emacs/misc.texi (Interactive Shell): Bump Emacs version.
* doc/misc/ediff.texi:
* doc/misc/flymake.texi:
* doc/misc/viper.texi: Fix version to match package.
* lisp/emulation/viper.el: Make version match variable.
2022-09-01 11:12:06 +02:00
Eli Zaretskii
89695bce3e Clarify the doc string of 'set-face-attribute'
* lisp/faces.el (set-face-attribute): Clarify the issue with
resetting attribute values to 'unspecified' for future frames.
(Bug#57499)
2022-09-01 11:42:33 +03:00
Stefan Kangas
0bd860cc2e Merge from origin/emacs-28
8807a4f532 Enable 256 colors in fbterm.
bbc23ca8ab One more fix for find-file.el
0cbcaf5119 ; Yet another doc fix for 'ff-other-file-alist' (bug#57325)
2d9a391727 Recommend using fbterm in the Linux console.
a5a92e577c ; * src/window.c (syms_of_window) <window-point-insertion-...
4d52fe6b96 * lisp/find-file.el (ff-other-file-alist): Doc fix.  (Bug#...
d111b5b651 * lisp/info.el (Info-mode): Support the Linux console better.
cc945ec0ed ; Fix doc strings in latin1-disp.el
195fcc932e Improve the documentation of glyphless-character display
72ae02377e ; * lisp/jit-lock.el (jit-lock-chunk-size): Doc fix.
3fb69fad49 Fix documentation of 'glyphless-char-display'

# Conflicts:
#	lisp/international/characters.el
#	src/xdisp.c
2022-09-01 06:17:37 +02:00
Stefan Kangas
f44c4e49b7 ; Auto-commit of loaddefs files. 2022-09-01 05:10:19 +02:00
Stefan Kangas
2862891387 ; Auto-commit of loaddefs files. 2022-09-01 05:07:06 +02:00
Alan Mackenzie
71b7ad0cf7 C++ Mode: Fontify functions correctly with commas in template expressions
This fixes bug #57318.

Also apply an optimization which marks generic expressions as already
analyzed, thus avoiding repeating this analysis when not needed.  This
optimization prevents the fix slowing down scrolling when the C++ source has
lots of template structures.

* lisp/progmodes/cc-engine.el (top-level) Near the beginning of the file, add
a comment describing the new text property c-<>-c-types-set.
(c-update-brace-stack): Bind c-restricted-<>-arglists to nil rather than t
around the call to c-forward-<>-arglist.
(c-forward-<>-arglist-recur): Allow the abbreviated analysis of a generic
expression also when the opening < is marked with a c-<>-c-types-set text
property.  Set this property at the same time as the c-type properties are set
on the commas inside the template structure.

* lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare): Clear the
c-<>-c-types-set text property, along with c-type, from the region being
fontified.
2022-08-31 18:46:06 +00:00
Robert Pluim
dbfe57472e Fix describe-char-fold-equivalences for composed characters
* lisp/char-fold.el (describe-char-fold-equivalences): Map
`get-char-code-property' across all the component codepoints of the
equivalent character rather than just the first one.
2022-08-31 18:38:04 +02:00
ookami
bdcc61247a Fix semantic-find-file-noselect binding of recentf-exclude
* lisp/cedet/semantic/fw.el (semantic-find-file-noselect):
recentf-exclude should be a list (bug#57489).

Copyright-paperwork-exempt: yes
2022-08-31 12:11:43 +02:00
Stefan Monnier
a28ede3a61 t-mouse.el: Make sure we apply the setting to new terminals
* lisp/t-mouse.el (gpm-mouse-tty-setup): New function.
(gpm-mouse-mode): Use it as well as `tty-setup-hook`.
* lisp/term/linux.el (terminal-init-linux): Remove gpm-specific code,
not neded any more.
2022-08-30 17:55:03 -04:00
Gregory Heytings
8807a4f532 Enable 256 colors in fbterm.
* lisp/term/fbterm.el: New file.

* doc/misc/efaq.texi (Emacs in a Linux console): Document the TERM
environment variable with which the new file is used.
2022-08-30 23:08:05 +02:00
Stefan Kangas
1feec84b0f ; Minor doc fix in Viper
* lisp/emulation/viper-macs.el (viper-repeat-from-history-key):
Minor doc fix.
2022-08-30 21:31:17 +02:00
Stefan Kangas
292703d64b ; * lisp/doc-view.el (doc-view): Fix punctuation. 2022-08-30 19:35:25 +02:00
Eli Zaretskii
e1c4ed9a3e ; Improve doc string of 'describe-char-fold-equivalences'
* lisp/char-fold.el (describe-char-fold-equivalences): Autoload
it.  Doc fix.
2022-08-30 20:20:40 +03:00
Juri Linkov
7804536e4e Fix 744ed0ceee from bug#57082 (bug#57176)
* lisp/outline.el (outline-minor-mode-highlight-buffer): Handle 'append'.
(outline-minor-mode): Call outline--fix-up-all-buttons when font-lock is used.

* lisp/textmodes/emacs-news-mode.el (emacs-news--mode-common): Fix regexp.
2022-08-30 20:09:20 +03:00
Eli Zaretskii
bbc23ca8ab One more fix for find-file.el
* lisp/find-file.el (ff-get-file-name): Use 'expand-file-name'
instead of 'concat', which doesn't DTRT with absolute file names.
(ff-other-file-alist): Yet another doc fix.  (Bug#57325)
2022-08-30 19:09:00 +03:00
Eli Zaretskii
0cbcaf5119 ; Yet another doc fix for 'ff-other-file-alist' (bug#57325) 2022-08-30 15:42:34 +03:00
Lars Ingebrigtsen
57ba65e047 Fix char-fold compilation warning
* lisp/char-fold.el (require): Get string-join definition.
2022-08-30 10:53:11 +02:00
Juri Linkov
a998591522 * lisp/char-fold.el (describe-char-fold-equivalences): New command.
(char-fold--no-regexp): New internal variable.
(char-fold--make-table): Use it to skip translation to regexp.
Suggested by Robert Pluim <rpluim@gmail.com>.
https://lists.gnu.org/archive/html/emacs-devel/2022-07/msg00864.html
2022-08-30 10:28:34 +03:00
Jim Porter
f9250c5ebc Handle 'eshell-pipe-broken' when evaluating Lisp forms in Eshell
* lisp/eshell/esh-cmd.el (eshell-exec-lisp): Handle
'eshell-pipe-broken'.

* lisp/eshell/esh-io.el (eshell-output-object-to-target): Only signal
'eshell-pipe-broken' if the process being written to has finished.

* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/pipeline-connection-type/middle)
(esh-proc-test/pipeline-connection-type/last): Remove ':unstable'.

Ref: https://lists.gnu.org/archive/html/emacs-devel/2022-08/msg00524.html
2022-08-29 20:16:31 -07:00
Stefan Kangas
9f692bcd84 Improve point-at-{bol,eol} obsoletion message
* lisp/subr.el (point-at-eol, point-at-bol): Mention 'pos-eol' and
'pos-bol' in obsoletion message.
2022-08-29 19:26:39 +02:00
Jake Moss
df62a3f85a Show gdb-mi disassembly over tramp
* lisp/progmodes/gdb-mi.el (gdb-invalidate-disassembly): Show
gdb-mi disassembly over tramp (bug#57464).

Copyright-paperwork-exempt: yes
2022-08-29 17:23:46 +02:00
Lars Ingebrigtsen
46a49b748e Work around `&' dired command when using the fish shell
* lisp/dired-aux.el (dired-shell-stuff-it): Add a space before
&wait; this apparently makes the `&' command work with the fish
shell (bug#57472).
2022-08-29 17:15:17 +02:00
Eli Zaretskii
4d52fe6b96 * lisp/find-file.el (ff-other-file-alist): Doc fix. (Bug#57325) 2022-08-29 17:02:46 +03:00
Eli Zaretskii
6f57cb6d81 Fix point adjustment in recreated *Messages* buffers
* lisp/startup.el (normal-top-level): Move setting of
'window-point-insertion-type' from here...
* lisp/simple.el (messages-buffer-mode): ...to here.  This is so
any *Messages* buffers we create instead of the original one, if
it's killed, will have the same type of the window-point marker.
(Bug#57466)
2022-08-29 16:52:07 +03:00
Michael Albinus
19ec23e82c Do not connect unreachable remote hosts in recentf
* lisp/recentf.el (recentf-expand-file-name): Protect against
stalled remote hosts.  (Bug#57336)
2022-08-29 12:05:02 +02:00
Juri Linkov
78698e9211 'C-c C-d' on vc-log buffer shows the diff from 'vc-log-fileset' (bug#52349)
* lisp/vc/log-edit.el (log-edit-diff-fileset): New function.

* lisp/vc/vc-dispatcher.el (vc-log-edit): Set log-edit-diff-function to
log-edit-diff-fileset instead of vc-diff.

* lisp/vc/vc.el (vc-diff): New optional arg ‘fileset’.
If non-nil, use instead of vc-deduce-fileset.
2022-08-28 22:44:52 +03:00
Juri Linkov
4803fba487 'C-x v v' on a diff buffer commits it as a patch (bug#52349)
* lisp/vc/diff-mode.el (diff-vc-deduce-fileset): New function.

* lisp/vc/log-edit.el (log-edit-diff-patch): New function.

* lisp/vc/vc-dispatcher.el (vc-log-edit): Set log-edit-diff-function
to log-edit-diff-patch when vc-patch-string is non-nil.
(vc-start-logentry): New optional arg 'patch-string'.
Set buffer-local 'vc-patch-string' to 'patch-string'.
(vc-dispatcher-browsing): Add (derived-mode-p 'diff-mode).

* lisp/vc/vc-git.el (vc-git-checkin-patch): New function.
(vc-git-checkin): When vc-git-patch-string is non-nil,
use `git apply --cached` to add the patch to the index,
then commit the staged changes.

* lisp/vc/vc.el: New backend function 'checkin-patch'.
(vc-deduce-fileset-1): Call diff-vc-deduce-fileset in diff-mode.
(vc-next-action): For model 'patch' call vc-checkin with the
diff buffer string.
(vc-checkin): New optional arg 'patch-string'.
Call backend function 'checkin-patch' when 'patch-string' is non-nil.
Call vc-start-logentry with 'patch-string'.
(vc-diff-patch-string): New function.
2022-08-28 22:38:51 +03:00
Juri Linkov
35af917f18 Revert parts of 3f076a8e44 that caused test failures
* lisp/simple.el (line-move-finish):
* lisp/window.el (scroll-command--goto-goal-column):
Revert back to using truncate-partial-width-windows instead of
truncated-partial-width-window-p.  This change caused test failures
in lisp/ls-lisp-tests.log and lisp/emacs-lisp/edebug-tests.log.
2022-08-28 22:13:45 +03:00
Eli Zaretskii
d111b5b651 * lisp/info.el (Info-mode): Support the Linux console better. 2022-08-28 14:42:07 +03:00
Eli Zaretskii
df2f6fb7fc ; Autoload 'latin1-display-ucs-per-lynx'
* lisp/international/latin1-disp.el (latin1-display-ucs-per-lynx):
Autoload it, since we autoload 'latin1-display'.
2022-08-28 08:57:13 +03:00
Eli Zaretskii
cc945ec0ed ; Fix doc strings in latin1-disp.el
* lisp/international/latin1-disp.el (latin1-display-ucs-per-lynx)
(latin1-display): Doc fix.
2022-08-28 08:51:09 +03:00
Eli Zaretskii
195fcc932e Improve the documentation of glyphless-character display
* lisp/international/characters.el (glyphless-char-display-control):
* src/xdisp.c (syms_of_xdisp) <glyphless-char-display>: Mention
the 'glyphless-char' face in the doc string.

* doc/lispref/display.texi (Glyphless Chars): Index
'glyphless-char' face.
2022-08-28 08:40:25 +03:00
Juri Linkov
3f076a8e44 Use truncated-partial-width-window-p in more places (bug#56815)
* lisp/simple.el (line-move, line-move-finish):
Use truncated-partial-width-window-p.

* lisp/window.el (count-screen-lines, scroll-command--goto-goal-column):
Use truncated-partial-width-window-p.
(truncated-partial-width-window-p): Replace window-width with
window-total-width.

* src/indent.c (scan_for_column): Bring the logic of using
truncated-partial-width-window-p closer to what the display engine does.
2022-08-27 22:52:03 +03:00
Juri Linkov
0ab49d46dd Use a list of text properties to search in symlink filenames in Wdired
* lisp/dired-aux.el (dired-isearch-search-filenames):
Use text properties 'dired-filename' and 'dired-symlink-filename'.

* lisp/dired.el (dired-font-lock-keywords): Add text property
'dired-symlink-filename' on symlinks.

* lisp/isearch.el (isearch-search-fun-in-text-property):
Support a list of text properties (bug#57293).
2022-08-27 22:43:40 +03:00
Lars Ingebrigtsen
f427b985a1 Make dynamic info-lookup more backwards-compatible
* lisp/info-look.el (info-lookup--expand-info): Don't try to
expand elements that aren't functions (bug#57446).
2022-08-27 15:44:12 +02:00
Eli Zaretskii
72ae02377e ; * lisp/jit-lock.el (jit-lock-chunk-size): Doc fix. 2022-08-27 14:24:59 +03:00
Eli Zaretskii
a2d62456a7 Fix regression with cursor motion in Magit buffers
* lisp/simple.el (line-move): Condition movement optimizations on
presence of very long lines.  (Bug#57433)
2022-08-27 14:06:15 +03:00