Mercurial > emacs
changeset 110438:19f465048335
* lisp/help-fns.el (describe-variable): Add original value, if applicable.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 20 Sep 2010 13:13:52 +0200 |
parents | fc6cde6b7f22 |
children | c1e130042fa1 |
files | lisp/ChangeLog lisp/help-fns.el |
diffstat | 2 files changed, 18 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Mon Sep 20 10:16:02 2010 +0000 +++ b/lisp/ChangeLog Mon Sep 20 13:13:52 2010 +0200 @@ -1,3 +1,7 @@ +2010-09-20 Stefan Monnier <monnier@iro.umontreal.ca> + + * help-fns.el (describe-variable): Add original value, if applicable. + 2010-09-20 Juanma Barranquero <lekktu@gmail.com> * subr.el (y-or-n-p): Remove leftover code from revno 101459.
--- a/lisp/help-fns.el Mon Sep 20 10:16:02 2010 +0000 +++ b/lisp/help-fns.el Mon Sep 20 13:13:52 2010 +0200 @@ -645,7 +645,20 @@ ;; 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