diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/autoload.el | 17 | ||||
-rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 1 |
2 files changed, 15 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 39070b20d6b..8b2a8985229 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -48,6 +48,12 @@ If nil, this defaults to `generated-autoload-file', sans extension.") ;;;###autoload (put 'generated-autoload-feature 'safe-local-variable 'symbolp) +(defvar generated-autoload-load-name nil + "Load name for `autoload' statements generated from autoload cookies. +If nil, this defaults to the file name, sans extension.") +;;;###autoload +(put 'generated-autoload-load-name 'safe-local-variable 'stringp) + ;; This feels like it should be a defconst, but MH-E sets it to ;; ";;;###mh-autoload" for the autoloads that are to go into mh-loaddefs.el. (defvar generate-autoload-cookie ";;;###autoload" @@ -101,11 +107,12 @@ or macro definition or a defcustom)." easy-mmode-define-global-mode define-global-minor-mode define-globalized-minor-mode easy-mmode-define-minor-mode define-minor-mode - defun* defmacro*)) + defun* defmacro* define-overloadable-function)) (let* ((macrop (memq car '(defmacro defmacro*))) (name (nth 1 form)) (args (case car - ((defun defmacro defun* defmacro*) (nth 2 form)) + ((defun defmacro defun* defmacro* + define-overloadable-function) (nth 2 form)) ((define-skeleton) '(&optional str arg)) ((define-generic-mode define-derived-mode define-compilation-mode) nil) @@ -347,7 +354,7 @@ Return non-nil if and only if FILE adds no autoloads to OUTFILE \(or OUTBUF if OUTFILE is nil)." (catch 'done (let ((autoloads-done '()) - (load-name (autoload-file-load-name file)) + load-name (print-length nil) (print-level nil) (print-readably t) ; This does something in Lucid Emacs. @@ -365,6 +372,10 @@ Return non-nil if and only if FILE adds no autoloads to OUTFILE ;; Obey the no-update-autoloads file local variable. (unless no-update-autoloads (message "Generating autoloads for %s..." file) + (setq load-name + (if (stringp generated-autoload-load-name) + generated-autoload-load-name + (autoload-file-load-name file))) (save-excursion (save-restriction (widen) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 3360600fbff..1ea0881f3d9 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -154,6 +154,7 @@ (put 'defalias 'doc-string-elt 3) (put 'defvaralias 'doc-string-elt 3) (put 'define-category 'doc-string-elt 2) +(put 'define-overloadable-function 'doc-string-elt 3) (defvar lisp-doc-string-elt-property 'doc-string-elt "The symbol property that holds the docstring position info.") |