all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Making hide-ifdef-use-define-alist more user friendly
@ 2005-02-21  9:03 Juan-Leon Lahoz Garcia
  2005-02-21 10:28 ` Kim F. Storm
  0 siblings, 1 reply; 6+ messages in thread
From: Juan-Leon Lahoz Garcia @ 2005-02-21  9:03 UTC (permalink / raw)



Hi,

`hide-ifdef-use-define-alist', when invoked interactivelly, does not
know how to complete to the symbols in alist `hide-ifdef-define-alist',
despite it is mandatory to enter one of them.

This is an incovenience because when you use several list is hard to
remember the exact names for them.

Since I can see in CVS this file is untouched for a lot of time, here
goes a patch so solve this (you might find a more elegant solution, I
suppose), just for the case of anyone here with time to review it and
maybe modify and/or apply.

--- hideif.el.ori	Mon Feb 21 09:33:58 2005
+++ hideif.el	Mon Feb 21 10:08:52 2005
@@ -1061,9 +1061,16 @@
 	(cons (cons name (hif-compress-define-list hide-ifdef-env))
 	      hide-ifdef-define-alist)))
 
-(defun hide-ifdef-use-define-alist (name)
+(defun hide-ifdef-use-define-alist (&optional name)
   "Set `hide-ifdef-env' to the define list specified by NAME."
-  (interactive "SUse define list: ")
+  (interactive)
+  (unless name
+    (setq name
+          (completing-read "Use define list: "
+                           (mapcar (lambda (arg)
+                                     (cons (symbol-name (car arg)) t))
+                                   hide-ifdef-define-alist) nil t)))
+  (if (stringp name) (setq name (intern name)))
   (let ((define-list (assoc name hide-ifdef-define-alist)))
     (if define-list
 	(setq hide-ifdef-env

--
Regards
juanleon

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

end of thread, other threads:[~2005-02-22 20:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-21  9:03 Making hide-ifdef-use-define-alist more user friendly Juan-Leon Lahoz Garcia
2005-02-21 10:28 ` Kim F. Storm
2005-02-21 11:13   ` Juan LEON Lahoz Garcia
2005-02-22 18:12     ` Richard Stallman
2005-02-22 18:11   ` Richard Stallman
2005-02-22 20:54     ` Kim F. Storm

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.