* doc/emacs/text.texi (Outline Mode): Remove outline-minor-mode-use-margins.
Document the values insert/in-margins of outline-minor-mode-use-buttons.
* lisp/help.el (describe-bindings):
Set outline-minor-mode-use-buttons to 'insert'.
* lisp/textmodes/emacs-news-mode.el (emacs-news--mode-common):
Set outline-minor-mode-use-buttons to 'in-margins'.
* lisp/outline.el (outline-minor-mode-use-buttons): Change :type
from 'buffer-predicate' to choice of const values nil/in-margins/t.
(outline--use-buttons, outline-minor-mode-insert-buttons)
(outline-minor-mode-use-margins, outline--use-margins): Remove variables.
(outline-minor-mode-highlight-buffer): Change overlay name
'outline-overlay' to 'outline-highlight'.
(outline-minor-mode): Simplify to handle possible values of
'outline-minor-mode-use-buttons' instead of using many variables.
(outline--make-button-overlay): Use value 'insert' of
'outline-minor-mode-use-buttons'.
(outline--insert-open-button, outline--insert-close-button)
(outline--fix-up-all-buttons, outline--fix-buttons-after-change):
Handle values of outline-minor-mode-use-buttons instead of using
many variables.
(outline--make-button-overlay, outline--insert-open-button)
(outline--insert-close-button): Insert button when
outline-minor-mode-insert-buttons is non-nil, otherwise
put an overlay with before-string. (bug#57813)
* lisp/help.el (describe-bindings): Set buffer-local
outline-minor-mode-insert-buttons to t.
* lisp/textmodes/emacs-news-mode.el (emacs-news--mode-common):
Set buffer-local outline-minor-mode-use-margins to t. Don't set
outline-regexp for leading spaces because now spaces are not added
in the NEWS buffer.
The previous change forgot to account for the (rare) case of doing a
lookup for a global binding when a specific keymap is in force.
* lisp/help.el (substitute-command-keys): Redo lookup in global map if
lookup in specific map fails.
*
test/lisp/help-tests.el (help-tests-substitute-command-keys/keymap-change):
Add testcase for specific map overriding advertised-binding.
Previously
(substitute-command-keys "\\<undo-repeat-map>\\[undo]")
would use the global advertised-binding for `undo', even though
there's a binding in `undo-repeat-map', which is highly
counter-intuitive. Now the binding is looked up in the specified
keymap first.
* lisp/help.el (substitute-command-keys): Restrict the initial key
lookup to the specified keymap (if there is one). (Bug#51384)
This fixes a bug with warning about obsolete commands in
`command-execute', where we incorrectly showed empty parenthesis
instead of the empty string when there was no keybinding for the new
command.
* lisp/help.el (help--key-description-fontified): Return nil instead
of the empty string if KEYS argument is nil.
* test/lisp/help-tests.el (help--key-description-fontified): New test.
(with-substitute-command-keys-test): Fix indentation.
* lisp/help.el (substitute-command-keys): Add help-key-binding face to
mouse buttons in literal key substitutions.
* test/lisp/help-tests.el
(help-tests-substitute-command-keys/literal-key-sequence): Expand
test for above change.
* lisp/help.el (describe-bindings): Don't force buttons on
(bug#56691).
* lisp/outline.el (outline-minor-mode-use-buttons): Default
buttons on in special-mode buffers.
* lisp/outline.el (outline-minor-mode-buttons): Remove.
(outline-open, outline-close): New icons.
(outline-minor-mode-highlight-buffer): Use the new predicate to
switch on/off.
(outline--make-button): Remove.
(outline--make-button-overlay): Use icons.el instantiation.
(outline--valid-emoji-p): Remove.
(outline--valid-char-p): Remove.
(outline--insert-open-button, outline--insert-close-button): Make
point movement better in *Help* buffers.
b4067394dc Set `default-directory' of Tramp archive connection buffer
2529e82002 ; * doc/lispref/functions.texi (Declare Form): Fix typo.
54c4ceb009 Update the documentation of 'declare' forms
7263631dca Fix bookmark support for Help functions in native-compilat...
# Conflicts:
# lisp/help.el
* lisp/help.el (describe-key--helper, describe-function--helper):
New helper functions.
(describe-key): Call 'describe-key--helper' instead of a
lambda-function.
* lisp/help-fns.el (describe-function): Call
'describe-function--helper' instead of a lambda-function.
(Bug#56643)
* lisp/help.el (substitute-command-keys): Remove dead branch;
where-is-internal will follow any remaps for us. Note also that the
test case for remapping still pass.
It would be backwards-incompatible to error out on invalid literal key
substitutions. Consider this docstring fragment, where "\\`" should
have been escaped but wasn't:
"Example value: \"\\(?:\\`[#.]\\)\\|\\(?:[#~]\\'\\)\"."
If we error out, we can't display this docstring at all. However, it
is clearly better to display something in such cases, even if
suboptimal, than refusing to display anything at all.
* lisp/help.el (substitute-command-keys): Don't error out on invalid
literal key substitutions: just ignore them instead.
* test/lisp/help-tests.el
(help-tests-substitute-command-keys/literal-key-sequence-errors):
Delete test.
(help-tests-substitute-command-keys/literal-key-sequence-ignore-invalid):
New test.
* lisp/help.el (substitute-command-keys): Respect 'no-face' argument
also in literal key substitutions.
* test/lisp/help-tests.el
(help-tests-substitute-key-bindings/help-key-binding-face): Rename
from help-tests-substitute-key-bindings/face-help-key-binding.
(help-tests-substitute-key-bindings/help-key-binding-no-face): New test.
* lisp/help.el (describe-map): Rework how remapped commands are
output to avoid repetitions.
They're now shown as:
C-x 4 C-o ido-display-buffer
(Remapped via <remap> <display-buffer>)
C-x 5 C-o ido-display-buffer-other-frame
(Remapped via <remap> <display-buffer-other-frame>)
C-x x i ido-insert-buffer
(Remapped via <remap> <insert-buffer>)
* lisp/help.el (describe-prefix-bindings): Say when there are no
bindings under a prefix (bug#55875), for instance in `C-c C-h' in
a buffer with no `C-c' commands.
* lisp/help.el (describe-map): Include the bindings of the
remapped commands (bug#14084).
This will result in output like this, instead of just listing the
remapped commands:
<remap> <display-buffer> ido-display-buffer
C-x 4 C-o display-buffer
<remap> <display-buffer-other-frame> ido-display-buffer-other-frame
C-x 5 C-o display-buffer-other-frame
<remap> <insert-buffer> ido-insert-buffer
C-x x i insert-buffer
<remap> <kill-buffer> ido-kill-buffer
C-x k kill-buffer
<remap> <switch-to-buffer> ido-switch-buffer
C-x b switch-to-buffer
<remap> <switch-to-buffer-other-frame> ido-switch-buffer-other-frame
C-x 5 b switch-to-buffer-other-frame
<remap> <switch-to-buffer-other-window> ido-switch-buffer-other-window
C-x 4 b switch-to-buffer-other-window
* lisp/help-mode.el (help-mode-setup): Declare obsolete.
(help-mode-finish): Ditto.
* lisp/help.el (with-help-window): Don't be a wrapper around
`with-temp-buffer-window', because that made the macro big and
difficult to understand.
(help--window-setup): Implement the relevant bits from
`with-temp-buffer-window'. Also don't clear out local variables,
because that makes things like `text-scale-mode' not work (bug#25979).
* doc/lispref/help.texi (Keys in Documentation): Document it.
* lisp/help.el (substitute-command-keys): Add an argument to
include menus in the \{...-map} output (bug#24236).
* lisp/mouse.el (mouse-double-click-time): New function to always
return a number for `double-click-time'.
* lisp/emulation/viper-mous.el (viper-multiclick-timeout):
* lisp/foldout.el (foldout-mouse-swallow-events):
* lisp/help.el (help--read-key-sequence):
* lisp/org/org-mouse.el (org-mouse-show-context-menu): Use
'mouse-double-click-time' instead of 'double-click-time'.
* src/keyboard.c (syms_of_keyboard): Mention
'mouse-double-click-time' in doc string of 'double-click-time'.
* test/lisp/mouse-tests.el (mouse-test-mouse-double-click-time):
New test.
* doc/emacs/help.texi (Help): Document it.
* lisp/help-mode.el (help-function-def--button-function): Use it.
* lisp/help-mode.el (help-goto-info): Use it.
* lisp/help.el (help-window-select): Mention it.
(help-window-keep-selected): New user option (bug#9054).
* lisp/info-look.el (info-lookup-symbol):
(info-lookup): Allow keeping the same window.
* lisp/help.el (describe-map-tree): Take an optional buffer parameter.
(describe-map): Ditto, and use it to run `lookup-key' in the
correct buffer. This fixes problems of filters being run in the
wrong buffer (bug#39149).
* src/keymap.c (Fdescribe_buffer_bindings): Pass in BUFFER to
describe-map-tree.
* lisp/help.el (view-emacs-news): Use emacs-news-view-mode.
* lisp/textmodes/emacs-news-mode.el (emacs-news-view-mode): Split
into own mode to avoid confusion.
* etc/NEWS (mode): Use emacs-news-mode.
* lisp/help.el (view-emacs-news): Use emacs-news-mode.
* lisp/textmodes/emacs-news-mode.el: New mode for editing and
viewing the Emacs NEWS file.
The dependencies between `advice`, cl-generic`, `bytecomp`, `cl-lib`,
`simple`, `help`, ... were becoming unmanageable.
Break the reliance on `advice` (which includes making sure the
compiler is not needed during the early bootstrap).
* lisp/simple.el (pre-redisplay-function): Set without using `add-function`.
* lisp/loadup.el (advice, simple): Move to after `cl-generic`.
* lisp/help.el (command-error-function): Set without using `add-function`.
(help-command-error-confusable-suggestions): Explicitly call
`command-error-default-function` instead.
* lisp/emacs-lisp/cl-macs.el (pcase--mutually-exclusive-p): Don't
optimize during early-bootstrap.
* lisp/emacs-lisp/cl-generic.el (cl--generic-lambda): Tiny simplification.
(cl-defmethod): Label the obsolescence warning as it should.
(cl--generic-compiler): New variable.
(cl--generic-get-dispatcher): Use it.
(cl--generic-prefill-dispatchers): Make freshly made dispatchers.
No longer strip positions from symbols before each use of a form, instead
relying on the low level C routines to do the right thing. Instead strip them
from miscellaneous places where this is needed. Stip them alson in
`function-put'.
Push forms onto byte-compile-form-stack and pop them "by hand" rather than by
binding the variable at each pushing, so that it will still have its data
after an error has been thrown and caught by a condition case. This gives an
source position to the ensuing error message.
* lisp/emacs-lisp/byte-run.el (byte-run--ssp-seen, byte-run--circular-list-p)
(byte-run--strip-s-p-1, byte-run-strip-symbol-positions): New functions and
variables, which together implement stripping of symbol positions. The latest
(?final) version modifies the argument in place rather than making a copy.
(function-put): Strip symbol positions from all of the arguments before doing
the `put'.
* lisp/emacs-lisp/bytecomp.el (byte-compile--form-stack): has been renamed to
byte-compile-form-stack and moved to macroexp.el.
(byte-compile-initial-macro-environment (eval-and-compile)): Replace
macroexpand-all-toplevel with macroexpand--all-toplevel.
(displaying-byte-compile-warnings): bind byte-compile-form-stack here.
(byte-compile-toplevel-file-form, byte-compile-form): Push the top level form
onto byte-compile-form-stack (whereas formally the variable was bound at each
pushing). Manually pop this from of the variable at the end of the function.
* lisp/emacs-lisp/cl-macs.el (cl-define-compiler-macro): Remove the symbol
stripping.
* lisp/emacs-lisp/comp.el (comp--native-compile): Set max-specpdl-size to at
least 5000 (previously it was 2500). Bind print-symbols-bare to t.
* lisp/emacs-lisp/macroexp.el (byte-compile-form-stack): Definition move here
from bytecomp.el for easier compilation.
(byte-compile-strip-symbol-positions and associated functions): Removed.
(macro--expand-all): push argument FORM onto byte-compile-form-stack at the
start of this function, and pop it off at the end.
(internal-macroexpand-for-load): No longer strip symbol positions. Bind
symbols-with-pos-enabled and print-symbols-bare to t.
* lisp/help.el (help--make-usage): Strip any position from argument ARG.
* src/fns.c (Fput): No longer strip symbol positions from any of the
arguments.
1821844357 Add missing K key documentation for Cangjie input methods
be860c1385 Fix manual entry of 'quit-restore-window' (Bug#52328)
35a96139df Clarify a comment in xdisp.c
6ba2f028cf Revert "Grep alias `all' shall not match parent directory"
eb9e33e238 ; * etc/NEWS: Non-nil repeat-keep-prefix is not the defaul...
538fc1d0e0 Fix mode-line display in Calendar mode
# Conflicts:
# etc/NEWS
# lisp/help.el