From unknown Sat Jun 21 10:42:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22425: 24.5; hide-ifdef-mode does not consider #elif defined Resent-From: quintus@quintilianus.eu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Jan 2016 11:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 22425 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 22425@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.145337441030837 (code B ref -1); Thu, 21 Jan 2016 11:07:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Jan 2016 11:06:50 +0000 Received: from localhost ([127.0.0.1]:55854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMD4k-00081J-Bx for submit@debbugs.gnu.org; Thu, 21 Jan 2016 06:06:50 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33146) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMD4i-000817-EL for submit@debbugs.gnu.org; Thu, 21 Jan 2016 06:06:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMD4c-0004qe-9n for submit@debbugs.gnu.org; Thu, 21 Jan 2016 06:06:43 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,NO_DNS_FOR_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMD4c-0004qa-6L for submit@debbugs.gnu.org; Thu, 21 Jan 2016 06:06:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMD4b-0007W4-1y for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2016 06:06:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMD4a-0004qK-3i for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2016 06:06:40 -0500 Received: from montblanc.guelkerdev.de ([2001:67c:12a0::b4a4:4290]:58372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMD4Z-0004qC-U9 for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2016 06:06:40 -0500 Received: from localhost (unknown [IPv6:2001:4dd0:ae32:1:a878:efed:47b2:32a4]) by montblanc.guelkerdev.de (Postfix) with ESMTPSA id E96C8687326 for ; Thu, 21 Jan 2016 10:26:46 +0000 (UTC) From: quintus@quintilianus.eu Date: Thu, 21 Jan 2016 11:26:45 +0100 Message-ID: <87k2n36xei.fsf@hades.cable.internal.west-ik.de> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.6 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.6 (----) Hi, the hide-ifdef-mode minor mode does not consider "#elif defined" lines. Example program demonstrating the issue: #include int main() { #if defined(_WIN32) printf("Windows\n"); #elif defined(__unix__) printf("Unixish\n"); #else #error unsupported system #endif return 0; } Trying to collapse only the "#if defined(_WIN32)" part or only the "#elif defined(__unix__)" part will not work. hide-ifdef-mode should allow that. In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6) of 2015-09-10 on foutrelis Configured using: `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' Important settings: value of $LANG: de_DE.UTF-8 locale-coding-system: utf-8-unix Major mode: C/l Minor modes in effect: hide-ifdef-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Hide-Ifdef mode enabled Hiding... Hiding done Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils hideif cc-langs cl-loaddefs cl-lib cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 105462 3848) (symbols 48 20132 0) (miscs 40 39 110) (strings 32 16768 4033) (string-bytes 1 565621) (vectors 16 9374) (vector-slots 8 369105 11156) (floats 8 65 359) (intervals 56 230 0) (buffers 960 12) (heap 1024 26161 812)) From unknown Sat Jun 21 10:42:11 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: quintus@quintilianus.eu Subject: bug#22425: closed (Re: bug#22425: 24.5; hide-ifdef-mode does not consider #elif defined) Message-ID: References: <83wpr29aks.fsf@gnu.org> <87k2n36xei.fsf@hades.cable.internal.west-ik.de> X-Gnu-PR-Message: they-closed 22425 X-Gnu-PR-Package: emacs Reply-To: 22425@debbugs.gnu.org Date: Thu, 21 Jan 2016 16:12:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1453392722-1495-1" This is a multi-part message in MIME format... ------------=_1453392722-1495-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #22425: 24.5; hide-ifdef-mode does not consider #elif defined which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 22425@debbugs.gnu.org. --=20 22425: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D22425 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1453392722-1495-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 22425-done) by debbugs.gnu.org; 21 Jan 2016 16:11:27 +0000 Received: from localhost ([127.0.0.1]:56637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMHpX-0000NG-0t for submit@debbugs.gnu.org; Thu, 21 Jan 2016 11:11:27 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44110) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMHpW-0000N5-4W for 22425-done@debbugs.gnu.org; Thu, 21 Jan 2016 11:11:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMHpM-0005By-Rb for 22425-done@debbugs.gnu.org; Thu, 21 Jan 2016 11:11:20 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMHpM-0005Bk-Nv; Thu, 21 Jan 2016 11:11:16 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4345 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aMHpM-0008HR-4Y; Thu, 21 Jan 2016 11:11:16 -0500 Date: Thu, 21 Jan 2016 18:11:31 +0200 Message-Id: <83wpr29aks.fsf@gnu.org> From: Eli Zaretskii To: quintus@quintilianus.eu In-reply-to: <87k2n36xei.fsf@hades.cable.internal.west-ik.de> (quintus@quintilianus.eu) Subject: Re: bug#22425: 24.5; hide-ifdef-mode does not consider #elif defined References: <87k2n36xei.fsf@hades.cable.internal.west-ik.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 22425-done Cc: 22425-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: quintus@quintilianus.eu > Date: Thu, 21 Jan 2016 11:26:45 +0100 > > the hide-ifdef-mode minor mode does not consider "#elif defined" > lines. Example program demonstrating the issue: > > #include > > int main() > { > #if defined(_WIN32) > printf("Windows\n"); > #elif defined(__unix__) > printf("Unixish\n"); > #else > #error unsupported system > #endif > return 0; > } > > Trying to collapse only the "#if defined(_WIN32)" part or only the > "#elif defined(__unix__)" part will not work. hide-ifdef-mode should > allow that. Thank you for taking time and effort to report this. I can reproduce this in Emacs 24.5, but not in the current emacs-25 branch that will become Emacs 25.1. So I guess this deficiency was already fixed, and I'm therefore marking this bug done. ------------=_1453392722-1495-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 21 Jan 2016 11:06:50 +0000 Received: from localhost ([127.0.0.1]:55854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMD4k-00081J-Bx for submit@debbugs.gnu.org; Thu, 21 Jan 2016 06:06:50 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33146) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMD4i-000817-EL for submit@debbugs.gnu.org; Thu, 21 Jan 2016 06:06:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMD4c-0004qe-9n for submit@debbugs.gnu.org; Thu, 21 Jan 2016 06:06:43 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,NO_DNS_FOR_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMD4c-0004qa-6L for submit@debbugs.gnu.org; Thu, 21 Jan 2016 06:06:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMD4b-0007W4-1y for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2016 06:06:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMD4a-0004qK-3i for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2016 06:06:40 -0500 Received: from montblanc.guelkerdev.de ([2001:67c:12a0::b4a4:4290]:58372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMD4Z-0004qC-U9 for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2016 06:06:40 -0500 Received: from localhost (unknown [IPv6:2001:4dd0:ae32:1:a878:efed:47b2:32a4]) by montblanc.guelkerdev.de (Postfix) with ESMTPSA id E96C8687326 for ; Thu, 21 Jan 2016 10:26:46 +0000 (UTC) From: quintus@quintilianus.eu To: bug-gnu-emacs@gnu.org Subject: 24.5; hide-ifdef-mode does not consider #elif defined Date: Thu, 21 Jan 2016 11:26:45 +0100 Message-ID: <87k2n36xei.fsf@hades.cable.internal.west-ik.de> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.6 (----) Hi, the hide-ifdef-mode minor mode does not consider "#elif defined" lines. Example program demonstrating the issue: #include int main() { #if defined(_WIN32) printf("Windows\n"); #elif defined(__unix__) printf("Unixish\n"); #else #error unsupported system #endif return 0; } Trying to collapse only the "#if defined(_WIN32)" part or only the "#elif defined(__unix__)" part will not work. hide-ifdef-mode should allow that. In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6) of 2015-09-10 on foutrelis Configured using: `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' Important settings: value of $LANG: de_DE.UTF-8 locale-coding-system: utf-8-unix Major mode: C/l Minor modes in effect: hide-ifdef-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Hide-Ifdef mode enabled Hiding... Hiding done Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils hideif cc-langs cl-loaddefs cl-lib cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 105462 3848) (symbols 48 20132 0) (miscs 40 39 110) (strings 32 16768 4033) (string-bytes 1 565621) (vectors 16 9374) (vector-slots 8 369105 11156) (floats 8 65 359) (intervals 56 230 0) (buffers 960 12) (heap 1024 26161 812)) ------------=_1453392722-1495-1--