Mercurial > emacs
diff lisp/emacs-lisp/autoload.el @ 104447:273e528a9f9b
* emacs-lisp/autoload.el (generated-autoload-load-name): New var.
(autoload-generate-file-autoloads): Use it.
(make-autoload): Handle define-overloadable-function.
* emacs-lisp/lisp-mode.el (define-overloadable-function): Add
doc-string-elt property for define-overloadable-function.
lisp/cedet/semantic/analyze.el: Add generated-autoload-load-name var.
lisp/cedet/semantic/ctxt.el: Add generated-autoload-load-name var.
lisp/cedet/semantic/db.el: Add generated-autoload-load-name var.
lisp/cedet/semantic/db-file.el: Add generated-autoload-load-name var.
lisp/cedet/semantic/db-mode.el: Add generated-autoload-load-name var.
lisp/cedet/semantic/db-typecache.el: Add generated-autoload-load-name var.
lisp/cedet/semantic/doc.el: Add generated-autoload-load-name var.
lisp/cedet/semantic/find.el: Add generated-autoload-load-name var.
lisp/cedet/semantic/format.el: Add generated-autoload-load-name var.
lisp/cedet/semantic/lex.el: Add generated-autoload-load-name var.
lisp/cedet/semantic/sb.el: Require semantic/format.
lisp/cedet/semantic/sort.el: Add generated-autoload-load-name var.
lisp/cedet/semantic/tag.el: Add generated-autoload-load-name var.
lisp/cedet/semantic/tag-file.el: Add generated-autoload-load-name var.
lisp/cedet/semantic/tag-ls.el: Add generated-autoload-load-name var.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 05 Sep 2009 01:00:36 +0000 |
parents | 43eb1ff3a976 |
children | 5fabb7947fa5 |
line wrap: on
line diff
--- a/lisp/emacs-lisp/autoload.el Thu Sep 03 03:58:13 2009 +0000 +++ b/lisp/emacs-lisp/autoload.el Sat Sep 05 01:00:36 2009 +0000 @@ -48,6 +48,12 @@ ;;;###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 @@ 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 @@ \(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 @@ ;; 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)