194 |
Use the command `%s' to change this variable." pretty-name mode)) |
Use the command `%s' to change this variable." pretty-name mode)) |
195 |
(make-variable-buffer-local ',mode)) |
(make-variable-buffer-local ',mode)) |
196 |
|
|
197 |
(let ((curfile (or (and (boundp 'byte-compile-current-file) |
(let ((base-doc-string |
198 |
byte-compile-current-file) |
(concat "Non-nil if %s is enabled. |
199 |
load-file-name)) |
See the command `%s' for a description of this minor-mode." |
200 |
base-doc-string) |
(if body " |
|
(setq base-doc-string "Non-nil if %s is enabled. |
|
|
See the command `%s' for a description of this minor-mode. |
|
201 |
Setting this variable directly does not take effect; |
Setting this variable directly does not take effect; |
202 |
use either \\[customize] or the function `%s'.") |
use either \\[customize] or the function `%s'.")))) |
|
(if (null body) |
|
|
(setq base-doc-string "Non-nil if %s is enabled. |
|
|
See the command `%s' for a description of this minor-mode.")) |
|
|
|
|
203 |
`(defcustom ,mode ,init-value |
`(defcustom ,mode ,init-value |
204 |
,(format base-doc-string pretty-name mode mode) |
,(format base-doc-string pretty-name mode mode) |
205 |
,@set |
,@set |
206 |
,@initialize |
,@initialize |
207 |
,@group |
,@group |
208 |
,@type |
,@type |
209 |
,@(cond |
,@(unless (eq require t) `(:require ,require)) |
210 |
((not (and curfile require)) nil) |
,@(nreverse extra-keywords)))) |
|
((not (eq require t)) `(:require ,require))) |
|
|
,@(nreverse extra-keywords)))) |
|
211 |
|
|
212 |
;; The actual function. |
;; The actual function. |
213 |
(defun ,mode (&optional arg ,@extra-args) |
(defun ,mode (&optional arg ,@extra-args) |