[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/help-fns.el,v
From: |
John Paul Wallington |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/help-fns.el,v |
Date: |
Sat, 20 Oct 2007 01:50:38 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: John Paul Wallington <jpw> 07/10/20 01:50:38
Index: help-fns.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/help-fns.el,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -b -r1.107 -r1.108
--- help-fns.el 19 Oct 2007 01:12:54 -0000 1.107
+++ help-fns.el 20 Oct 2007 01:50:38 -0000 1.108
@@ -456,6 +456,28 @@
(and (or any-symbol (boundp sym)) sym)))))
0))
+(defun describe-variable-custom-version-info (variable)
+ (let ((custom-version (get variable 'custom-version))
+ (cpv (get variable 'custom-package-version))
+ (output nil))
+ (if custom-version
+ (setq output
+ (format "This variable was introduced, or its default value was
changed, in\nversion %s of Emacs.\n"
+ custom-version))
+ (when cpv
+ (let* ((package (car-safe cpv))
+ (version (car (cdr-safe cpv)))
+ (pkg-versions (assq package
customize-package-emacs-version-alist))
+ (emacsv (cdr (assoc version pkg-versions))))
+ (if (and package version)
+ (setq output
+ (format (concat "This variable was introduced, or its
default value was changed, in\nversion %s of the %s package"
+ (if emacsv
+ (format " that is part of Emacs %s"
emacsv))
+ ".\n")
+ version package))))))
+ output))
+
;;;###autoload
(defun describe-variable (variable &optional buffer frame)
"Display the full documentation of VARIABLE (a symbol).
@@ -646,7 +668,7 @@
(with-current-buffer standard-output
(insert (or doc "Not documented as a variable."))))
;; Make a link to customize if this variable can be customized.
- (if (custom-variable-p variable)
+ (when (custom-variable-p variable)
(let ((customize-label "customize"))
(terpri)
(terpri)
@@ -655,7 +677,14 @@
(save-excursion
(re-search-backward
(concat "\\(" customize-label "\\)") nil t)
- (help-xref-button 1 'help-customize-variable variable)))))
+ (help-xref-button 1 'help-customize-variable variable))))
+ ;; Note variable's version or package version
+ (let ((output (describe-variable-custom-version-info variable)))
+ (when output
+ (terpri)
+ (terpri)
+ (princ output))))
+
(print-help-return-message)
(save-excursion
(set-buffer standard-output)
- [Emacs-diffs] Changes to emacs/lisp/help-fns.el,v, Stefan Monnier, 2007/10/09
- [Emacs-diffs] Changes to emacs/lisp/help-fns.el,v, Stefan Monnier, 2007/10/10
- [Emacs-diffs] Changes to emacs/lisp/help-fns.el,v, Richard M. Stallman, 2007/10/14
- [Emacs-diffs] Changes to emacs/lisp/help-fns.el,v, Juanma Barranquero, 2007/10/15
- [Emacs-diffs] Changes to emacs/lisp/help-fns.el,v, Juanma Barranquero, 2007/10/15
- [Emacs-diffs] Changes to emacs/lisp/help-fns.el,v, Richard M. Stallman, 2007/10/18
- [Emacs-diffs] Changes to emacs/lisp/help-fns.el,v, Richard M. Stallman, 2007/10/18
- [Emacs-diffs] Changes to emacs/lisp/help-fns.el,v,
John Paul Wallington <=