From: Lars Ingebrigtsen Date: Thu, 15 Aug 2019 23:02:20 +0000 (-0700) Subject: Rename variables and functions with "auto-load" in their names X-Git-Tag: emacs-27.0.90~1605 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b3713265cbb8eb591ac832ae4c35bf8185544467;p=emacs.git 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. --- 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. In contrast, the command @kbd{M-x recompile} is not autoloaded, so it is unavailable until you load the @code{compile} library. -@vindex help-enable-auto-load +@vindex help-enable-autoload Automatic loading can also occur when you look up the documentation of an autoloaded command (@pxref{Name Help}), if the documentation refers to other functions and variables in its library (loading the 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}. +@code{help-enable-autoload} to @code{nil}. -@vindex help-enable-completion-auto-load +@vindex help-enable-completion-autoload Automatic loading also occurs when completing names for @code{describe-variable} and @code{describe-function}, based on the prefix being completed. To disable this feature, change the variable -@code{help-enable-completion-auto-load} to @code{nil}. +@code{help-enable-completion-autoload} to @code{nil}. @vindex load-dangerous-libraries @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. * Lisp Changes in Emacs 27.1 +** The variables 'help-enable-completion-auto-load', +'help-enable-auto-load' and 'vhdl-project-auto-load', as well as the +'vhdl-auto-load-project' have been renamed to have "autoload" without +the hyphen in their names. Obsolete aliases from the old names have +been added. + +++ ** Buttons (created with 'make-button' and related functions) can now 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." t)) ;; superemulates behavior of completing_read in src/minibuf.c -;; Use \\ so that help-enable-auto-load can +;; Use \\ so that help-enable-autoload can ;; do its thing. Any keymap that is defined will do. ;;;###autoload (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." (set-window-start window warning-series)) (sit-for 0))))))))) -;; Use \\ so that help-enable-auto-load can do its thing. +;; Use \\ so that help-enable-autoload can do its thing. ;; Any keymap that is defined will do. ;;;###autoload (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'.") (with-demoted-errors "while loading: %S" (load file 'noerror 'nomessage)))))) -(defcustom help-enable-completion-auto-load t + +(define-obsolete-variable-alias 'help-enable-completion-auto-load + 'help-enable-completion-autoload "27.1") + +(defcustom help-enable-completion-autoload 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 @@ -115,11 +119,11 @@ with the current prefix. The files are chosen according to :version "26.3") (defun help--symbol-completion-table (string pred action) - (when help-enable-completion-auto-load + (when help-enable-completion-autoload (let ((prefixes (radix-tree-prefixes (help-definition-prefixes) string))) (help--load-prefixes prefixes))) (let ((prefix-completions - (and help-enable-completion-auto-load + (and help-enable-completion-autoload (mapcar #'intern (all-completions string definition-prefixes))))) (complete-with-action action obarray string (if pred (lambda (sym) @@ -799,7 +803,7 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)." ;; If the function is autoloaded, and its docstring has ;; key substitution constructs, load the library. (and (autoloadp real-def) doc-raw - help-enable-auto-load + help-enable-autoload (string-match "\\([^\\]=\\|[^=]\\|\\`\\)\\\\[[{<]" doc-raw) (autoload-do-load real-def)) 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'." :group 'help :version "23.1") -(defcustom help-enable-auto-load t +(define-obsolete-variable-alias 'help-enable-auto-load + 'help-enable-autoload "27.1") + +(defcustom help-enable-autoload t "Whether Help commands can perform autoloading. If non-nil, whenever \\[describe-function] is called for an autoloaded 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." replaced by the user name (allows you to have user-specific project setups). The first entry is used as file name to import/export individual project setups. All entries are used to automatically import project setups at -startup (see option `vhdl-project-auto-load'). Projects loaded from the +startup (see option `vhdl-project-autoload'). Projects loaded from the first entry are automatically made current. Hint: specify local project setups in first entry, global setups in following entries; loading a local project setup will make it current, while loading the global setups @@ -702,7 +702,11 @@ in global directories)." :type '(repeat (string :tag "File name" "\\1.prj")) :group 'vhdl-project) -(defcustom vhdl-project-auto-load '(startup) + +(define-obsolete-variable-alias 'vhdl-project-auto-load + 'vhdl-project-autoload "27.1") + +(defcustom vhdl-project-autoload '(startup) "Automatically load project setups from files. All project setup files that match the file names specified in option `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." ["Setup File Name..." (customize-option 'vhdl-project-file-name) t] ("Auto Load Setup File" ["At Startup" - (customize-set-variable 'vhdl-project-auto-load - (if (memq 'startup vhdl-project-auto-load) - (delq 'startup vhdl-project-auto-load) - (cons 'startup vhdl-project-auto-load))) - :style toggle :selected (memq 'startup vhdl-project-auto-load)]) + (customize-set-variable 'vhdl-project-autoload + (if (memq 'startup vhdl-project-autoload) + (delq 'startup vhdl-project-autoload) + (cons 'startup vhdl-project-autoload))) + :style toggle :selected (memq 'startup vhdl-project-autoload)]) ["Sort Projects" (customize-set-variable 'vhdl-project-sort (not vhdl-project-sort)) :style toggle :selected vhdl-project-sort] @@ -4683,7 +4687,7 @@ Usage: Emacs with VHDL Mode (i.e. load a VHDL file or use \"emacs -l vhdl-mode\") in a directory with an existing project setup file, it is automatically loaded and its project activated if option - `vhdl-project-auto-load' is non-nil. Names/paths of the project setup + `vhdl-project-autoload' is non-nil. Names/paths of the project setup files can be specified in option `vhdl-project-file-name'. Multiple project setups can be automatically loaded from global directories. This is an alternative to specifying project setups with option @@ -13126,7 +13130,7 @@ File statistics: \"%s\"\n\ (list (cons new-name project-entry)))) (vhdl-update-mode-menu))) -(defun vhdl-auto-load-project () +(defun vhdl-autoload-project () "Automatically load project setup at startup." (let ((file-name-list vhdl-project-file-name) file-list list-length) @@ -13145,12 +13149,14 @@ File statistics: \"%s\"\n\ (not (> list-length 0))) (setq list-length (1- list-length)) (setq file-list (cdr file-list))))) +(define-obsolete-function-alias 'vhdl-auto-load-project + #'vhdl-autoload-project "27.1") ;; automatically load project setup when idle after startup -(when (memq 'startup vhdl-project-auto-load) +(when (memq 'startup vhdl-project-autoload) (if noninteractive - (vhdl-auto-load-project) - (vhdl-run-when-idle .1 nil 'vhdl-auto-load-project))) + (vhdl-autoload-project) + (vhdl-run-when-idle .1 nil 'vhdl-autoload-project))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -17635,7 +17641,7 @@ specified by a target." 'vhdl-project-alist 'vhdl-project 'vhdl-project-file-name - 'vhdl-project-auto-load + 'vhdl-project-autoload 'vhdl-project-sort 'vhdl-compiler-alist 'vhdl-compiler