unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juan-Leon Lahoz Garcia <juanleon1@gmail.com>
Subject: Making hide-ifdef-use-define-alist more user friendly
Date: Mon, 21 Feb 2005 03:03:03 -0600 (CST)	[thread overview]
Message-ID: <200502210903.j1L933jt024808@il06exr01.mot.com> (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

             reply	other threads:[~2005-02-21  9:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-21  9:03 Juan-Leon Lahoz Garcia [this message]
2005-02-21 10:28 ` Making hide-ifdef-use-define-alist more user friendly 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200502210903.j1L933jt024808@il06exr01.mot.com \
    --to=juanleon1@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).