comparison lisp/emacs-lisp/autoload.el @ 107418:8aeda91ab827

* emacs-lisp/autoload.el (autoload-rubric): Doc fix.
author Glenn Morris <rgm@gnu.org>
date Wed, 17 Mar 2010 23:47:12 -0700
parents 1d1d5d9bd884
children 9b05dc529495
comparison
equal deleted inserted replaced
107417:a24389e7f686 107418:8aeda91ab827
1 ;; autoload.el --- maintain autoloads in loaddefs.el 1 ;; autoload.el --- maintain autoloads in loaddefs.el
2 2
3 ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2001, 2002, 2003, 3 ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2001, 2002, 2003,
4 ;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 4 ;; 2004, 2005, 2006, 2007, 2008, 2009, 2010
5 ;; Free Software Foundation, Inc.
5 6
6 ;; Author: Roland McGrath <roland@gnu.org> 7 ;; Author: Roland McGrath <roland@gnu.org>
7 ;; Keywords: maint 8 ;; Keywords: maint
8 9
9 ;; This file is part of GNU Emacs. 10 ;; This file is part of GNU Emacs.
256 (defun autoload-rubric (file &optional type feature) 257 (defun autoload-rubric (file &optional type feature)
257 "Return a string giving the appropriate autoload rubric for FILE. 258 "Return a string giving the appropriate autoload rubric for FILE.
258 TYPE (default \"autoloads\") is a string stating the type of 259 TYPE (default \"autoloads\") is a string stating the type of
259 information contained in FILE. If FEATURE is non-nil, FILE 260 information contained in FILE. If FEATURE is non-nil, FILE
260 will provide a feature. FEATURE may be a string naming the 261 will provide a feature. FEATURE may be a string naming the
261 feature, otherwise it will be based on FILE's name." 262 feature, otherwise it will be based on FILE's name.
263
264 At present, a feature is in fact always provided, but this should
265 not be relied upon."
262 (let ((basename (file-name-nondirectory file))) 266 (let ((basename (file-name-nondirectory file)))
263 (concat ";;; " basename 267 (concat ";;; " basename
264 " --- automatically extracted " (or type "autoloads") "\n" 268 " --- automatically extracted " (or type "autoloads") "\n"
265 ";;\n" 269 ";;\n"
266 ";;; Code:\n\n" 270 ";;; Code:\n\n"
267 " \n" 271 " \n"
268 ;; This is used outside of autoload.el. 272 ;; This is used outside of autoload.el, eg cus-dep, finder.
269 "(provide '" 273 "(provide '"
270 (if (stringp feature) 274 (if (stringp feature)
271 feature 275 feature
272 (file-name-sans-extension basename)) 276 (file-name-sans-extension basename))
273 ")\n" 277 ")\n"