aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-08-15 16:02:20 -0700
committerLars Ingebrigtsen2019-08-15 16:02:20 -0700
commitb3713265cbb8eb591ac832ae4c35bf8185544467 (patch)
treeb614a8f9bb8322bbcf17a4ba5182ed228090fb62
parent7aefbe86f22a1c0b7d329c1931d0297f801e1f83 (diff)
downloademacs-b3713265cbb8eb591ac832ae4c35bf8185544467.tar.gz
emacs-b3713265cbb8eb591ac832ae4c35bf8185544467.zip
Rename variables and functions with "auto-load" in their names
* doc/emacs/building.texi (Lisp Libraries): Adjust documentation. * lisp/help-fns.el (help--symbol-completion-table): Adjust usage. * lisp/help-fns.el (help-enable-completion-autoload): Change name from auto-load and declare an obsolete alias (bug#13418). * lisp/help.el (help-enable-autoload): Ditto. * lisp/progmodes/vhdl-mode.el: Ditto. (vhdl-create-mode-menu, vhdl-mode): Adjust usage. (vhdl-autoload-project): Rename from auto-load and declare an obsolete alias.
-rw-r--r--doc/emacs/building.texi8
-rw-r--r--etc/NEWS6
-rw-r--r--lisp/emacs-lisp/crm.el2
-rw-r--r--lisp/emacs-lisp/warnings.el2
-rw-r--r--lisp/help-fns.el12
-rw-r--r--lisp/help.el5
-rw-r--r--lisp/progmodes/vhdl-mode.el32
7 files changed, 43 insertions, 24 deletions
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index 6e16588861e..990b82d10ed 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -1513,19 +1513,19 @@ call it, Emacs automatically loads the @code{compile} library first.
1513In contrast, the command @kbd{M-x recompile} is not autoloaded, so it 1513In contrast, the command @kbd{M-x recompile} is not autoloaded, so it
1514is unavailable until you load the @code{compile} library. 1514is unavailable until you load the @code{compile} library.
1515 1515
1516@vindex help-enable-auto-load 1516@vindex help-enable-autoload
1517 Automatic loading can also occur when you look up the documentation 1517 Automatic loading can also occur when you look up the documentation
1518of an autoloaded command (@pxref{Name Help}), if the documentation 1518of an autoloaded command (@pxref{Name Help}), if the documentation
1519refers to other functions and variables in its library (loading the 1519refers to other functions and variables in its library (loading the
1520library lets Emacs properly set up the hyperlinks in the @file{*Help*} 1520library lets Emacs properly set up the hyperlinks in the @file{*Help*}
1521buffer). To disable this feature, change the variable 1521buffer). To disable this feature, change the variable
1522@code{help-enable-auto-load} to @code{nil}. 1522@code{help-enable-autoload} to @code{nil}.
1523 1523
1524@vindex help-enable-completion-auto-load 1524@vindex help-enable-completion-autoload
1525Automatic loading also occurs when completing names for 1525Automatic loading also occurs when completing names for
1526@code{describe-variable} and @code{describe-function}, based on the 1526@code{describe-variable} and @code{describe-function}, based on the
1527prefix being completed. To disable this feature, change the variable 1527prefix being completed. To disable this feature, change the variable
1528@code{help-enable-completion-auto-load} to @code{nil}. 1528@code{help-enable-completion-autoload} to @code{nil}.
1529 1529
1530@vindex load-dangerous-libraries 1530@vindex load-dangerous-libraries
1531@cindex Lisp files byte-compiled by XEmacs 1531@cindex Lisp files byte-compiled by XEmacs
diff --git a/etc/NEWS b/etc/NEWS
index 361668c46d9..38825fd1da8 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2008,6 +2008,12 @@ valid event type.
2008 2008
2009* Lisp Changes in Emacs 27.1 2009* Lisp Changes in Emacs 27.1
2010 2010
2011** The variables 'help-enable-completion-auto-load',
2012'help-enable-auto-load' and 'vhdl-project-auto-load', as well as the
2013'vhdl-auto-load-project' have been renamed to have "autoload" without
2014the hyphen in their names. Obsolete aliases from the old names have
2015been added.
2016
2011+++ 2017+++
2012** Buttons (created with 'make-button' and related functions) can 2018** Buttons (created with 'make-button' and related functions) can
2013now use the 'button-data' property. If present, the data in this 2019now use the 'button-data' property. If present, the data in this
diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el
index 40567e141d3..14646a2ab11 100644
--- a/lisp/emacs-lisp/crm.el
+++ b/lisp/emacs-lisp/crm.el
@@ -222,7 +222,7 @@ exiting the minibuffer."
222 t)) 222 t))
223 223
224;; superemulates behavior of completing_read in src/minibuf.c 224;; superemulates behavior of completing_read in src/minibuf.c
225;; Use \\<crm-local-completion-map> so that help-enable-auto-load can 225;; Use \\<crm-local-completion-map> so that help-enable-autoload can
226;; do its thing. Any keymap that is defined will do. 226;; do its thing. Any keymap that is defined will do.
227;;;###autoload 227;;;###autoload
228(defun completing-read-multiple 228(defun completing-read-multiple
diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el
index 1207353ba30..e5c1d9cec4d 100644
--- a/lisp/emacs-lisp/warnings.el
+++ b/lisp/emacs-lisp/warnings.el
@@ -320,7 +320,7 @@ programming features."
320 (set-window-start window warning-series)) 320 (set-window-start window warning-series))
321 (sit-for 0))))))))) 321 (sit-for 0)))))))))
322 322
323;; Use \\<special-mode-map> so that help-enable-auto-load can do its thing. 323;; Use \\<special-mode-map> so that help-enable-autoload can do its thing.
324;; Any keymap that is defined will do. 324;; Any keymap that is defined will do.
325;;;###autoload 325;;;###autoload
326(defun lwarn (type level message &rest args) 326(defun lwarn (type level message &rest args)
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 0b5c547d6b0..7c059c25b79 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -104,7 +104,11 @@ and the output should go to `standard-output'.")
104 (with-demoted-errors "while loading: %S" 104 (with-demoted-errors "while loading: %S"
105 (load file 'noerror 'nomessage)))))) 105 (load file 'noerror 'nomessage))))))
106 106
107(defcustom help-enable-completion-auto-load t 107
108(define-obsolete-variable-alias 'help-enable-completion-auto-load
109 'help-enable-completion-autoload "27.1")
110
111(defcustom help-enable-completion-autoload t
108 "Whether completion for Help commands can perform autoloading. 112 "Whether completion for Help commands can perform autoloading.
109If non-nil, whenever invoking completion for `describe-function' 113If non-nil, whenever invoking completion for `describe-function'
110or `describe-variable' load files that might contain definitions 114or `describe-variable' load files that might contain definitions
@@ -115,11 +119,11 @@ with the current prefix. The files are chosen according to
115 :version "26.3") 119 :version "26.3")
116 120
117(defun help--symbol-completion-table (string pred action) 121(defun help--symbol-completion-table (string pred action)
118 (when help-enable-completion-auto-load 122 (when help-enable-completion-autoload
119 (let ((prefixes (radix-tree-prefixes (help-definition-prefixes) string))) 123 (let ((prefixes (radix-tree-prefixes (help-definition-prefixes) string)))
120 (help--load-prefixes prefixes))) 124 (help--load-prefixes prefixes)))
121 (let ((prefix-completions 125 (let ((prefix-completions
122 (and help-enable-completion-auto-load 126 (and help-enable-completion-autoload
123 (mapcar #'intern (all-completions string definition-prefixes))))) 127 (mapcar #'intern (all-completions string definition-prefixes)))))
124 (complete-with-action action obarray string 128 (complete-with-action action obarray string
125 (if pred (lambda (sym) 129 (if pred (lambda (sym)
@@ -799,7 +803,7 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)."
799 ;; If the function is autoloaded, and its docstring has 803 ;; If the function is autoloaded, and its docstring has
800 ;; key substitution constructs, load the library. 804 ;; key substitution constructs, load the library.
801 (and (autoloadp real-def) doc-raw 805 (and (autoloadp real-def) doc-raw
802 help-enable-auto-load 806 help-enable-autoload
803 (string-match "\\([^\\]=\\|[^=]\\|\\`\\)\\\\[[{<]" doc-raw) 807 (string-match "\\([^\\]=\\|[^=]\\|\\`\\)\\\\[[{<]" doc-raw)
804 (autoload-do-load real-def)) 808 (autoload-do-load real-def))
805 809
diff --git a/lisp/help.el b/lisp/help.el
index 039d0c44e4f..e40178de964 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1209,7 +1209,10 @@ by `with-help-window'."
1209 :group 'help 1209 :group 'help
1210 :version "23.1") 1210 :version "23.1")
1211 1211
1212(defcustom help-enable-auto-load t 1212(define-obsolete-variable-alias 'help-enable-auto-load
1213 'help-enable-autoload "27.1")
1214
1215(defcustom help-enable-autoload t
1213 "Whether Help commands can perform autoloading. 1216 "Whether Help commands can perform autoloading.
1214If non-nil, whenever \\[describe-function] is called for an 1217If non-nil, whenever \\[describe-function] is called for an
1215autoloaded function whose docstring contains any key substitution 1218autoloaded function whose docstring contains any key substitution
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 2c947f3b050..8cdf9cd34a1 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -692,7 +692,7 @@ browser. The current project can also be changed temporarily in the menu."
692replaced by the user name (allows you to have user-specific project setups). 692replaced by the user name (allows you to have user-specific project setups).
693The first entry is used as file name to import/export individual project 693The first entry is used as file name to import/export individual project
694setups. All entries are used to automatically import project setups at 694setups. All entries are used to automatically import project setups at
695startup (see option `vhdl-project-auto-load'). Projects loaded from the 695startup (see option `vhdl-project-autoload'). Projects loaded from the
696first entry are automatically made current. Hint: specify local project 696first entry are automatically made current. Hint: specify local project
697setups in first entry, global setups in following entries; loading a local 697setups in first entry, global setups in following entries; loading a local
698project setup will make it current, while loading the global setups 698project setup will make it current, while loading the global setups
@@ -702,7 +702,11 @@ in global directories)."
702 :type '(repeat (string :tag "File name" "\\1.prj")) 702 :type '(repeat (string :tag "File name" "\\1.prj"))
703 :group 'vhdl-project) 703 :group 'vhdl-project)
704 704
705(defcustom vhdl-project-auto-load '(startup) 705
706(define-obsolete-variable-alias 'vhdl-project-auto-load
707 'vhdl-project-autoload "27.1")
708
709(defcustom vhdl-project-autoload '(startup)
706 "Automatically load project setups from files. 710 "Automatically load project setups from files.
707All project setup files that match the file names specified in option 711All project setup files that match the file names specified in option
708`vhdl-project-file-name' are automatically loaded. The project of the 712`vhdl-project-file-name' are automatically loaded. The project of the
@@ -3673,11 +3677,11 @@ STRING are replaced by `-' and substrings are converted to lower case."
3673 ["Setup File Name..." (customize-option 'vhdl-project-file-name) t] 3677 ["Setup File Name..." (customize-option 'vhdl-project-file-name) t]
3674 ("Auto Load Setup File" 3678 ("Auto Load Setup File"
3675 ["At Startup" 3679 ["At Startup"
3676 (customize-set-variable 'vhdl-project-auto-load 3680 (customize-set-variable 'vhdl-project-autoload
3677 (if (memq 'startup vhdl-project-auto-load) 3681 (if (memq 'startup vhdl-project-autoload)
3678 (delq 'startup vhdl-project-auto-load) 3682 (delq 'startup vhdl-project-autoload)
3679 (cons 'startup vhdl-project-auto-load))) 3683 (cons 'startup vhdl-project-autoload)))
3680 :style toggle :selected (memq 'startup vhdl-project-auto-load)]) 3684 :style toggle :selected (memq 'startup vhdl-project-autoload)])
3681 ["Sort Projects" 3685 ["Sort Projects"
3682 (customize-set-variable 'vhdl-project-sort (not vhdl-project-sort)) 3686 (customize-set-variable 'vhdl-project-sort (not vhdl-project-sort))
3683 :style toggle :selected vhdl-project-sort] 3687 :style toggle :selected vhdl-project-sort]
@@ -4683,7 +4687,7 @@ Usage:
4683 Emacs with VHDL Mode (i.e. load a VHDL file or use \"emacs -l 4687 Emacs with VHDL Mode (i.e. load a VHDL file or use \"emacs -l
4684 vhdl-mode\") in a directory with an existing project setup file, it is 4688 vhdl-mode\") in a directory with an existing project setup file, it is
4685 automatically loaded and its project activated if option 4689 automatically loaded and its project activated if option
4686 `vhdl-project-auto-load' is non-nil. Names/paths of the project setup 4690 `vhdl-project-autoload' is non-nil. Names/paths of the project setup
4687 files can be specified in option `vhdl-project-file-name'. Multiple 4691 files can be specified in option `vhdl-project-file-name'. Multiple
4688 project setups can be automatically loaded from global directories. 4692 project setups can be automatically loaded from global directories.
4689 This is an alternative to specifying project setups with option 4693 This is an alternative to specifying project setups with option
@@ -13126,7 +13130,7 @@ File statistics: \"%s\"\n\
13126 (list (cons new-name project-entry)))) 13130 (list (cons new-name project-entry))))
13127 (vhdl-update-mode-menu))) 13131 (vhdl-update-mode-menu)))
13128 13132
13129(defun vhdl-auto-load-project () 13133(defun vhdl-autoload-project ()
13130 "Automatically load project setup at startup." 13134 "Automatically load project setup at startup."
13131 (let ((file-name-list vhdl-project-file-name) 13135 (let ((file-name-list vhdl-project-file-name)
13132 file-list list-length) 13136 file-list list-length)
@@ -13145,12 +13149,14 @@ File statistics: \"%s\"\n\
13145 (not (> list-length 0))) 13149 (not (> list-length 0)))
13146 (setq list-length (1- list-length)) 13150 (setq list-length (1- list-length))
13147 (setq file-list (cdr file-list))))) 13151 (setq file-list (cdr file-list)))))
13152(define-obsolete-function-alias 'vhdl-auto-load-project
13153 #'vhdl-autoload-project "27.1")
13148 13154
13149;; automatically load project setup when idle after startup 13155;; automatically load project setup when idle after startup
13150(when (memq 'startup vhdl-project-auto-load) 13156(when (memq 'startup vhdl-project-autoload)
13151 (if noninteractive 13157 (if noninteractive
13152 (vhdl-auto-load-project) 13158 (vhdl-autoload-project)
13153 (vhdl-run-when-idle .1 nil 'vhdl-auto-load-project))) 13159 (vhdl-run-when-idle .1 nil 'vhdl-autoload-project)))
13154 13160
13155 13161
13156;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 13162;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -17635,7 +17641,7 @@ specified by a target."
17635 'vhdl-project-alist 17641 'vhdl-project-alist
17636 'vhdl-project 17642 'vhdl-project
17637 'vhdl-project-file-name 17643 'vhdl-project-file-name
17638 'vhdl-project-auto-load 17644 'vhdl-project-autoload
17639 'vhdl-project-sort 17645 'vhdl-project-sort
17640 'vhdl-compiler-alist 17646 'vhdl-compiler-alist
17641 'vhdl-compiler 17647 'vhdl-compiler