[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
add info about safe-local-variable to describe-variable
From: |
Dan Nicolaescu |
Subject: |
add info about safe-local-variable to describe-variable |
Date: |
Fri, 28 Apr 2006 16:38:01 -0700 |
AFAIK to find out whether a variable is safe or not one has to read
the source code. It would be nice to have describe-variable give this
information.
Should I check this in?
(suggestions for better wording/formating are welcome)
*** help-fns.el 18 Feb 2006 21:47:52 -0800 1.86
--- help-fns.el 28 Apr 2006 11:09:44 -0700
***************
*** 630,635 ****
--- 630,636 ----
(indirect-variable variable)
(error variable)))
(obsolete (get variable 'byte-obsolete-variable))
+ (safe-var (get variable 'safe-local-variable))
(doc (or (documentation-property variable
'variable-documentation)
(documentation-property alias
'variable-documentation))))
(unless (eq alias variable)
***************
*** 641,646 ****
--- 642,656 ----
(princ (if (stringp (car obsolete)) (car obsolete)
(format "use `%s' instead." (car obsolete))))
(terpri))
+
+ (when safe-var
+ (princ "\nThis variable is safe to use as a file local
variable")
+ (unless (eq safe-var t)
+ (princ (format " only if its value\nsatisfies the predicate
`%s'"
+ safe-var)))
+ (princ ".")
+ (terpri))
+
(princ "Documentation:\n")
(princ (or doc "Not documented as a variable.")))
;; Make a link to customize if this variable can be customized.
- add info about safe-local-variable to describe-variable,
Dan Nicolaescu <=