diff options
| author | Jonathan Yavner | 2002-10-27 16:35:06 +0000 |
|---|---|---|
| committer | Jonathan Yavner | 2002-10-27 16:35:06 +0000 |
| commit | a5297ce35c1ecab2208e19ff2d3903ec170087a8 (patch) | |
| tree | 6d41f24fc0cbd450c5a203bc04a12c82079556ae | |
| parent | d2d70cb6a3bff2c2b771e99e118a834a0c449cbe (diff) | |
| download | emacs-a5297ce35c1ecab2208e19ff2d3903ec170087a8.tar.gz emacs-a5297ce35c1ecab2208e19ff2d3903ec170087a8.zip | |
Fixed first-line problem for function documentation strings.
| -rw-r--r-- | lisp/emacs-lisp/unsafep.el | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el index 583bd1e254d..9ac3beb1949 100644 --- a/lisp/emacs-lisp/unsafep.el +++ b/lisp/emacs-lisp/unsafep.el | |||
| @@ -83,13 +83,13 @@ | |||
| 83 | (require 'byte-opt) ;Set up the `side-effect-free' properties | 83 | (require 'byte-opt) ;Set up the `side-effect-free' properties |
| 84 | 84 | ||
| 85 | (defcustom safe-functions nil | 85 | (defcustom safe-functions nil |
| 86 | "t to disable all safety checks, or a list of assumed-safe functions." | 86 | "t to disable `unsafep', or a list of assumed-safe functions." |
| 87 | :group 'lisp | 87 | :group 'lisp |
| 88 | :type '(choice (const :tag "No" nil) (const :tag "Yes" t) hook)) | 88 | :type '(choice (const :tag "No" nil) (const :tag "Yes" t) hook)) |
| 89 | 89 | ||
| 90 | (defvar unsafep-vars nil | 90 | (defvar unsafep-vars nil |
| 91 | "Dynamically-bound list of variables that have lexical bindings at this | 91 | "Dynamically-bound list of variables with lexical bindings at this point |
| 92 | point in the parse.") | 92 | in the parse.") |
| 93 | (put 'unsafep-vars 'risky-local-variable t) | 93 | (put 'unsafep-vars 'risky-local-variable t) |
| 94 | 94 | ||
| 95 | ;;Side-effect-free functions from subr.el | 95 | ;;Side-effect-free functions from subr.el |
| @@ -114,9 +114,9 @@ point in the parse.") | |||
| 114 | 114 | ||
| 115 | ;;;###autoload | 115 | ;;;###autoload |
| 116 | (defun unsafep (form &optional unsafep-vars) | 116 | (defun unsafep (form &optional unsafep-vars) |
| 117 | "Return nil if evaluating FORM couldn't possibly do any harm; otherwise | 117 | "Return nil if evaluating FORM couldn't possibly do any harm; |
| 118 | result is a reason why FORM is unsafe. UNSAFEP-VARS is a list of symbols | 118 | otherwise result is a reason why FORM is unsafe. UNSAFEP-VARS is a list |
| 119 | with local bindings." | 119 | of symbols with local bindings." |
| 120 | (catch 'unsafep | 120 | (catch 'unsafep |
| 121 | (if (or (eq safe-functions t) ;User turned off safety-checking | 121 | (if (or (eq safe-functions t) ;User turned off safety-checking |
| 122 | (atom form)) ;Atoms are never unsafe | 122 | (atom form)) ;Atoms are never unsafe |
| @@ -210,8 +210,9 @@ with local bindings." | |||
| 210 | 210 | ||
| 211 | 211 | ||
| 212 | (defun unsafep-function (fun) | 212 | (defun unsafep-function (fun) |
| 213 | "Return nil if FUN is a safe function (either a safe lambda or a | 213 | "Return nil if FUN is a safe function |
| 214 | symbol that names a safe function). Otherwise result is a reason code." | 214 | \(either a safe lambda or a symbol that names a safe function). Otherwise |
| 215 | result is a reason code." | ||
| 215 | (cond | 216 | (cond |
| 216 | ((eq (car-safe fun) 'lambda) | 217 | ((eq (car-safe fun) 'lambda) |
| 217 | (unsafep fun unsafep-vars)) | 218 | (unsafep fun unsafep-vars)) |
| @@ -223,8 +224,8 @@ symbol that names a safe function). Otherwise result is a reason code." | |||
| 223 | `(function ,fun)))) | 224 | `(function ,fun)))) |
| 224 | 225 | ||
| 225 | (defun unsafep-progn (list) | 226 | (defun unsafep-progn (list) |
| 226 | "Return nil if all forms in LIST are safe, or the reason for the first | 227 | "Return nil if all forms in LIST are safe, or the reason |
| 227 | unsafe form." | 228 | for the first unsafe form." |
| 228 | (catch 'unsafep-progn | 229 | (catch 'unsafep-progn |
| 229 | (let (reason) | 230 | (let (reason) |
| 230 | (dolist (x list) | 231 | (dolist (x list) |
| @@ -232,8 +233,8 @@ unsafe form." | |||
| 232 | (if reason (throw 'unsafep-progn reason)))))) | 233 | (if reason (throw 'unsafep-progn reason)))))) |
| 233 | 234 | ||
| 234 | (defun unsafep-let (clause) | 235 | (defun unsafep-let (clause) |
| 235 | "CLAUSE is a let-binding, either SYM or (SYM) or (SYM VAL). Throws a | 236 | "CLAUSE is a let-binding, either SYM or (SYM) or (SYM VAL). Checks VAL |
| 236 | reason to `unsafep' if VAL isn't safe. Returns SYM." | 237 | and throws a reason to `unsafep' if unsafe. Returns SYM." |
| 237 | (let (reason sym) | 238 | (let (reason sym) |
| 238 | (if (atom clause) | 239 | (if (atom clause) |
| 239 | (setq sym clause) | 240 | (setq sym clause) |
| @@ -244,8 +245,9 @@ reason to `unsafep' if VAL isn't safe. Returns SYM." | |||
| 244 | sym)) | 245 | sym)) |
| 245 | 246 | ||
| 246 | (defun unsafep-variable (sym global-okay) | 247 | (defun unsafep-variable (sym global-okay) |
| 247 | "Returns nil if SYM is lexically bound or is a non-risky buffer-local | 248 | "Returns nil if SYM is safe as a let-binding sym |
| 248 | variable, otherwise a reason why it is unsafe. Failing to be locally bound | 249 | \(because it already has a temporary binding or is a non-risky buffer-local |
| 250 | variable), otherwise a reason why it is unsafe. Failing to be locally bound | ||
| 249 | is okay if GLOBAL-OKAY is non-nil." | 251 | is okay if GLOBAL-OKAY is non-nil." |
| 250 | (cond | 252 | (cond |
| 251 | ((not (symbolp sym)) | 253 | ((not (symbolp sym)) |