emacs-devel
[Top][All Lists]
Advanced

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

Re: loaddefs and provide


From: Glenn Morris
Subject: Re: loaddefs and provide
Date: Wed, 04 Nov 2009 14:11:09 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Stefan Monnier wrote:

>>> Perhaps there could be an optional argument
>> (to autoload-rubric, I meant)
>
>From where would it be provided?

In custom-make-dependencies and finder-compile-keywords, if I
understand the question correctly.


--- autoload.el 3 Nov 2009 21:45:31 -0000       1.151
+++ autoload.el 4 Nov 2009 18:48:43 -0000
@@ -253,16 +253,20 @@
              (print-escape-nonascii t))
          (print form outbuf)))))))
 
-(defun autoload-rubric (file &optional type)
+(defun autoload-rubric (file &optional type feature)
   "Return a string giving the appropriate autoload rubric for FILE.
 TYPE (default \"autoloads\") is a string stating the type of
-information contained in FILE."
+information contained in FILE.  If FEATURE is non-nil, FILE
+will provide a feature based on FILE."
   (let ((basename (file-name-nondirectory file)))
     (concat ";;; " basename
            " --- automatically extracted " (or type "autoloads") "\n"
            ";;\n"
            ";;; Code:\n\n"
            "\n"
+           (if feature
+               (concat "(provide '" (file-name-sans-extension basename) ")\n")
+             "")
            ";; Local Variables:\n"
            ";; version-control: never\n"
            ";; no-byte-compile: t\n"


--- cus-dep.el  5 Jan 2009 03:18:49 -0000       1.46
+++ cus-dep.el  4 Nov 2009 18:49:05 -0000
@@ -87,7 +87,7 @@
   (setq buffer-undo-list t)
   (erase-buffer)
   (insert (autoload-rubric generated-custom-dependencies-file
-                           "custom dependencies"))
+                           "custom dependencies" t))
   (search-backward "")
   (mapatoms (lambda (symbol)
              (let ((members (get symbol 'custom-group))


--- finder.el   8 Mar 2009 19:54:32 -0000       1.82
+++ finder.el   4 Nov 2009 18:49:26 -0000
@@ -141,7 +141,7 @@
     (setq buffer-undo-list t)
     (erase-buffer)
     (insert (autoload-rubric generated-finder-keywords-file
-                             "keyword-to-package mapping"))
+                             "keyword-to-package mapping" t))
     (search-backward "")
     (insert "(setq finder-package-info '(\n")
     (let (processed summary keywords)





reply via email to

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