emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101500: * lisp/help-fns.el (describe


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101500: * lisp/help-fns.el (describe-variable): Add original value, if applicable.
Date: Mon, 20 Sep 2010 13:13:52 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101500
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2010-09-20 13:13:52 +0200
message:
  * lisp/help-fns.el (describe-variable): Add original value, if applicable.
modified:
  lisp/ChangeLog
  lisp/help-fns.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-09-20 01:20:32 +0000
+++ b/lisp/ChangeLog    2010-09-20 11:13:52 +0000
@@ -1,3 +1,7 @@
+2010-09-20  Stefan Monnier  <address@hidden>
+
+       * help-fns.el (describe-variable): Add original value, if applicable.
+
 2010-09-20  Juanma Barranquero  <address@hidden>
 
        * subr.el (y-or-n-p): Remove leftover code from revno 101459.

=== modified file 'lisp/help-fns.el'
--- a/lisp/help-fns.el  2010-08-29 16:17:13 +0000
+++ b/lisp/help-fns.el  2010-09-20 11:13:52 +0000
@@ -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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]