From 6fe7b8a42c19f49812793c161d417bfec0b3dd05 Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Thu, 11 May 2006 11:03:57 +0000 Subject: [PATCH] (describe-variable): Don't print safe-var if it is byte-code. Improve wording as suggested by Luc Teirlinck . --- lisp/ChangeLog | 6 ++++++ lisp/help-fns.el | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ea8fdc06a40..3b7c47339ca 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2006-05-11 Reiner Steib + + * help-fns.el (describe-variable): Don't print safe-var if it is + byte-code. Improve wording as suggested by Luc Teirlinck + . + 2006-05-11 Nick Roberts * progmodes/gdb-ui.el (gdb-reset): Update speedbar if necessary. diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 2b75e7fd053..c56d517aed3 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -642,10 +642,12 @@ it is displayed along with the global value." (princ (if (stringp (car obsolete)) (car obsolete) (format "use `%s' instead." (car obsolete)))) (terpri)) - (when safe-var - (princ "This variable is safe to use as a file local variable") - (princ (format " only if its value\nsatisfies the predicate `%s'.\n" - safe-var)) + (when safe-var + (princ "\n\nThis variable is safe as a file local variable ") + (princ "if its value\nsatisfies the predicate ") + (princ (if (byte-code-function-p safe-var) + "which is byte-compiled expression.\n" + (format "`%s'.\n" safe-var))) (terpri)) (princ "Documentation:\n") (princ (or doc "Not documented as a variable."))) -- 2.39.5