From: Luke Lee <luke.yx.lee@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Update earlier posted hideif.el enhancements
Date: Fri, 8 Nov 2013 12:07:26 +0800 [thread overview]
Message-ID: <CAA=xLRM_yyrLO6Qyum9aMEQud+8DMUB_ABU2G9390rh8-VpaGQ@mail.gmail.com> (raw)
In-Reply-To: <jwvy54z4na1.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 2032 bytes --]
Sure, my fault. I just thought that it will be easier for people that
didn't have my earlier version yet.
Here is the patch, thanks.
---
diff --git a/elisp/hideif.el b/elisp/hideif.el
index 2e35fcd..a85e28e 100755
--- a/elisp/hideif.el
+++ b/elisp/hideif.el
@@ -1574,6 +1574,7 @@ Return a list of the arguments, if '...' exists the
first arg will be hif-etc."
;; or we save the tokens, parse it after
parameter replacement
(expr (and tokens
(or (and hif-simple-token-only
+ (listp tokens)
(= (length tokens) 1)
(hif-parse-if-exp tokens))
`(hif-define-macro ,parmlist
,tokens))))
@@ -1581,9 +1582,10 @@ Return a list of the arguments, if '...' exists the
first arg will be hif-etc."
(assoc (intern name) hide-ifdef-env))))
(and name
(if SA
- (setcdr SA expr) ;; Lazy evaluation, eval
only if hif-lookup find it
+ (or (setcdr SA expr) t) ;; Lazy evaluation,
eval only if hif-lookup find it
;; define it anyway, even if nil it's still in
list and therefore considerred defined
(push (cons (intern name) expr)
hide-ifdef-env)))))
+ ;; #undef
(and name
(hif-undefine-symbol (intern name))))))
t))
@@ -1835,7 +1837,7 @@ If prefixed, it will also hide #ifdefs themselves."
"Compress the define list ENV into a list of defined symbols only."
(let ((new-defs nil))
(dolist (def env new-defs)
- (if (hif-lookup (car def)) (push (car env) new-defs)))))
+ (if (hif-lookup (car def)) (push (car def) new-defs)))))
(defun hide-ifdef-set-define-alist (name)
"Set the association for NAME to `hide-ifdef-env'."
[-- Attachment #2: Type: text/html, Size: 2534 bytes --]
next prev parent reply other threads:[~2013-11-08 4:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-08 1:59 Update earlier posted hideif.el enhancements Luke Lee
2013-11-08 2:54 ` Stefan Monnier
2013-11-08 4:07 ` Luke Lee [this message]
2013-11-24 17:50 ` Stefan Monnier
[not found] ` <CAA=xLROospEnRM_Es0bBkQUpC_RmrS-vQDxprD2it+fVDbVKog@mail.gmail.com>
2013-11-25 6:35 ` Fwd: " Luke Lee
2013-11-29 21:59 ` Stefan Monnier
2013-12-03 4:33 ` Luke Lee
2013-12-03 13:45 ` Stefan Monnier
2013-12-04 2:06 ` Luke Lee
2013-12-04 15:28 ` Luke Lee
2013-12-04 17:33 ` Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAA=xLRM_yyrLO6Qyum9aMEQud+8DMUB_ABU2G9390rh8-VpaGQ@mail.gmail.com' \
--to=luke.yx.lee@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 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.