From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: CEDET merge Date: Tue, 02 Oct 2012 23:24:10 +0800 Message-ID: <87d310yk11.fsf@gnu.org> References: <87fw6izq6z.fsf@gnu.org> <87obl6c7dj.fsf@engster.org> <87bogsedna.fsf_-_@engster.org> <87626vd380.fsf@engster.org> <87mx06svos.fsf@gnu.org> <87wqzab4s6.fsf@engster.org> <87r4piytfe.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1349191514 399 80.91.229.3 (2 Oct 2012 15:25:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Oct 2012 15:25:14 +0000 (UTC) Cc: "Eric M. Ludlam" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 02 17:25:18 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TJ4Kr-0007Zj-DA for ged-emacs-devel@m.gmane.org; Tue, 02 Oct 2012 17:24:37 +0200 Original-Received: from localhost ([::1]:51302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJ4Kl-0006w9-I5 for ged-emacs-devel@m.gmane.org; Tue, 02 Oct 2012 11:24:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJ4Ke-0006w2-Gv for emacs-devel@gnu.org; Tue, 02 Oct 2012 11:24:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJ4KY-0001sr-Mu for emacs-devel@gnu.org; Tue, 02 Oct 2012 11:24:24 -0400 Original-Received: from mail-pa0-f41.google.com ([209.85.220.41]:52224) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJ4KY-0001rE-G6 for emacs-devel@gnu.org; Tue, 02 Oct 2012 11:24:18 -0400 Original-Received: by padfa10 with SMTP id fa10so5753053pad.0 for ; Tue, 02 Oct 2012 08:24:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=1AbcQ0r8tA4vCS5zjl7yTmnlmVL5hbBHQxqHdtDbLUs=; b=MiUQYa/HsuocRi/537ThUm1dG84xe1YDSNP9T96fccKi7Rj5CPz/PF901mzMmLB8aC xjMPbYjZgcgwvNSeaxUn5w27XzCAw7VS4z3HbAC3VjIQvR37s7WxA13wFPgMtqUmPxe6 /ZNKelBPa5KyZfmWgPZrcWVXvrMZo2d2S0R17wX7feRWO1dBhCos0dhff3kD856r/LgI vZstXjmKyBaQKoHmzeMpCpQrZ0FKeDejZhvbP06zFX0lwh8GM7cXzpqyj7iii0Xzpdop zoFcBNkqQPPlwoCfXWfpxyzjfvfn8Z3mMV8v521WBy7kiPJxf392OIXuQnuEk6SZv/jp 0MQg== Original-Received: by 10.66.77.170 with SMTP id t10mr44991829paw.0.1349191457660; Tue, 02 Oct 2012 08:24:17 -0700 (PDT) Original-Received: from ulysses (cm162.gamma80.maxonline.com.sg. [202.156.80.162]) by mx.google.com with ESMTPS id vf8sm1050851pbc.27.2012.10.02.08.24.13 (version=SSLv3 cipher=OTHER); Tue, 02 Oct 2012 08:24:16 -0700 (PDT) In-Reply-To: <87r4piytfe.fsf@gnu.org> (Chong Yidong's message of "Tue, 02 Oct 2012 01:48:53 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.220.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:153920 Archived-At: Chong Yidong 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) === .