diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2006-02-03 13:58:41 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2006-02-03 13:58:41 +0000 |
commit | 0a7114a4e535e70b237b15817988344a03fe7ab1 (patch) | |
tree | 62203ebf84b3070c638cbea265d25fe542514cc0 /lisp/emacs-lisp | |
parent | eb2bfdae0a1b6579908f072ab57aec0d80d6c6ec (diff) | |
parent | c36f1e67800423383832447c45e6125bf46efc7a (diff) | |
download | emacs-0a7114a4e535e70b237b15817988344a03fe7ab1.tar.gz |
Merged from
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-32
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-33
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-34
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-35
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-36
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-37
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-8
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-9
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-10
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-11
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-12
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-13
Merge from emacs--devo--0
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-504
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/unsafep.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el index 4b1312d58d7..27e079b1dcd 100644 --- a/lisp/emacs-lisp/unsafep.el +++ b/lisp/emacs-lisp/unsafep.el @@ -79,11 +79,13 @@ ;; passed a circular list to `assoc', Emacs would crash. Historically, ;; problems of this kind have been few and short-lived. +;;; Code: + (provide 'unsafep) (require 'byte-opt) ;Set up the `side-effect-free' properties (defcustom safe-functions nil - "t to disable `unsafep', or a list of assumed-safe functions." + "A list of assumed-safe functions, or t to disable `unsafep'." :group 'lisp :type '(choice (const :tag "No" nil) (const :tag "Yes" t) hook)) @@ -210,7 +212,7 @@ of symbols with local bindings." (defun unsafep-function (fun) - "Return nil if FUN is a safe function + "Return nil iff FUN is a safe function. \(either a safe lambda or a symbol that names a safe function). Otherwise result is a reason code." (cond @@ -233,7 +235,8 @@ for the first unsafe form." (if reason (throw 'unsafep-progn reason)))))) (defun unsafep-let (clause) - "CLAUSE is a let-binding, either SYM or (SYM) or (SYM VAL). Checks VAL + "Check the safety of a let binding. +CLAUSE is a let-binding, either SYM or (SYM) or (SYM VAL). Checks VAL and throws a reason to `unsafep' if unsafe. Returns SYM." (let (reason sym) (if (atom clause) @@ -245,7 +248,7 @@ and throws a reason to `unsafep' if unsafe. Returns SYM." sym)) (defun unsafep-variable (sym global-okay) - "Returns nil if SYM is safe as a let-binding sym + "Return nil if SYM is safe as a let-binding sym \(because it already has a temporary binding or is a non-risky buffer-local variable), otherwise a reason why it is unsafe. Failing to be locally bound is okay if GLOBAL-OKAY is non-nil." @@ -259,5 +262,5 @@ is okay if GLOBAL-OKAY is non-nil." (local-variable-p sym))) `(global-variable ,sym)))) -;;; arch-tag: 6216f98b-eb8f-467a-9c33-7a7644f50658 -;; unsafep.el ends here. +;; arch-tag: 6216f98b-eb8f-467a-9c33-7a7644f50658 +;;; unsafep.el ends here |