1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-10 16:20:17 -08:00
Commit graph

82531 commits

Author SHA1 Message Date
Stefan Kangas
e0261d4a0c * lisp/image-dired.el: Remove unnecessary 'declare-function'. 2021-11-17 11:47:49 +01:00
Lars Ingebrigtsen
cde5dcd441 Change the call signature to keymap-substitute
* lisp/keymap.el (keymap-substitute): Make the keymap the first
parameter for symmetry with the other functions.
* lisp/emacs-lisp/shortdoc.el (keymaps):
* lisp/emacs-lisp/bytecomp.el (lambda): Adjust.
2021-11-17 08:34:35 +01:00
Stefan Kangas
249095fd67 Merge from origin/emacs-28
fa0b34b716 * admin/authors.el (authors-ignored-files): Ignore some NE...
c25be3e7bb * lisp/tab-bar.el (tab-bar-select-tab): Add check for wc-f...
38d905abf9 * lisp/tab-bar.el: Doc fixes for commands bound to modifie...
2021-11-17 08:20:55 +01:00
Lars Ingebrigtsen
90ac2db9ed Make bookmark-set prompt less confusing
* lisp/bookmark.el (bookmark-set): Make the prompt less confusing
(bug#51876).
2021-11-17 08:16:58 +01:00
Lars Ingebrigtsen
8e67cf41e3 Fix mh-mime build problem
* lisp/mh-e/mh-mime.el (mh-acros): Require to get mh-dlet*.
2021-11-17 08:14:23 +01:00
Lars Ingebrigtsen
e72061c262 Fix bookmark-bmenu-mode-map syntax
* lisp/bookmark.el (bookmark-bmenu-mode-map): Fix syntax in defvar-keymap.
2021-11-17 07:04:22 +01:00
Stefan Kangas
9e79575486 Remove some references to XEmacs
* lisp/emulation/viper-cmd.el (viper-start-R-mode):
* lisp/emulation/viper-init.el (viper-window-display-p):
* lisp/emulation/viper-mous.el (viper-surrounding-word):
* lisp/mail/footnote.el (footnote-mode):
* lisp/textmodes/reftex-index.el: Remove some comments referring to
XEmacs.
2021-11-17 06:25:50 +01:00
Stefan Kangas
3be2a6b8b4 Make mh-funcall-if-exists obsolete
* lisp/mh-e/mh-acros.el (mh-funcall-if-exists): Make obsolete.
* lisp/mh-e/mh-alias.el (mh-read-address):
* lisp/mh-e/mh-folder.el (mh-folder-mode):
* lisp/mh-e/mh-mime.el (mh-mm-display-part):
* lisp/mh-e/mh-show.el (mh-defun-show-buffer):
* lisp/mh-e/mh-speed.el (mh-speedbar-change-expand-button-char):
* lisp/mh-e/mh-tool-bar.el (mh-tool-bar-define):
* lisp/mh-e/mh-utils.el (mh-logo-display):
* lisp/mh-e/mh-xface.el (mh-face-display-function): Don't use
above obsolete macro.
2021-11-17 06:05:12 +01:00
Stefan Kangas
0fd79ee039 Convert keymaps in bookmark.el to defvar-keymap
* lisp/bookmark.el (bookmark-map)
(bookmark-minibuffer-read-name-map)
(bookmark-edit-annotation-mode-map, bookmark-bmenu-mode-map):
Convert to defvar-keymap.
2021-11-17 05:49:05 +01:00
Stefan Monnier
1a4f210c24 * lisp/rot13.el (rot13-translate-table): Make it a translation-table
(rot13-display-table): Use `dotimes`.
2021-11-16 22:48:37 -05:00
Po Lu
2a99138f17 Update xwidget webkit history buffer more eagerly
* lisp/xwidget.el (xwidget-webkit-callback): Update history
buffer on each load-changed event.
2021-11-17 09:10:10 +08:00
Juri Linkov
c25be3e7bb * lisp/tab-bar.el (tab-bar-select-tab): Add check for wc-frame (bug#51883). 2021-11-16 22:45:33 +02:00
Juri Linkov
38d905abf9 * lisp/tab-bar.el: Doc fixes for commands bound to modifier keys.
(tab-bar-select-tab-modifiers)
(tab-bar-select-tab, tab-bar-switch-to-last-tab): Doc fixes.
2021-11-16 22:40:45 +02:00
Lars Ingebrigtsen
97c23204b9 Make keymap-unset work
* lisp/keymap.el (keymap-unset): Fix key syntax (bug#51897).
2021-11-16 19:42:09 +01:00
Michael Albinus
6e93cb0954 Some minor Tramp updates
* lisp/net/tramp-crypt.el (tramp-crypt-add-directory): Add comment.

* lisp/net/tramp.el (tramp-debug-buffer-command-completion-p)
(tramp-setup-debug-buffer): New defuns.
(tramp-get-debug-buffer): Call `tramp-setup-debug-buffer.

* test/lisp/net/tramp-tests.el (tramp-test07-abbreviate-file-name):
Extend test.
2021-11-16 15:04:27 +01:00
Po Lu
1657e0fb17 Add command to browse xwidget history
* doc/emacs/misc.texi (Embedded WebKit Widgets)
* etc/NEWS: Document `xwidget-webkit-browse-history'.

* lisp/xwidget.el (xwidget-webkit-mode-map): Bind "H" to
xwidget-webkit-browse-history.
(xwidget-webkit-import-widget): Set last session buffer correctly.
(xwidget-webkit-browse-history): New command.
(xwidget-webkit-history--session): New variable.

(xwidget-webkit-history--insert-item)
(xwidget-webkit-history-select-item)
(xwidget-webkit-history-reload): New functions.

(xwidget-webkit-history-mode): New major mode.
2021-11-16 17:39:46 +08:00
Michael Herstine
977f102a49 Make results details in ert-run-tests-batch configurable
* lisp/emacs-lisp/ert.el (ert-batch-print-length)
(ert-batch-print-level,.ert-batch-backtrace-line-length)
(ert-batch-test, ert-run-tests-interactively): Added the three
variables, bound them to these settings when formatting batch
test results including backtraces. Removed the optional
parameters output-buffer & message-fn from
ert-run-tests-interactively.
* test/lisp/emacs-lisp/ert-tests.el
(ert-test-run-tests-interactively, ert-test-run-tests-batch): use
cl-letf to capture output, new tests resp.
* test/lisp/ert-x-tests.el (ert-test-run-tests-interactively-2):
Changed to use cl-letf to capture output instead of using
message-fn.
* lisp/emacs-lisp/backtrace.el (backtrace--line-length-or-nil)
(backtrace--print-func-and-args): Fixed a bug when setting
backtrace-line-length to nil by adding a new function to check
for that case & having backtrace--print-func-and-args use it.
* doc/misc/ert.texi: document the new variables & their usage
(bug#51037).
2021-11-16 08:48:24 +01:00
Lars Ingebrigtsen
331366395e Start adjusting the manuals to talk about the keymap-* functions
* lisp/dired.el (dired--make-directory-clickable):
* doc/lispref/keymaps.texi (Keymaps):
(Key Sequences):
(Prefix Keys):
(Active Keymaps):
(Key Lookup):
(Functions for Key Lookup):
(Changing Key Bindings):
(Key Binding Commands):
(Tool Bar):
* doc/lispref/commands.texi (Interactive Codes):
(Event Examples):
(Event Mod):
* doc/emacs/kmacro.texi (Save Keyboard Macro):
* doc/emacs/custom.texi (Keymaps):
(Keymaps):
(Minibuffer Maps):
(Rebinding):
(Init Rebinding):
(Modifier Keys):
(Mouse Buttons):
(Init Examples):
(Init Non-ASCII): Adjust the documentation to remove description
of the old syntaxes, and use the new keymap-* functions.

* doc/lispref/keymaps.texi (Low-Level Key Binding): New node that
describes `define-key' and the old key syntaxes.
2021-11-16 08:26:24 +01:00
Lars Ingebrigtsen
2daffe3550 Adjust defvar-keymap' and define-keymap' to the new syntax
* lisp/vc/smerge-mode.el (smerge-basic-map):
* lisp/vc/pcvs.el (cvs-mode-map):
(cvs-minor-mode-prefix):
* lisp/vc/log-view.el (log-view-mode-map):
* lisp/vc/log-edit.el (log-edit-mode-map):
* lisp/vc/diff-mode.el (diff-mode-shared-map):
(diff-minor-mode-prefix):
* lisp/vc/cvs-status.el (cvs-status-mode-map):
* lisp/simple.el (special-mode-map):
* lisp/outline.el (outline--insert-open-button):
(outline--insert-close-button):
* lisp/net/shr.el (shr-map):
* lisp/net/eww.el (eww-link-keymap):
(eww-mode-map):
(eww-submit-map):
(eww-bookmark-mode-map):
(eww-history-mode-map):
(eww-buffers-mode-map):
* lisp/mh-e/mh-speed.el (:keymap):
* lisp/mh-e/mh-show.el (:keymap):
* lisp/mh-e/mh-search.el (:keymap):
* lisp/mh-e/mh-letter.el (:keymap):
* lisp/mh-e/mh-folder.el (:keymap):
* lisp/international/emoji.el (emoji-list-mode-map):
* lisp/gnus/spam.el (:keymap):
* lisp/gnus/mml.el (mml-mode-map):
* lisp/gnus/message.el (message-mode-map):
* lisp/gnus/gnus-undo.el (gnus-undo-mode-map):
* lisp/gnus/gnus-topic.el (gnus-topic-mode-map):
* lisp/gnus/gnus-sum.el (:keymap):
* lisp/gnus/gnus-srvr.el (gnus-server-mode-map):
(gnus-browse-mode-map):
* lisp/gnus/gnus-salt.el (gnus-pick-mode-map):
(gnus-tree-mode-map):
* lisp/gnus/gnus-msg.el (:prefix):
* lisp/gnus/gnus-ml.el (gnus-mailing-list-mode-map):
* lisp/gnus/gnus-kill.el (gnus-kill-file-mode-map):
* lisp/gnus/gnus-html.el (gnus-html-displayed-image-map):
* lisp/gnus/gnus-group.el (:keymap):
* lisp/gnus/gnus-eform.el (gnus-edit-form-mode-map):
* lisp/gnus/gnus-draft.el (gnus-draft-mode-map):
* lisp/gnus/gnus-dired.el (gnus-dired-mode-map):
* lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-mode-map):
* lisp/gnus/gnus-art.el (:keymap):
(gnus-article-edit-mode-map):
* lisp/gnus/gnus-agent.el (gnus-agent-group-mode-map):
(gnus-agent-summary-mode-map):
(gnus-agent-server-mode-map):
(gnus-category-mode-map): Adjust `defvar-keymap' and
`define-keymap' to the new syntax.
2021-11-16 08:26:24 +01:00
Lars Ingebrigtsen
de477ec683 Add new 'keymap-*' functions
* lisp/keymap.el: New file with all the new keymap-* functions.

* lisp/loadup.el ("keymap"): Load.

* lisp/subr.el (kbd): Refactor out all the code to key-parse.
(define-key-after, keyboard-translate, global-set-key)
(local-set-key, global-unset-key, local-unset-key)
(local-key-binding, global-key-binding)
(substitute-key-definition): Note in doc strings that these are
legacy functions.
(define-keymap--define): Use keymap-set.

* lisp/emacs-lisp/byte-opt.el: Remove the optimizations for
defvar-keymap and define-keymap since the macros now only
understand the kbd syntax.
* lisp/emacs-lisp/bytecomp.el (byte-compile-define-keymap)
(byte-compile-define-keymap--define): Warn about invalid key
definitions in all keymap-* functions.

* lisp/emacs-lisp/shortdoc.el (keymaps): Add shortdocs form
keymap* functions.

* src/keymap.c (possibly_translate_key_sequence): Adjust callers
to key-valid-p and key-parse.
(syms_of_keymap): Adjust defs.
2021-11-16 08:26:24 +01:00
Lars Ingebrigtsen
aa4cffccac Make erc-mode noninteractive
* lisp/erc/erc.el (erc-mode): Mark it as noninteractive, because
using it from `M-x' will only lead to problems (bug#51841).
2021-11-16 08:26:24 +01:00
Stefan Kangas
e0abd83b49 Merge from origin/emacs-28
e852822f3d Fix removal of fringe marks of deleted bookmarks
b418aad85a * lisp/repeat.el (repeat-echo-message): Bind message-log-m...
fe2ac7cb7c * lisp/repeat.el (describe-repeat-maps): Use help-fns--ana...
c840bfe7e1 * lisp/repeat.el: Detect changes in the minibuffer state (...
5044151486 Avoid segfaults due to freed face cache
199e2468d3 Doc fix; change recommended file name of custom-file
2021-11-16 07:18:19 +01:00
Mike Kupfer
d89d5e0f94 Fix handling of folder "+/" in MH-E
* lisp/mh-e/mh-utils.el (mh-sub-folders): Fix handling of "+/".
* test/lisp/mh-e/mh-utils-tests.el
(mh-folder-completion-function-08-plus-slash)
(mh-folder-completion-function-09-plus-slash-tmp):
Fix errors made importing tests from mh-unit.el; remove declaration
that these tests are expected to fail.
2021-11-15 22:03:54 -08:00
Mike Kupfer
cb0aa89bcf Fix checkdoc complaints in MH-E
* lisp/mh-e/mh-compat.el (mh-flet): Rewrite most of the docstring.
(mh-write-file-functions): Remove trailing space.
* lisp/mh-e-mh-scan.el (mh-scan-cmd-note-width): Break up a
line that was too long.
2021-11-15 21:59:48 -08:00
Po Lu
a17e3976a8 Fix xwidget isearch for queries that look like format strings
* lisp/xwidget.el (xwidget-webkit-isearch--update): Give special
treatment to messages.
2021-11-16 09:32:37 +08:00
Eli Zaretskii
e852822f3d Fix removal of fringe marks of deleted bookmarks
* lisp/bookmark.el (bookmark--remove-fringe-mark): The fringe
overlay is at BOL, not at POS.  (Bug#51233)
2021-11-15 20:20:30 +02:00
Juri Linkov
b418aad85a * lisp/repeat.el (repeat-echo-message): Bind message-log-max to nil.
Don't insert messages about repeatable keys in the *Messages* buffer.
2021-11-15 19:53:29 +02:00
Robert Pluim
fe2ac7cb7c * lisp/repeat.el (describe-repeat-maps): Use help-fns--analyze-function.
Print keys bound to commands in every keymap (bug#49265)
2021-11-15 19:50:30 +02:00
Juri Linkov
c840bfe7e1 * lisp/repeat.el: Detect changes in the minibuffer state (bug#47566)
(repeat--prev-mb): New internal variable.
(repeat-post-hook): Check the property 'repeat-map' on the symbol
from 'this-command' in addition to 'real-this-command'.  Don't allow
repeatable maps in the activated minibuffer or in the minibuffer
from another command.  Set 'repeat--prev-mb' at the end.
2021-11-15 19:39:37 +02:00
Michael Albinus
5b250ca79b Fix minor problems resulting from Tramp regression tests
* 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-sshfs.el (tramp-sshfs-file-name-handler-alist):
Add comment.

* lisp/net/tramp-cache.el (tramp-flush-file-upper-properties):
FILE can be "~".

* lisp/net/tramp.el ('tramp-ensure-dissected-file-name):
Add `tramp-suppress-trace' property.
(tramp-get-debug-buffer): Add local key for debugging.
(tramp-handle-abbreviate-file-name): Adapt implementation.

* test/lisp/net/tramp-tests.el
(tramp-test07-abbreviate-file-name):
Adapt test.
(tramp-test17-insert-directory-one-file)
(tramp--test-check-files): Use proper `no-dir' argument for
`dired-get-filename'.
2021-11-15 17:50:15 +01:00
Jim Porter
bf505a63f9 Support abbreviating home directory of Tramp filenames
* doc/lispref/files.texi (Magic File Names): Mention
'abbreviate-file-name' in the list of magic file name handlers.

* etc/NEWS: Announce the change.

* lisp/files.el (file-name-non-special):
* lisp/net/tramp.el (tramp-file-name-for-operation):
* 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-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add 'abbreviate-file-name'.

* lisp/files.el (directory-abbrev-make-regexp):
(directory-abbrev-apply): New functions.
(abbreviate-file-name): Check for file name handler.

* test/lisp/net/tramp-tests.el (tramp-test07-abbreviate-file-name):
New test.
2021-11-15 13:33:07 +01:00
Stefan Kangas
199e2468d3 Doc fix; change recommended file name of custom-file
* lisp/cus-edit.el (custom-file): Change file name recommendation to
match Info node '(emacs) Saving Customizations'.
2021-11-15 11:00:37 +01:00
Lars Ingebrigtsen
2a3c8f3d2e Fix outline-cycle-buffer issue in `C-h b' buffers
* lisp/outline.el (outline--fix-up-all-buttons): Fix issue when
called after collapsing a buffer (bug#51855).
2021-11-15 07:38:21 +01:00
Lars Ingebrigtsen
6aeaf12551 Allow mm-external-terminal-program to be a list of strings
* doc/misc/emacs-mime.texi (Display Customization): Document it.

* lisp/gnus/mm-decode.el (mm-external-terminal-program): Allow
being a list.
2021-11-15 07:38:21 +01:00
Basil L. Contovounesios
a7c9695835 Fix handling of changed prefix keys in tutorial
* lisp/tutorial.el (tutorial--find-changed-keys): Use keymapp to
detect prefix definitions rather than hard-coding them.  A notable
omission from the hard-coded list was mode-specific-command-prefix,
whose subcommands are often rebound (bug#40725).
2021-11-15 07:38:21 +01:00
Stefan Kangas
e7d64300aa Merge from origin/emacs-28
044dd1e210 * rcirc.el (rcirc-define-command): Fix interactive-spec ge...
2021-11-15 07:00:24 +01:00
Stefan Kangas
fba537cebc Merge from origin/emacs-28
85ac0efe7c Fix semantic-symref-perform-search doc string
2021-11-15 07:00:24 +01:00
Philip Kaludercic
044dd1e210 * rcirc.el (rcirc-define-command): Fix interactive-spec generation
* rcirc.el (rcirc-define-command):  Wrap interactive spec in a list call.
2021-11-14 19:41:31 +01:00
Juri Linkov
e6df5a32d0 * lisp/tab-line.el (tab-line-mode): Preserve existing value of tab-line-format
Keep the old value of tab-line-format when enabling tab-line-mode
and don't overwrite it with nil when disabling tab-line-mode (bug#51830).
2021-11-14 20:35:42 +02:00
Lars Ingebrigtsen
97059bcdff Fix `C-h k' in gnus-article-mode (don't merge)
* lisp/gnus/gnus-art.el (gnus-article-describe-key):
(gnus-article-describe-key-briefly): Fix `describe-key' calling
convention (bug#51796).
2021-11-14 18:49:22 +01:00
Eli Zaretskii
d75ba220e0 ; Revert "* lisp/progmodes/python.el (python-forward-sexp-function): :version fix."
This reverts commit e6e29b4352.
The commit was a mistake.
2021-11-14 19:42:37 +02:00
Eli Zaretskii
e6e29b4352 ; * lisp/progmodes/python.el (python-forward-sexp-function): :version fix. 2021-11-14 18:58:57 +02:00
Daniel Martín
85ac0efe7c Fix semantic-symref-perform-search doc string
* lisp/cedet/semantic/symref/cscope.el (semantic-symref-perform-search):
Fix the docstring to refer to the correct tool (bug#51846).
2021-11-14 15:30:58 +01:00
Michael Albinus
8aba549263 Improve Tramp error handling
* doc/misc/tramp.texi (Frequently Asked Questions): Add another
`remote-file-error'.

* lisp/net/tramp.el (tramp-find-foreign-file-name-handler):
Improve error handling.
2021-11-14 14:41:58 +01:00
Eli Zaretskii
5660ae795b Merge from origin/emacs-28
5dbad52 gnus-summary-line-format doc string clarification
d4536ff Fix follow-scroll-down in a small buffer which starts slightl...
2021-11-14 15:02:43 +02:00
Lars Ingebrigtsen
06632fbaf8 Fix previous -responsible-p change
* lisp/vc/vc-sccs.el (vc-sccs-responsible-p):
* lisp/vc/vc-rcs.el (vc-rcs-responsible-p):
* lisp/vc/vc-cvs.el (vc-cvs-responsible-p): Make the previous
change work with relative file names, too.
2021-11-14 09:41:22 +01:00
Lars Ingebrigtsen
5dbad52cbf gnus-summary-line-format doc string clarification
* lisp/gnus/gnus.el (gnus-summary-line-format): Clarify the Date
part of the doc string (bug#51823).
2021-11-14 04:54:48 +01:00
Lars Ingebrigtsen
e29c9308b1 Fix `C-h k' in gnus-article-mode
* lisp/gnus/gnus-art.el (gnus-article-describe-key):
(gnus-article-describe-key-briefly): Fix `describe-key' calling
convention (bug#51796).
2021-11-14 02:46:38 +01:00
Lars Ingebrigtsen
ad442b8887 Make all vc-*-responsible-p functions return a string
* lisp/vc/vc-sccs.el (vc-sccs-responsible-p):
* lisp/vc/vc-rcs.el (vc-rcs-responsible-p):
* lisp/vc/vc-dav.el (vc-dav-responsible-p):
* lisp/vc/vc-cvs.el (vc-cvs-responsible-p): Return a file name
instead of t when we get a match (which is what
vc-backend-for-registration expects) (bug#51800).
2021-11-14 02:38:48 +01:00
Kévin Le Gouguec
48ffbcf7eb Fix customization group of python-forward-sexp-function
* lisp/progmodes/python.el (python-forward-sexp-function): Move from
the "Flymake integration" subsection to the "Navigation" subsection,
so that the option is sorted into the 'python' group rather than the
'python-flymake' group (bug#51807).
2021-11-14 02:30:06 +01:00