emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 5c21832 3/3: Merge from origin/emacs-26


From: Glenn Morris
Subject: [Emacs-diffs] master 5c21832 3/3: Merge from origin/emacs-26
Date: Wed, 22 May 2019 13:19:16 -0400 (EDT)

branch: master
commit 5c21832ae866077874fb662e49c695a7850ec22c
Merge: d99f0c6 b0da915
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    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
---
 doc/emacs/building.texi    |  6 ++++++
 doc/emacs/programs.texi    |  5 ++++-
 doc/lispref/loading.texi   | 23 ++++++++++++++++++++++-
 doc/lispref/sequences.texi |  2 +-
 doc/lispref/variables.texi |  2 +-
 etc/NEWS                   |  6 ++++++
 lisp/gnus/mm-decode.el     |  2 +-
 lisp/help-fns.el           | 18 +++++++++++++++---
 lisp/textmodes/picture.el  |  1 -
 src/window.c               |  2 +-
 10 files changed, 57 insertions(+), 10 deletions(-)

diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index 518d157..6e16588 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -1521,6 +1521,12 @@ library lets Emacs properly set up the hyperlinks in the 
@file{*Help*}
 buffer).  To disable this feature, change the variable
 @code{help-enable-auto-load} to @code{nil}.
 
address@hidden help-enable-completion-auto-load
+Automatic loading also occurs when completing names for
address@hidden and @code{describe-function}, based on the
+prefix being completed.  To disable this feature, change the variable
address@hidden to @code{nil}.
+
 @vindex load-dangerous-libraries
 @cindex Lisp files byte-compiled by XEmacs
   By default, Emacs refuses to load compiled Lisp files which were
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index c1ad5b5..28bfa5b 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -1298,8 +1298,11 @@ count as blocks.
 @findex hs-show-block
 @findex hs-show-region
 @findex hs-hide-level
address@hidden hs-toggle-hiding
address@hidden hs-mouse-toggle-hiding
 @kindex C-c @@ C-h
 @kindex C-c @@ C-s
address@hidden C-c @@ C-c
 @kindex C-c @@ C-M-h
 @kindex C-c @@ C-M-s
 @kindex C-c @@ C-r
@@ -1312,7 +1315,7 @@ Hide the current block (@code{hs-hide-block}).
 @item C-c @@ C-s
 Show the current block (@code{hs-show-block}).
 @item C-c @@ C-c
address@hidden C-x @@ C-e
address@hidden C-c @@ C-e
 Either hide or show the current block (@code{hs-toggle-hiding}).
 @item S-mouse-2
 Toggle hiding for the block you click on (@code{hs-mouse-toggle-hiding}).
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index 6f1213f..3261e6d 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -466,9 +466,11 @@ first call to the function automatically loads the proper 
library, in
 order to install the real definition and other associated code, then
 runs the real definition as if it had been loaded all along.
 Autoloading can also be triggered by looking up the documentation of
-the function or macro (@pxref{Documentation Basics}).
+the function or macro (@pxref{Documentation Basics}), and completion
+of variable and function names (@pxref{Autoload by Prefix} below).
 
 @menu
+* Autoload by Prefix:: Autoload by Prefix.
 * When to Autoload::   When to Use Autoload.
 @end menu
 
@@ -703,6 +705,25 @@ symbol's new function value.  If the value of the optional 
argument
 function, only a macro.
 @end defun
 
address@hidden Autoload by Prefix
address@hidden Autoload by Prefix
address@hidden autoload by prefix
+
address@hidden definition-prefixes
address@hidden register-definition-prefixes
address@hidden autoload-compute-prefixes
+During completion for the commands @code{describe-variable} and
address@hidden, Emacs will try to load files which may
+contain definitions matching the prefix being completed.  The variable
address@hidden holds a hashtable which maps a prefix to
+the corresponding list of files to load for it.  Entries to this
+mapping are added by calls to @code{register-definition-prefixes}
+which are generated by @code{update-file-autoloads}
+(@pxref{Autoload}).  Files which don't contain any definitions worth
+loading (test files, for examples), should set
address@hidden to @code{nil} as a file-local
+variable.
+
 @node When to Autoload
 @subsection When to Use Autoload
 @cindex autoload, when to use
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index a7f270c..4b67a5f 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -601,7 +601,7 @@ returned value is a list.
 @defun seq-mapn function &rest sequences
   This function returns the result of applying @var{function} to each
 element of @var{sequences}.  The arity (@pxref{What Is a Function,
-sub-arity}) of @var{function} must match the number of sequences.
+subr-arity}) of @var{function} must match the number of sequences.
 Mapping stops at the end of the shortest sequence, and the returned
 value is a list.
 
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index aca7d2f..932b7c8 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -2009,7 +2009,7 @@ all files in those directories.  The list in 
@var{variables} can be of
 one of the two forms: @code{(@var{major-mode} . @var{alist})} or
 @code{(@var{directory} . @var{list})}.  With the first form, if the
 file's buffer turns on a mode that is derived from @var{major-mode},
-then the all the variables in the associated @var{alist} are applied;
+then all the variables in the associated @var{alist} are applied;
 @var{alist} should be of the form @code{(@var{name} . @var{value})}.
 A special value @code{nil} for @var{major-mode} means the settings are
 applicable to any mode.  In @var{alist}, you can use a special
diff --git a/etc/NEWS b/etc/NEWS
index 72702a9..0641430 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -153,6 +153,12 @@ after Emacs has finished initialization and is ready for 
use.
 emacs.service file to eg "~/.config/systemd/user/", you will need to copy
 the new version of the file again.)
 
++++
+** New option 'help-enable-completion-auto-load'.
+This allows disabling the new feature introduced in Emacs 26.1 which
+loads files during completion of 'C-h f' and 'C-h v' according to
+'definition-prefixes'.
+
 
 * Changes in Emacs 27.1
 
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 5b1859e..0b9cdde 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -1111,7 +1111,7 @@ external if displayed external."
          (mm-remove-part handle)))))))
 
 (defun mm-destroy-parts (handles)
-  "Remove the displayed MIME parts represented by HANDLES."
+  "Destroy the displayed MIME parts represented by HANDLES."
   (if (and (listp handles)
           (bufferp (car handles)))
       (mm-destroy-part handles)
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 9d99736..91b4104 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -103,11 +103,23 @@ and the output should go to `standard-output'.")
         (with-demoted-errors "while loading: %S"
           (load file 'noerror 'nomessage))))))
 
+(defcustom help-enable-completion-auto-load t
+  "Whether completion for Help commands can perform autoloading.
+If non-nil, whenever invoking completion for `describe-function'
+or `describe-variable' load files that might contain definitions
+with the current prefix.  The files are chosen according to
+`definition-prefixes'."
+  :type 'boolean
+  :group 'help
+  :version "26.3")
+
 (defun help--symbol-completion-table (string pred action)
-  (let ((prefixes (radix-tree-prefixes (help-definition-prefixes) string)))
-    (help--load-prefixes prefixes))
+  (when help-enable-completion-auto-load
+    (let ((prefixes (radix-tree-prefixes (help-definition-prefixes) string)))
+      (help--load-prefixes prefixes)))
   (let ((prefix-completions
-         (mapcar #'intern (all-completions string definition-prefixes))))
+         (and help-enable-completion-auto-load
+              (mapcar #'intern (all-completions string definition-prefixes)))))
     (complete-with-action action obarray string
                           (if pred (lambda (sym)
                                      (or (funcall pred sym)
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el
index 0b50854..79039bc 100644
--- a/lisp/textmodes/picture.el
+++ b/lisp/textmodes/picture.el
@@ -624,7 +624,6 @@ Leaves the region surrounding the rectangle."
 (defvar picture-mode-map
   (let ((map (make-keymap)))
     (define-key map [remap self-insert-command] 'picture-self-insert)
-    (define-key map [remap self-insert-command] 'picture-self-insert)
     (define-key map [remap completion-separator-self-insert-command]
                          'picture-self-insert)
     (define-key map [remap completion-separator-self-insert-autofilling]
diff --git a/src/window.c b/src/window.c
index 30ffad0..ca7cf7a 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4089,7 +4089,7 @@ displaying that buffer.  */)
       return Qt;
     }
 
-  if (WINDOWP (object))
+  if (WINDOW_LIVE_P (object))
     {
       struct window *w = XWINDOW (object);
       mark_window_display_accurate (object, false);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]