summaryrefslogtreecommitdiff
path: root/lisp/help-fns.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2010-09-20 13:13:52 +0200
committerStefan Monnier <monnier@iro.umontreal.ca>2010-09-20 13:13:52 +0200
commit0097720d41e0c99856518c2c131922e716ec9f74 (patch)
tree34e99523373b6a6f6f5967fb1ee22ba3461a0333 /lisp/help-fns.el
parent0e6b7ca0f80c66f4f18a3ec7b2b549c799452f3d (diff)
downloademacs-0097720d41e0c99856518c2c131922e716ec9f74.tar.gz
* lisp/help-fns.el (describe-variable): Add original value, if applicable.
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r--lisp/help-fns.el15
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 4456a494099..9739762637a 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -645,7 +645,20 @@ it is displayed along with the global value."
;; inappropriate e.g C-h v <RET> features <RET>
;; (help-xref-on-pp from (point))
(if (< (point) (+ from 20))
- (delete-region (1- from) from)))))
+ (delete-region (1- from) from))
+ (let* ((sv (get variable 'standard-value))
+ (origval (and (consp sv)
+ (condition-case nil
+ (eval (car sv))
+ (error :help-eval-error)))))
+ (when (and (consp sv)
+ (not (equal origval val))
+ (not (equal origval :help-eval-error)))
+ (princ "\nOriginal value was \n")
+ (setq from (point))
+ (pp origval)
+ (if (< (point) (+ from 20))
+ (delete-region (1- from) from)))))))
(terpri)
(when locus