unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* mentioning variable aliases in `describe-variable'
@ 2002-07-10  9:42 John Paul Wallington
  2002-07-11 19:25 ` Stefan Monnier
  0 siblings, 1 reply; 26+ messages in thread
From: John Paul Wallington @ 2002-07-10  9:42 UTC (permalink / raw)


I think it would be nice to mention when a variable is an alias in
`describe-variable'.  What do people think ?

2002-07-10  John Paul Wallington  <jpw@shootybangbang.com>

	* help-fns.el (describe-variable): Mention if the variable is an
	alias.

Index: help-fns.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/help-fns.el,v
retrieving revision 1.12
diff -u -r1.12 help-fns.el
--- help-fns.el	27 Jun 2002 16:10:23 -0000	1.12
+++ help-fns.el	10 Jul 2002 09:35:23 -0000
@@ -438,7 +438,16 @@
 		(terpri)))
 	    (let ((doc (documentation-property variable 'variable-documentation)))
 	      (princ (or doc "Not documented as a variable.")))
-	  
+	    
+	    ;; Mention if the variable is an alias.
+	    (let ((alias (condition-case nil
+			     (indirect-variable variable)
+			   (error variable))))
+	      (unless (eq alias variable)
+		(terpri)
+		(terpri)
+		(princ (format "This variable is an alias for `%s'." alias))))
+	    
 	    ;; Make a link to customize if this variable can be customized.
 	    ;; Note, it is not reliable to test only for a custom-type property
 	    ;; because those are only present after the var's definition

-- 
John Paul Wallington

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2002-07-19  6:28 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-10  9:42 mentioning variable aliases in `describe-variable' John Paul Wallington
2002-07-11 19:25 ` Stefan Monnier
2002-07-12  0:30   ` John Paul Wallington
2002-07-12 10:17     ` Juanma Barranquero
2002-07-12 15:25       ` Stefan Monnier
2002-07-15 15:40         ` Juanma Barranquero
2002-07-16 11:31         ` Juanma Barranquero
2002-07-17  3:04           ` Richard Stallman
2002-07-17  8:02             ` Juanma Barranquero
2002-07-17 13:06               ` arglist in docstring (was: mentioning variable aliases in `describe-variable' ) Stefan Monnier
2002-07-17 13:51                 ` Juanma Barranquero
2002-07-17 14:33                   ` Stefan Monnier
2002-07-17 15:02                     ` Juanma Barranquero
2002-07-17 14:21                 ` Juanma Barranquero
2002-07-17 14:31                   ` Stefan Monnier
2002-07-17 15:15                     ` Juanma Barranquero
2002-07-18 14:55                   ` Richard Stallman
2002-07-18 15:25                     ` Juanma Barranquero
2002-07-18 21:14                       ` Richard Stallman
2002-07-19  6:28                         ` Juanma Barranquero
2002-07-12  7:18   ` mentioning variable aliases in `describe-variable' Juanma Barranquero
2002-07-12  7:55     ` John Paul Wallington
2002-07-12  8:00       ` Miles Bader
2002-07-12  8:47         ` John Paul Wallington
2002-07-12 10:26           ` Juanma Barranquero
2002-07-12 15:25         ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).