From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#17854: The patch #3 of 3 for hideif.el, a lot of bug fixes and enhancements Date: Thu, 26 Jun 2014 12:56:04 -0400 Message-ID: <4h38er4nkr.fsf@fencepost.gnu.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1403801839 22529 80.91.229.3 (26 Jun 2014 16:57:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Jun 2014 16:57:19 +0000 (UTC) Cc: 17854@debbugs.gnu.org To: Luke Lee Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 26 18:57:11 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1X0Cyy-0007FN-Gs for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Jun 2014 18:57:08 +0200 Original-Received: from localhost ([::1]:46028 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0Cyy-0003k8-2O for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Jun 2014 12:57:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0Cyt-0003jz-VD for bug-gnu-emacs@gnu.org; Thu, 26 Jun 2014 12:57:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0Cyt-0005Kv-05 for bug-gnu-emacs@gnu.org; Thu, 26 Jun 2014 12:57:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42784) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0Cys-0005Kp-T0 for bug-gnu-emacs@gnu.org; Thu, 26 Jun 2014 12:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X0Cys-0001eU-8n for bug-gnu-emacs@gnu.org; Thu, 26 Jun 2014 12:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Jun 2014 16:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17854 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 17854-submit@debbugs.gnu.org id=B17854.14038017756231 (code B ref 17854); Thu, 26 Jun 2014 16:57:02 +0000 Original-Received: (at 17854) by debbugs.gnu.org; 26 Jun 2014 16:56:15 +0000 Original-Received: from localhost ([127.0.0.1]:33934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X0Cy3-0001cK-Bn for submit@debbugs.gnu.org; Thu, 26 Jun 2014 12:56:15 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:55881 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X0Cxx-0001bx-6a for 17854@debbugs.gnu.org; Thu, 26 Jun 2014 12:56:09 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1X0Cxw-0003mo-8Z; Thu, 26 Jun 2014 12:56:04 -0400 X-Spook: FIPS140 top secret DRM industrial espionage broadside X-Ran: jze]1z5n~dOON^(Po:u7z5+j (Luke Lee's message of "Thu, 26 Jun 2014 21:51:36 +0800") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:90850 Archived-At: Some stylistic comments only: It needs a ChangeLog entry, and probably a NEWS entry. > -;; Daniel LaLiberte > +;; Daniel LaLiberte Please don't change existing whitespace in areas that you are not otherwise touching. > -;; (unless hide-ifdef-define-alist > -;; (setq hide-ifdef-define-alist > -;; '((list1 ONE TWO) > -;; (list2 TWO THREE)))) > -;; (hide-ifdef-use-define-alist 'list2))) ; use list2 by default > +;; (unless hide-ifdef-define-alist > +;; (setq hide-ifdef-define-alist > +;; '((list1 ONE TWO) > +;; (list2 TWO THREE)))) > +;; (hide-ifdef-use-define-alist 'list2))) ; use list2 by default Again, this is just whitespace. > @@ -129,16 +129,44 @@ > "Non-nil means shadow text instead of hiding it." > :type 'boolean > :group 'hide-ifdef > - :version "23.1") > + :version "24.5") > > (defface hide-ifdef-shadow '((t (:inherit shadow))) > "Face for shadowing ifdef blocks." > :group 'hide-ifdef > - :version "23.1") > + :version "24.5") Why is the :version changing, when the defaults are unchanged? > (defcustom hide-ifdef-exclude-define-regexp nil > "Ignore #define names if those names match this exclusion pattern." > :type 'string) > +(defcustom hide-ifdef-expand-reinclusion-protection t > + "When hiding header files, enabling this flag allows hideif always try to > +expand the re-inclusion protected ifdefs. Disabling this flag those headers > +are usually hidden to a top level #ifdef...#endif due to those defined symbols The first line of a doc-string should be a complete sentence that fits in < 80 columns. All the doc should fit within the standard fill-column. > + :type 'boolean > + :group 'hide-ifdef) > + > +(defcustom hide-ifdef-header-regexp-pattern > + "^.*\\.[hH]\\([hH]\\|[xX][xX]\\|[pP][pP]\\)?" > + "C/C++ header file name patterns. Effective only if > +`hide-ifdef-expand-reinclusion-protection' is t." > + :type 'string > + :group 'hide-ifdef) Again, the first line of the doc should be a complete sentence. New defcustoms need :version tags (and probably NEWS entries). > +(defvar hide-ifdef-env-backup nil > + "A backup variable to prevent `hide-ifdef-env' accidentally cleared by > +`hif-clear-all-ifdef-defined'.") First line of doc too long. Also, this is ungrammatical. > `hide-ifdef-env' > - An association list of defined and undefined symbols for the > - current buffer. Initially, the global value of `hide-ifdef-env' > - is used. > + An association list of defined and undefined symbols for the > + current project. Initially, the global value of `hide-ifdef-env' > + is used. This variable was a buffer-local variable but is now a > + global variable since we've extend hideif to support project-based s/extend/extended. "project-based across all-buffers" doesn't make sense. I'm not sure that describing how things used to work is helpful. > + across all-buffers. To simulate the original buffer local behavior > + we need to clear this variable (C-c @ C) then hide current buffer. > `hide-ifdef-define-alist' > - An association list of defined symbol lists. > + An association list of defined symbol lists. whitespace. > - Set to non-nil to not show #if, #ifdef, #ifndef, #else, and > - #endif lines when hiding. > + Set to non-nil to not show #if, #ifdef, #ifndef, #else, and > + #endif lines when hiding. whitespace. At this point, I'll give up, and ask you to send a version that does not have pointless whitespace changes. :)