[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CEDET merge
From: |
Chong Yidong |
Subject: |
Re: CEDET merge |
Date: |
Tue, 02 Oct 2012 23:24:10 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
Chong Yidong <address@hidden> writes:
> To replace the defadvice, it is acceptable to just change the code of
> hif-defined and hif-lookup directly to refer to
> semantic-c-takeover-hideif (if it is bound); no need to use a hook.
> Feel free to submit a patch, or I'll get around to it when I have the
> time.
I've done that now (see the patch below, committed to trunk).
=== modified file 'lisp/progmodes/hideif.el'
*** lisp/progmodes/hideif.el 2012-08-22 07:17:52 +0000
--- lisp/progmodes/hideif.el 2012-10-02 15:19:52 +0000
***************
*** 329,344 ****
"Prepend (var value) pair to hide-ifdef-env."
(setq hide-ifdef-env (cons (cons var value) hide-ifdef-env)))
(defun hif-lookup (var)
! ;; (message "hif-lookup %s" var)
! (let ((val (assoc var hide-ifdef-env)))
! (if val
! (cdr val)
! hif-undefined-symbol)))
(defun hif-defined (var)
! (if (assoc var hide-ifdef-env) 1 0))
;;===%%SF%% evaluation (End) ===
--- 329,351 ----
"Prepend (var value) pair to hide-ifdef-env."
(setq hide-ifdef-env (cons (cons var value) hide-ifdef-env)))
+ (declare-function semantic-c-hideif-lookup "semantic/bovine/c" (var))
+ (declare-function semantic-c-hideif-defined "semantic/bovine/c" (var))
(defun hif-lookup (var)
! (or (when (bound-and-true-p semantic-c-takeover-hideif)
! (semantic-c-hideif-lookup var))
! (let ((val (assoc var hide-ifdef-env)))
! (if val
! (cdr val)
! hif-undefined-symbol))))
(defun hif-defined (var)
! (cond
! ((bound-and-true-p semantic-c-takeover-hideif)
! (semantic-c-hideif-defined var))
! ((assoc var hide-ifdef-env) 1)
! (t 0)))
;;===%%SF%% evaluation (End) ===
.
- Re: CEDET merge, Eric M. Ludlam, 2012/10/01
- Re: CEDET merge, David Engster, 2012/10/01
- Re: CEDET merge, Dmitry Gutov, 2012/10/01
- Re: CEDET merge, David Engster, 2012/10/04
- Re: CEDET merge, Chong Yidong, 2012/10/06
- Re: CEDET merge, David Engster, 2012/10/06
- Re: CEDET merge, Chong Yidong, 2012/10/06
- Re: CEDET merge, Stefan Monnier, 2012/10/06
- Re: CEDET merge, David Engster, 2012/10/06
- Re: CEDET merge, Stefan Monnier, 2012/10/06