Skip to content

Commit 5c21832

Browse files
committed
Merge from origin/emacs-26
b0da915 (origin/emacs-26, emacs-26) Fix a typo in ELisp manual 400907b Add option to disable help completion autoloading (Bug#28607) 122ba16 Don't segfault on force-window-update of deleted window 015b12e Fix typo in ELisp manual eadf044 Remove repeated function call in picture.el 1228a90 ; Fix mm-destroy-parts docstring typo 6cfd68d Fix Hideshow key binding typo in Emacs manual
2 parents d99f0c6 + b0da915 commit 5c21832

File tree

10 files changed

+57
-10
lines changed

10 files changed

+57
-10
lines changed

doc/emacs/building.texi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,6 +1521,12 @@ library lets Emacs properly set up the hyperlinks in the @file{*Help*}
15211521
buffer). To disable this feature, change the variable
15221522
@code{help-enable-auto-load} to @code{nil}.
15231523

1524+
@vindex help-enable-completion-auto-load
1525+
Automatic loading also occurs when completing names for
1526+
@code{describe-variable} and @code{describe-function}, based on the
1527+
prefix being completed. To disable this feature, change the variable
1528+
@code{help-enable-completion-auto-load} to @code{nil}.
1529+
15241530
@vindex load-dangerous-libraries
15251531
@cindex Lisp files byte-compiled by XEmacs
15261532
By default, Emacs refuses to load compiled Lisp files which were

doc/emacs/programs.texi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1298,8 +1298,11 @@ count as blocks.
12981298
@findex hs-show-block
12991299
@findex hs-show-region
13001300
@findex hs-hide-level
1301+
@findex hs-toggle-hiding
1302+
@findex hs-mouse-toggle-hiding
13011303
@kindex C-c @@ C-h
13021304
@kindex C-c @@ C-s
1305+
@kindex C-c @@ C-c
13031306
@kindex C-c @@ C-M-h
13041307
@kindex C-c @@ C-M-s
13051308
@kindex C-c @@ C-r
@@ -1312,7 +1315,7 @@ Hide the current block (@code{hs-hide-block}).
13121315
@item C-c @@ C-s
13131316
Show the current block (@code{hs-show-block}).
13141317
@item C-c @@ C-c
1315-
@itemx C-x @@ C-e
1318+
@itemx C-c @@ C-e
13161319
Either hide or show the current block (@code{hs-toggle-hiding}).
13171320
@item S-mouse-2
13181321
Toggle hiding for the block you click on (@code{hs-mouse-toggle-hiding}).

doc/lispref/loading.texi

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,11 @@ first call to the function automatically loads the proper library, in
466466
order to install the real definition and other associated code, then
467467
runs the real definition as if it had been loaded all along.
468468
Autoloading can also be triggered by looking up the documentation of
469-
the function or macro (@pxref{Documentation Basics}).
469+
the function or macro (@pxref{Documentation Basics}), and completion
470+
of variable and function names (@pxref{Autoload by Prefix} below).
470471

471472
@menu
473+
* Autoload by Prefix:: Autoload by Prefix.
472474
* When to Autoload:: When to Use Autoload.
473475
@end menu
474476

@@ -703,6 +705,25 @@ symbol's new function value. If the value of the optional argument
703705
function, only a macro.
704706
@end defun
705707

708+
@node Autoload by Prefix
709+
@subsection Autoload by Prefix
710+
@cindex autoload by prefix
711+
712+
@vindex definition-prefixes
713+
@findex register-definition-prefixes
714+
@vindex autoload-compute-prefixes
715+
During completion for the commands @code{describe-variable} and
716+
@code{describe-function}, Emacs will try to load files which may
717+
contain definitions matching the prefix being completed. The variable
718+
@code{definition-prefixes} holds a hashtable which maps a prefix to
719+
the corresponding list of files to load for it. Entries to this
720+
mapping are added by calls to @code{register-definition-prefixes}
721+
which are generated by @code{update-file-autoloads}
722+
(@pxref{Autoload}). Files which don't contain any definitions worth
723+
loading (test files, for examples), should set
724+
@code{autoload-compute-prefixes} to @code{nil} as a file-local
725+
variable.
726+
706727
@node When to Autoload
707728
@subsection When to Use Autoload
708729
@cindex autoload, when to use

doc/lispref/sequences.texi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ returned value is a list.
601601
@defun seq-mapn function &rest sequences
602602
This function returns the result of applying @var{function} to each
603603
element of @var{sequences}. The arity (@pxref{What Is a Function,
604-
sub-arity}) of @var{function} must match the number of sequences.
604+
subr-arity}) of @var{function} must match the number of sequences.
605605
Mapping stops at the end of the shortest sequence, and the returned
606606
value is a list.
607607

doc/lispref/variables.texi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2009,7 +2009,7 @@ all files in those directories. The list in @var{variables} can be of
20092009
one of the two forms: @code{(@var{major-mode} . @var{alist})} or
20102010
@code{(@var{directory} . @var{list})}. With the first form, if the
20112011
file's buffer turns on a mode that is derived from @var{major-mode},
2012-
then the all the variables in the associated @var{alist} are applied;
2012+
then all the variables in the associated @var{alist} are applied;
20132013
@var{alist} should be of the form @code{(@var{name} . @var{value})}.
20142014
A special value @code{nil} for @var{major-mode} means the settings are
20152015
applicable to any mode. In @var{alist}, you can use a special

etc/NEWS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@ after Emacs has finished initialization and is ready for use.
153153
emacs.service file to eg "~/.config/systemd/user/", you will need to copy
154154
the new version of the file again.)
155155

156+
+++
157+
** New option 'help-enable-completion-auto-load'.
158+
This allows disabling the new feature introduced in Emacs 26.1 which
159+
loads files during completion of 'C-h f' and 'C-h v' according to
160+
'definition-prefixes'.
161+
156162

157163
* Changes in Emacs 27.1
158164

lisp/gnus/mm-decode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ external if displayed external."
11111111
(mm-remove-part handle)))))))
11121112

11131113
(defun mm-destroy-parts (handles)
1114-
"Remove the displayed MIME parts represented by HANDLES."
1114+
"Destroy the displayed MIME parts represented by HANDLES."
11151115
(if (and (listp handles)
11161116
(bufferp (car handles)))
11171117
(mm-destroy-part handles)

lisp/help-fns.el

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,23 @@ and the output should go to `standard-output'.")
103103
(with-demoted-errors "while loading: %S"
104104
(load file 'noerror 'nomessage))))))
105105

106+
(defcustom help-enable-completion-auto-load t
107+
"Whether completion for Help commands can perform autoloading.
108+
If non-nil, whenever invoking completion for `describe-function'
109+
or `describe-variable' load files that might contain definitions
110+
with the current prefix. The files are chosen according to
111+
`definition-prefixes'."
112+
:type 'boolean
113+
:group 'help
114+
:version "26.3")
115+
106116
(defun help--symbol-completion-table (string pred action)
107-
(let ((prefixes (radix-tree-prefixes (help-definition-prefixes) string)))
108-
(help--load-prefixes prefixes))
117+
(when help-enable-completion-auto-load
118+
(let ((prefixes (radix-tree-prefixes (help-definition-prefixes) string)))
119+
(help--load-prefixes prefixes)))
109120
(let ((prefix-completions
110-
(mapcar #'intern (all-completions string definition-prefixes))))
121+
(and help-enable-completion-auto-load
122+
(mapcar #'intern (all-completions string definition-prefixes)))))
111123
(complete-with-action action obarray string
112124
(if pred (lambda (sym)
113125
(or (funcall pred sym)

lisp/textmodes/picture.el

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,6 @@ Leaves the region surrounding the rectangle."
623623

624624
(defvar picture-mode-map
625625
(let ((map (make-keymap)))
626-
(define-key map [remap self-insert-command] 'picture-self-insert)
627626
(define-key map [remap self-insert-command] 'picture-self-insert)
628627
(define-key map [remap completion-separator-self-insert-command]
629628
'picture-self-insert)

src/window.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4089,7 +4089,7 @@ displaying that buffer. */)
40894089
return Qt;
40904090
}
40914091

4092-
if (WINDOWP (object))
4092+
if (WINDOW_LIVE_P (object))
40934093
{
40944094
struct window *w = XWINDOW (object);
40954095
mark_window_display_accurate (object, false);

0 commit comments

Comments
 (0)