Mercurial > hg > xemacs-beta
comparison lisp/autoload.el @ 5128:7be849cb8828 ben-lisp-object
merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sun, 07 Mar 2010 02:09:59 -0600 |
parents | 65f5d45edc87 |
children | 308d34e9f07d |
comparison
equal
deleted
inserted
replaced
5127:a9c41067dd88 | 5128:7be849cb8828 |
---|---|
284 (let* ((macrop (memq car '(defmacro defmacro*))) | 284 (let* ((macrop (memq car '(defmacro defmacro*))) |
285 (name (nth 1 form)) | 285 (name (nth 1 form)) |
286 (body (nthcdr (get car 'doc-string-elt) form)) | 286 (body (nthcdr (get car 'doc-string-elt) form)) |
287 (doc (if (stringp (car body)) (pop body)))) | 287 (doc (if (stringp (car body)) (pop body)))) |
288 (if (memq car '(defmacro defmacro* defun defun*)) | 288 (if (memq car '(defmacro defmacro* defun defun*)) |
289 (let ((arglist (nth 2 form)) | 289 (let ((arglist (nth 2 form))) |
290 (placeholder (eval-when-compile (gensym)))) | |
291 (setq doc (concat (or doc "") | 290 (setq doc (concat (or doc "") |
292 "\n\narguments: " | 291 "\n\narguments: " |
293 (cl-function-arglist placeholder arglist t) | 292 (cl-function-arglist arglist) |
294 "\n")))) | 293 "\n")))) |
295 ;; `define-generic-mode' quotes the name, so take care of that | 294 ;; `define-generic-mode' quotes the name, so take care of that |
296 (list 'autoload (if (listp name) name (list 'quote name)) file doc | 295 (list 'autoload (if (listp name) name (list 'quote name)) file doc |
297 (or (and (memq car '(define-skeleton define-derived-mode | 296 (or (and (memq car '(define-skeleton define-derived-mode |
298 define-generic-mode | 297 define-generic-mode |
1087 (insert ";;; DO NOT MODIFY THIS FILE") | 1086 (insert ";;; DO NOT MODIFY THIS FILE") |
1088 ;; NOTE: XEmacs prior to 21.5.12 or so had a bug in that it | 1087 ;; NOTE: XEmacs prior to 21.5.12 or so had a bug in that it |
1089 ;; recognized only one of the two magic-cookie styles (the -*- kind) | 1088 ;; recognized only one of the two magic-cookie styles (the -*- kind) |
1090 ;; in find-file, but both of them in load. We go ahead and put both | 1089 ;; in find-file, but both of them in load. We go ahead and put both |
1091 ;; in, just to be safe. | 1090 ;; in, just to be safe. |
1091 (insert (format " -*- coding: %s -*-\n" buffer-file-coding-system)) | |
1092 (when (eq buffer-file-coding-system 'escape-quoted) | 1092 (when (eq buffer-file-coding-system 'escape-quoted) |
1093 (insert " -*- coding: escape-quoted; -*- | 1093 (insert "(or (featurep 'mule) ") |
1094 \(or (featurep 'mule) (error \"Loading this file requires Mule support\")) | 1094 (insert "(error \"Loading this file requires Mule support\"))\n")) |
1095 ;;;###coding system: escape-quoted")) | 1095 (insert (format ";;;###coding system: %s\n" |
1096 (insert "\n(if (featurep '" sym ")") | 1096 buffer-file-coding-system)) |
1097 (insert "(if (featurep '" sym ")") | |
1097 (insert " (error \"Feature " sym " already loaded\"))\n") | 1098 (insert " (error \"Feature " sym " already loaded\"))\n") |
1098 (goto-char (point-max)) | 1099 (goto-char (point-max)) |
1099 (save-excursion | 1100 (save-excursion |
1100 (forward-line -1) | 1101 (forward-line -1) |
1101 (when (looking-at "(provide") | 1102 (when (looking-at "(provide") |