From unknown Sun Aug 17 09:10:38 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#2224 <2224@debbugs.gnu.org> To: bug#2224 <2224@debbugs.gnu.org> Subject: Status: [PATCH] add-log.el: Modularize add-log-current-defun, new types supported Reply-To: bug#2224 <2224@debbugs.gnu.org> Date: Sun, 17 Aug 2025 16:10:38 +0000 retitle 2224 [PATCH] add-log.el: Modularize add-log-current-defun, new type= s supported reassign 2224 emacs submitter 2224 Jari Aalto severity 2224 wishlist tag 2224 patch thanks From jari.aalto@cante.net Fri Feb 6 09:41:48 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 6 Feb 2009 17:41:49 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: ** X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=2.3 required=4.0 tests=FOURLA,FVGT_m_MULTI_ODD, IMPRONONCABLE_1,IMPRONONCABLE_2,MURPHY_DRUGS_REL8,MURPHY_WRONG_WORD2 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from emh01.mail.saunalahti.fi (emh01.mail.saunalahti.fi [62.142.5.107]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n16HfXmM003356; Fri, 6 Feb 2009 09:41:34 -0800 Received: from saunalahti-vams (vs3-12.mail.saunalahti.fi [62.142.5.96]) by emh01-2.mail.saunalahti.fi (Postfix) with SMTP id 76A7B8C150; Fri, 6 Feb 2009 19:41:31 +0200 (EET) Received: from emh07.mail.saunalahti.fi ([62.142.5.117]) by vs3-12.mail.saunalahti.fi ([62.142.5.96]) with SMTP (gateway) id A04AD559AFF; Fri, 06 Feb 2009 19:41:31 +0200 Received: from picasso.cante.net (a91-155-187-216.elisa-laajakaista.fi [91.155.187.216]) by emh07.mail.saunalahti.fi (Postfix) with ESMTP id 2C95F1C6388; Fri, 6 Feb 2009 19:41:26 +0200 (EET) Received: from [192.168.1.7] (helo=jondo.cante.net) by picasso.cante.net with esmtp (Exim 4.69) (envelope-from ) id 1LVUhh-0004F6-0C; Fri, 06 Feb 2009 19:41:25 +0200 Received: from jaalto by jondo.cante.net with local (Exim 4.69) (envelope-from ) id 1LVUhi-00027N-8r; Fri, 06 Feb 2009 19:41:26 +0200 From: Jari Aalto To: submit@debbugs.gnu.org, control@debbugs.gnu.org Subject: [PATCH] add-log.el: Modularize add-log-current-defun, new types supported Date: Fri, 06 Feb 2009 19:41:26 +0200 Message-ID: <87bptf5upl.fsf@jondo.cante.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SA-Exim-Connect-IP: 192.168.1.7 X-SA-Exim-Mail-From: jari.aalto@cante.net X-SA-Exim-Scanned: No (on picasso.cante.net); SAEximRunCond expanded to false X-Antivirus: VAMS X-CrossAssassin-Score: 2 --=-=-= tags: patch severity: wishlish The following patch breaks down monolithic `add-log-current-defun' into separate testing functions. Support for New buffer types is also provided. The patch is against version control as of 2009-02-06. Jari [1] http://www.methods.co.nz/asciidoc/ 2009-02-06 Jari Aalto * add-log.el (add-log-current-defun): Split function into separate parts: add-log-current-defun-type-*. Add support for new types: python, ruby, Bourne Shell, Makefile, X?HTML, CSS, PHP, Javascript, Asciidoc. (add-log-current-defun-type-c-like): New function. (add-log-current-defun-type-tex-like): New function. (add-log-current-defun-type-texinfo-like): New function. (add-log-current-defun-type-perl-like): New function. (add-log-current-defun-type-python-like): New function. (add-log-current-defun-type-shell-ruby-like): New function. (add-log-current-defun-type-autoconf-like): New function. (add-log-current-defun-type-html-like): New function. (add-log-current-defun-type-css-like): New function. (add-log-current-defun-type-php-like): New function. (add-log-current-defun-type-javascript-like): New function. (add-log-current-defun-type-shell-bourne-like): New function. (add-log-current-defun-type-makefile-like): New function. (add-log-current-defun-type-text-asciidoc-like): New function. (add-log-current-defun-type-default): New function. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Modularize-add-log-current-defun-.-New-file-types-s.patch >From 8416fbfcff9cda0cf26d936e672db706948f0095 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Fri, 6 Feb 2009 19:00:24 +0200 Subject: [PATCH] Modularize `add-log-current-defun'. New file types supported. 2009-02-06 Jari Aalto * add-log.el (add-log-current-defun): Split function into separate parts: add-log-current-defun-type-*. Add support for new types: python, ruby, Bourne Shell, Makefile, X?HTML, CSS, PHP, Javascript, Asciidoc. (add-log-current-defun-type-c-like): New function. (add-log-current-defun-type-tex-like): New function. (add-log-current-defun-type-texinfo-like): New function. (add-log-current-defun-type-perl-like): New function. (add-log-current-defun-type-python-like): New function. (add-log-current-defun-type-shell-ruby-like): New function. (add-log-current-defun-type-autoconf-like): New function. (add-log-current-defun-type-html-like): New function. (add-log-current-defun-type-css-like): New function. (add-log-current-defun-type-php-like): New function. (add-log-current-defun-type-javascript-like): New function. (add-log-current-defun-type-shell-bourne-like): New function. (add-log-current-defun-type-makefile-like): New function. (add-log-current-defun-type-text-asciidoc-like): New function. (add-log-current-defun-type-default): New function. Signed-off-by: Jari Aalto --- lisp/add-log.el | 316 +++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 247 insertions(+), 69 deletions(-) diff --git a/lisp/add-log.el b/lisp/add-log.el index 00e3172..b4cd1b7 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -1114,9 +1114,216 @@ Prefix arg means justify as well." '(TeX-mode plain-TeX-mode LaTeX-mode tex-mode) "*Modes that look like TeX to `add-log-current-defun'.") +(defun add-log-current-defun-type-lisp-like () + "Return name of function definition point for lisp like modes." + ;; If we are now precisely at the beginning of a defun, + ;; make sure beginning-of-defun finds that one + ;; rather than the previous one. + (let ((location (point))) + (or (eobp) (forward-char 1)) + (beginning-of-defun) + ;; Make sure we are really inside the defun found, + ;; not after it. + (when (and (looking-at "\\s(") + (progn (end-of-defun) + (< location (point))) + (progn (forward-sexp -1) + (>= location (point)))) + (if (looking-at "\\s(") + (forward-char 1)) + ;; Skip the defining construct name, typically "defun" + ;; or "defvar". + (forward-sexp 1) + ;; The second element is usually a symbol being defined. + ;; If it is not, use the first symbol in it. + (skip-chars-forward " \t\n'(") + (buffer-substring-no-properties + (point) + (progn (forward-sexp 1) + (point)))))) + (declare-function c-cpp-define-name "cc-cmds" ()) (declare-function c-defun-name "cc-cmds" ()) +(defun add-log-current-defun-type-c-like () + "Return name of function definition point for C like buffers." + (or (c-cpp-define-name) + (c-defun-name))) + +(defun add-log-current-defun-type-tex-like () + "Return name of function definition point for TeX like buffers." + (if (re-search-backward + "\\\\\\(sub\\)*\\(section\\|paragraph\\|chapter\\)" + nil t) + (progn + (goto-char (match-beginning 0)) + (buffer-substring-no-properties + (1+ (point)) ; without initial backslash + (line-end-position))))) + +(defun add-log-current-defun-type-texinfo-like () + "Return name of function definition point for Texinfo buffers." + (if (re-search-backward + "^@node[ \t]+\\([^,\r\n]+\\)" nil t) + (match-string-no-properties 1))) + +(defun add-log-current-defun-type-perl-like () + "Return name of function definition point for Perl like buffers." + (if (re-search-backward + "^\\(?:sub\\|package\\)[ \t]+\\([^({ \t\r\n]+\\)" nil t) + (match-string-no-properties 1))) + +(defun add-log-current-defun-type-python-like () + "Return name of function definition point for Python like buffers." + (if (re-search-backward + "^\\(?:def\\|class\\)[ \t]+\\([^({ \t\r\n]+\\)" nil t) + (match-string-no-properties 1))) + +(defun add-log-current-defun-type-shell-ruby-like () + "Return name of function definition point for Ruby buffers." + (if (re-search-backward + "^\\(?:def\\|class\\)[ \t]+\\([^({ \t\r\n]+\\)" nil t) + (match-string-no-properties 1))) + +(defun add-log-current-defun-type-autoconf-like () + "Return name of function definition point for Autoconf like buffers." + ;; Emacs's autoconf-mode installs its own + ;; `add-log-current-defun-function'. This applies to + ;; a different mode apparently for editing .m4 + ;; autoconf source. + (if (re-search-backward + "^\\(\\(m4_\\)?define\\|A._DEFUN\\)(\\[?\\([A-Za-z0-9_]+\\)" nil t) + (match-string-no-properties 3))) + +(defun add-log-current-defun-type-html-like () + "Return name of function definition point for HTML like buffers." + ;;

...

+ ;; ... + (if (re-search-backward + (concat + "<[ \t\r\n]*" + "\\(?:[hH][0-6]\\|title\\|TITLE\\|Title\\)" + "[^>]*>" + "[ \t\r\n]*" + "\\([^<\r\n]*[^ <\t\r\n]+\\)") + nil t) + (match-string-no-properties 1))) + +(defun add-log-current-defun-type-css-like () + "Return name of function definition point for CSS like buffers." + ;; * { + ;; ul#id { + ;; #id { + ;; h1 p { + (let ((max (max (point-min) (- (point 20 * 80))))) ;; approx 20 lines back + (when (search-backward "{" max t) + (skip-chars-backward " \t\r\n") + (beginning-of-line) + (if (looking-at "^[ \t]*\\([^{\r\n]*[^ {\t\r\n]\\)") + (match-string-no-properties 1))))) + +(defun add-log-current-defun-type-php-like (&optional no-dollar-var) + "Return name of function definition point for PHP like buffers. + +Optional NO-DOLLAR-VAR suppresses checking that variable starts +with dollar sign. The makes it possible to use this function for +e.g. Javascript: + + public $name = value; // PHP class variable. + var name = value; // Javascript function variable." + ;; function name () + ;; class name + (if (or (re-search-backward + ;; function and method level + (concat + "^[ \t]*" + "\\(?:public\\|private\\|static\\)?[ \t]*" + "function[ \t]+\\([^ ({\t\r\n]+\\)") nil t) + ;; Class level variable + (save-excursion + (goto-char (line-beginning-position)) + (looking-at + (concat + "^[ \t]*\\(?:var\\|public\\|private\\|static\\)" + "[ \t]+\\(" + (if no-dollar-var + "" + "[$]?") + "[^ ;\t\r\n]+\\)"))) + ;; Class top level + (re-search-backward + "^\\(class[ \t]+[^ ({\t\r\n]+\\)" nil t)) + (match-string-no-properties 1))) + +(defun add-log-current-defun-type-javascript-like () + "Return name of function definition point for Javascript like buffers." + (add-log-current-defun-type-php-like 'no-dollar-variables)) + +(defun add-log-current-defun-type-shell-bourne-like () + "Return name of function definition point for Bourne-Shell like buffers." + ;; function name () + ;; name() + (if (re-search-backward + "^\\(?:function[ \t]+\\)?[ \t]*\\([^ {(\t\r\n]+\\).*()" nil t) + (match-string-no-properties 1))) + +(defun add-log-current-defun-type-makefile-like () + "Return name of function definition point for Makefile like buffers." + ;; target-name: + ;; VARIABLE = .... + (if (or (re-search-backward "^\\([a-z][^ :\t\rn]+\\):" nil t) + (re-search-backward "^[ \t]*[[:upper]_]+" nil t)) + (match-string-no-properties 1))) + +(defun add-log-current-defun-type-text-asciidoc-like () + "Return name of function definition point for Asciidoc like buffers." + ;; Heading + ;; ======= + ;; ------- + ;; ^^^^^^^ + ;; ~~~~~~~ + (let ((point (point)) + (distance (point-max)) + re + chars + ret) + ;; Minimum of 3-character heading, like "FAQ" + (dolist (str '("^^^" "~~~" "---" "===")) + (setq re (concat + "[[:lower:][:upper:]0-9][ \t]*\r?\n" + (regexp-quote str) + "*$")) + (save-excursion + (if (and (re-search-backward re nil t) + (< (setq chars (- point (point))) distance)) + ;; Read closest heading to the original point + (setq distance chars + ret (buffer-substring-no-properties + (line-beginning-position) + (line-end-position)))))) + ret)) + +(defun add-log-current-defun-type-default () + "Other modes are handled by a heuristic that looks in the 10K before +point for uppercase headings starting in the first column or +identifiers followed by `:' or `='. See variables +`add-log-current-defun-header-regexp' and +`add-log-current-defun-function'." + (let (case-fold-search + result) + (end-of-line) + (when (re-search-backward + add-log-current-defun-header-regexp + (- (point) 10000) + t) + (setq result (or (match-string-no-properties 1) + (match-string-no-properties 0))) + ;; Strip whitespace away + (when (string-match "\\([^ \t\n\r\f].*[^ \t\n\r\f]\\)" + result) + (setq result (match-string-no-properties 1 result))) + result))) + ;;;###autoload (defun add-log-current-defun () "Return name of function definition point is in, or nil. @@ -1133,75 +1340,46 @@ identifiers followed by `:' or `='. See variables Has a preference of looking backwards." (condition-case nil (save-excursion - (let ((location (point))) - (cond (add-log-current-defun-function - (funcall add-log-current-defun-function)) - ((apply 'derived-mode-p add-log-lisp-like-modes) - ;; If we are now precisely at the beginning of a defun, - ;; make sure beginning-of-defun finds that one - ;; rather than the previous one. - (or (eobp) (forward-char 1)) - (beginning-of-defun) - ;; Make sure we are really inside the defun found, - ;; not after it. - (when (and (looking-at "\\s(") - (progn (end-of-defun) - (< location (point))) - (progn (forward-sexp -1) - (>= location (point)))) - (if (looking-at "\\s(") - (forward-char 1)) - ;; Skip the defining construct name, typically "defun" - ;; or "defvar". - (forward-sexp 1) - ;; The second element is usually a symbol being defined. - ;; If it is not, use the first symbol in it. - (skip-chars-forward " \t\n'(") - (buffer-substring-no-properties (point) - (progn (forward-sexp 1) - (point))))) - ((apply 'derived-mode-p add-log-c-like-modes) - (or (c-cpp-define-name) - (c-defun-name))) - ((memq major-mode add-log-tex-like-modes) - (if (re-search-backward - "\\\\\\(sub\\)*\\(section\\|paragraph\\|chapter\\)" - nil t) - (progn - (goto-char (match-beginning 0)) - (buffer-substring-no-properties - (1+ (point)) ; without initial backslash - (line-end-position))))) - ((derived-mode-p 'texinfo-mode) - (if (re-search-backward "^@node[ \t]+\\([^,\n]+\\)" nil t) - (match-string-no-properties 1))) - ((derived-mode-p 'perl-mode 'cperl-mode) - (if (re-search-backward "^sub[ \t]+\\([^({ \t\n]+\\)" nil t) - (match-string-no-properties 1))) - ;; Emacs's autoconf-mode installs its own - ;; `add-log-current-defun-function'. This applies to - ;; a different mode apparently for editing .m4 - ;; autoconf source. - ((derived-mode-p 'autoconf-mode) - (if (re-search-backward - "^\\(\\(m4_\\)?define\\|A._DEFUN\\)(\\[?\\([A-Za-z0-9_]+\\)" nil t) - (match-string-no-properties 3))) - (t - ;; If all else fails, try heuristics - (let (case-fold-search - result) - (end-of-line) - (when (re-search-backward - add-log-current-defun-header-regexp - (- (point) 10000) - t) - (setq result (or (match-string-no-properties 1) - (match-string-no-properties 0))) - ;; Strip whitespace away - (when (string-match "\\([^ \t\n\r\f].*[^ \t\n\r\f]\\)" - result) - (setq result (match-string-no-properties 1 result))) - result)))))) + (cond (add-log-current-defun-function + (funcall add-log-current-defun-function)) + ((apply 'derived-mode-p add-log-lisp-like-modes) + (add-log-current-defun-type-lisp-like)) + ((apply 'derived-mode-p add-log-c-like-modes) + (add-log-current-defun-type-c-like)) + ((memq major-mode add-log-tex-like-modes) + (add-log-current-defun-type-tex-like)) + ((derived-mode-p 'texinfo-mode) + (add-log-current-defun-type-texinfo-like)) + ((derived-mode-p 'perl-mode 'cperl-mode) + (add-log-current-defun-type-perl-like)) + ((derived-mode-p 'python-mode) + (add-log-current-defun-type-python-like)) + ((derived-mode-p 'ruby-mode) + (add-log-current-defun-type-ruby-like)) + ((derived-mode-p 'autoconf-mode) + (add-log-current-defun-type-autoconf-like)) + ((derived-mode-p 'sh-mode) + (add-log-current-defun-type-shell-bourne-like)) + ((apply 'derived-mode-p '(makefile-mode makefile-gmake-mode)) + (add-log-current-defun-type-makefile-like)) + ((or (apply 'derived-mode-p '(html-mode 'html-helper-mode)) + (string-match "\\.x?html$" (buffer-name))) + (add-log-current-defun-type-html-like)) + ((or (derived-mode-p 'php-mode) + (string-match "\\.php$" (buffer-name))) + (add-log-current-defun-type-php-like)) + ((or (derived-mode-p 'css-mode) + (string-match "\\.css$" (buffer-name))) + (add-log-current-defun-type-css-like)) + ((or (derived-mode-p 'javascript-mode) + (string-match "\\.js$" (buffer-name))) + (add-log-current-defun-type-javascript-like)) + ;; Fall through to `t' case if no asciidoc detected + ((and (or (derived-mode-p 'text-mode) + (string-match "asciidoc" (buffer-name))) + (add-log-current-defun-type-text-asciidoc-like))) + (t + (add-log-current-defun-type-default)))) (error nil))) (defvar change-log-get-method-definition-md) -- 1.5.6.5 --=-=-=-- From rgm@gnu.org Tue Feb 10 20:09:32 2009 Received: (at control) by emacsbugs.donarmstrong.com; 11 Feb 2009 04:09:32 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=VALID_BTS_CONTROL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1B49T0W010348 for ; Tue, 10 Feb 2009 20:09:31 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1LX6No-0002vg-BY; Tue, 10 Feb 2009 23:07:32 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18834.20228.279867.11582@fencepost.gnu.org> Date: Tue, 10 Feb 2009 23:07:32 -0500 From: Glenn Morris To: control Subject: control message severity 2224 wishlist reassign 2274 spam retitle 2251 corrupted header in rmail From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 11 08:45:54 2012 Received: (at 2224) by debbugs.gnu.org; 11 Apr 2012 12:45:54 +0000 Received: from localhost ([127.0.0.1]:50688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHwvo-0001d6-EZ for submit@debbugs.gnu.org; Wed, 11 Apr 2012 08:45:54 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:53671) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHwvl-0001cx-F1 for 2224@debbugs.gnu.org; Wed, 11 Apr 2012 08:45:50 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SHwuZ-0002a5-8W; Wed, 11 Apr 2012 14:44:35 +0200 From: Lars Magne Ingebrigtsen To: Jari Aalto Subject: Re: bug#2224: [PATCH] add-log.el: Modularize add-log-current-defun, new types supported References: <87bptf5upl.fsf@jondo.cante.net> X-Now-Playing: Zazou, Bikaye & Cy1's _Noir et Blanc_: "Keba" Date: Wed, 11 Apr 2012 14:44:34 +0200 In-Reply-To: <87bptf5upl.fsf@jondo.cante.net> (Jari Aalto's message of "Fri, 06 Feb 2009 19:41:26 +0200") Message-ID: User-Agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1SHwuZ-0002a5-8W X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1334753075.75243@59HehjOWK8y4amafKnGJNQ X-Spam-Status: No X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 2224 Cc: 2224@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Jari Aalto writes: > The following patch breaks down monolithic `add-log-current-defun' into > separate testing functions. Support for New buffer types is also > provided. The patch is against version control as of 2009-02-06. [...] > 2009-02-06 Jari Aalto > > * add-log.el (add-log-current-defun): Split function into > separate parts: add-log-current-defun-type-*. Add support > for new types: python, ruby, Bourne Shell, Makefile, > X?HTML, CSS, PHP, Javascript, Asciidoc. > (add-log-current-defun-type-c-like): New function. > (add-log-current-defun-type-tex-like): New function. > (add-log-current-defun-type-texinfo-like): New function. > (add-log-current-defun-type-perl-like): New function. > (add-log-current-defun-type-python-like): New function. > (add-log-current-defun-type-shell-ruby-like): New function. > (add-log-current-defun-type-autoconf-like): New function. > (add-log-current-defun-type-html-like): New function. > (add-log-current-defun-type-css-like): New function. > (add-log-current-defun-type-php-like): New function. > (add-log-current-defun-type-javascript-like): New function. > (add-log-current-defun-type-shell-bourne-like): New function. > (add-log-current-defun-type-makefile-like): New function. > (add-log-current-defun-type-text-asciidoc-like): New function. > (add-log-current-defun-type-default): New function. That's a lot of functions, but it does makes stuff clearer. Does anybody have an opinion here? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 11 09:50:45 2012 Received: (at 2224) by debbugs.gnu.org; 11 Apr 2012 13:50:45 +0000 Received: from localhost ([127.0.0.1]:50816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHxwa-0003yM-R9 for submit@debbugs.gnu.org; Wed, 11 Apr 2012 09:50:45 -0400 Received: from ironport-out.teksavvy.com ([206.248.143.162]:31967) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHxwZ-0003yF-1b for 2224@debbugs.gnu.org; Wed, 11 Apr 2012 09:50:43 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApYIACxOgk9FxL8q/2dsb2JhbABDuCMDgQyBCIIJAQEEAVYjBQsLNBIUGA0kE4gJBbYyi2GEeQSkRYFdgwM X-IronPort-AV: E=Sophos;i="4.75,391,1330923600"; d="scan'208";a="173335060" Received: from 69-196-191-42.dsl.teksavvy.com (HELO pastel.home) ([69.196.191.42]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 11 Apr 2012 09:49:35 -0400 Received: by pastel.home (Postfix, from userid 20848) id 2033958D2B; Wed, 11 Apr 2012 09:49:35 -0400 (EDT) From: Stefan Monnier To: Lars Magne Ingebrigtsen Subject: Re: bug#2224: [PATCH] add-log.el: Modularize add-log-current-defun, new types supported Message-ID: References: <87bptf5upl.fsf@jondo.cante.net> Date: Wed, 11 Apr 2012 09:49:35 -0400 In-Reply-To: (Lars Magne Ingebrigtsen's message of "Wed, 11 Apr 2012 14:44:34 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 2224 Cc: 2224@debbugs.gnu.org, Jari Aalto X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> The following patch breaks down monolithic `add-log-current-defun' into >> separate testing functions. Support for New buffer types is also >> provided. The patch is against version control as of 2009-02-06. > [...] >> 2009-02-06 Jari Aalto >> >> * add-log.el (add-log-current-defun): Split function into >> separate parts: add-log-current-defun-type-*. Add support >> for new types: python, ruby, Bourne Shell, Makefile, >> X?HTML, CSS, PHP, Javascript, Asciidoc. >> (add-log-current-defun-type-c-like): New function. >> (add-log-current-defun-type-tex-like): New function. >> (add-log-current-defun-type-texinfo-like): New function. >> (add-log-current-defun-type-perl-like): New function. >> (add-log-current-defun-type-python-like): New function. >> (add-log-current-defun-type-shell-ruby-like): New function. >> (add-log-current-defun-type-autoconf-like): New function. >> (add-log-current-defun-type-html-like): New function. >> (add-log-current-defun-type-css-like): New function. >> (add-log-current-defun-type-php-like): New function. >> (add-log-current-defun-type-javascript-like): New function. >> (add-log-current-defun-type-shell-bourne-like): New function. >> (add-log-current-defun-type-makefile-like): New function. >> (add-log-current-defun-type-text-asciidoc-like): New function. >> (add-log-current-defun-type-default): New function. > That's a lot of functions, but it does makes stuff clearer. Does > anybody have an opinion here? Having them be separate functions is indeed very good. But most of them shouldn't be in add-log.el: they should be in their respective major-mode instead. Stefan "and they don't need `-like' in their name" From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 12 12:05:08 2012 Received: (at 2224) by debbugs.gnu.org; 12 Apr 2012 16:05:08 +0000 Received: from localhost ([127.0.0.1]:54514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIMWB-00018F-5M for submit@debbugs.gnu.org; Thu, 12 Apr 2012 12:05:07 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:37251) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIMW8-000187-Iq for 2224@debbugs.gnu.org; Thu, 12 Apr 2012 12:05:05 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SIMUj-0004Uk-MK; Thu, 12 Apr 2012 18:03:37 +0200 From: Lars Magne Ingebrigtsen To: Stefan Monnier Subject: Re: bug#2224: [PATCH] add-log.el: Modularize add-log-current-defun, new types supported References: <87bptf5upl.fsf@jondo.cante.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEWGRzs5EBcdCA/7zKr0 vZnprYnJiWxXHR/wi9pIAAACMElEQVQ4jW2ST4+bMBDFZ6uNfY25cK259APA7nklTM6VgunV6pbJ Fa/azNfvG0Noou0okeD9mH/PpvZThBBinAhPXdv2N7VvO4AhRnptzy9t+/4IRoA3fp/ivINuz+iG 9xDP/UOLAk4B4supD7cUBehOA/P8ymm46d2qRyofjMMYz2vzrdIGQuheznuHBxBO57XKJxACvu63 x0cQ/gsGJjmEvrsHQ+Rkq6ZpZL7vMa2ix7+5jrs+Ud3sUX+dw7jpvAN3FPo2xy0APiAeSYisOH+4 A9mQGEPWOVc9gCcMqqqrGu9NUWErwBdREV83O8BIM0C9AQxdwIj1kgFwXkHj3Q102PgKAL1RcMvA gaIt008Aj8Wdrr/QPOtJT3YFlRZCijfT9R54ba7be8O8lirAb60RACOu3JAWWOIbbVsy4A2pi5Ot CVNpDb/5SzZiDbYi9OT/+d7AS108WbhqtyqIj3pBqQFAkgJ3O5FGxBpcdKajFZJN9i47t9g/yOAn QQ+pSnfnRGpZ0u9xmJIrIMPYyrkaLwDPGPayAfUdwCoYnztskbOrCRXgCABZuxCbHkZVqKx3oMRC ljkZOgx20XRk5Fqyy7XV8zR8YKwgK8D3OV+/03giZpPEYKxM2lOTDj+of8XBcRL8dKoStfxiE94g xwsyxNoVIGNmHhKcSkR8ESYdt87YyEBIhCuYCkiENbJufSyjXmC8wGPNwCXByoQ3MrEUWTC1kCse kZ4MaTAvZdC/z+UL8cX/aVIAAAAASUVORK5CYII= X-Now-Playing: Bob Hund's _Sover Aldrig_: "Kvicksilver" Date: Thu, 12 Apr 2012 18:03:36 +0200 In-Reply-To: (Stefan Monnier's message of "Wed, 11 Apr 2012 09:49:35 -0400") Message-ID: User-Agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1SIMUj-0004Uk-MK X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1334851417.942@6jqfo4kiRCwxx23l7w/cSA X-Spam-Status: No X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 2224 Cc: 2224@debbugs.gnu.org, Jari Aalto X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Stefan Monnier writes: >>> (add-log-current-defun-type-javascript-like): New function. >>> (add-log-current-defun-type-shell-bourne-like): New function. >>> (add-log-current-defun-type-makefile-like): New function. >>> (add-log-current-defun-type-text-asciidoc-like): New function. >>> (add-log-current-defun-type-default): New function. [...] > Having them be separate functions is indeed very good. But most of them > shouldn't be in add-log.el: they should be in their respective > major-mode instead. You mean just define `add-log-current-defun-type-javascript' in js.el, and stuff? Doesn't that seem kinda... I don't know. Error-prone? Because add-log (in the patch) has a major cond up there that will call the functions unconditionally if there's a match with the mode (and other things), so there's potential for things getting out of sync if people are using different versions of (say) js.el that doesn't define the function in question... > Stefan "and they don't need `-like' in their name" True. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 12 14:13:11 2012 Received: (at 2224) by debbugs.gnu.org; 12 Apr 2012 18:13:12 +0000 Received: from localhost ([127.0.0.1]:54661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIOW6-00050V-2e for submit@debbugs.gnu.org; Thu, 12 Apr 2012 14:13:11 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:35837) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIOW2-00050L-5i for 2224@debbugs.gnu.org; Thu, 12 Apr 2012 14:13:07 -0400 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q3CIBmDF021511; Thu, 12 Apr 2012 14:11:48 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 0172EB4066; Thu, 12 Apr 2012 14:11:47 -0400 (EDT) From: Stefan Monnier To: Lars Magne Ingebrigtsen Subject: Re: bug#2224: [PATCH] add-log.el: Modularize add-log-current-defun, new types supported Message-ID: References: <87bptf5upl.fsf@jondo.cante.net> Date: Thu, 12 Apr 2012 14:11:47 -0400 In-Reply-To: (Lars Magne Ingebrigtsen's message of "Thu, 12 Apr 2012 18:03:36 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4190=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4190> : streams <746293> : uri <1098481> X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 2224 Cc: 2224@debbugs.gnu.org, Jari Aalto X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) >>>> (add-log-current-defun-type-javascript-like): New function. >>>> (add-log-current-defun-type-shell-bourne-like): New function. >>>> (add-log-current-defun-type-makefile-like): New function. >>>> (add-log-current-defun-type-text-asciidoc-like): New function. >>>> (add-log-current-defun-type-default): New function. > [...] >> Having them be separate functions is indeed very good. But most of them >> shouldn't be in add-log.el: they should be in their respective >> major-mode instead. > You mean just define `add-log-current-defun-type-javascript' in js.el, > and stuff? Doesn't that seem kinda... I don't know. Error-prone? I thought you were going to say "Obvious?". Think about it: why should add-log support be different than say, font-lock, outline, imenu, younameit? Oh and BTW, this same function can/should be used for which-func-mode. Of course in js.el it shouldn't be called `add-log-current-defun-type-javascript' but `js--current-defun-name' or something like that. > Because add-log (in the patch) has a major cond up there that will call > the functions unconditionally if there's a match with the mode (and > other things), so there's potential for things getting out of sync if > people are using different versions of (say) js.el that doesn't define > the function in question... We had the same problem when we moved the font-lock defs away from font-lock.el. Yes, it's a problem. No, it's not insurmountable. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 12 14:21:23 2012 Received: (at 2224) by debbugs.gnu.org; 12 Apr 2012 18:21:24 +0000 Received: from localhost ([127.0.0.1]:54681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIOe3-00060W-Ip for submit@debbugs.gnu.org; Thu, 12 Apr 2012 14:21:23 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:33130) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIOe1-00060N-AH for 2224@debbugs.gnu.org; Thu, 12 Apr 2012 14:21:22 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SIOcf-0006vj-FJ; Thu, 12 Apr 2012 20:19:57 +0200 From: Lars Magne Ingebrigtsen To: Stefan Monnier Subject: Re: bug#2224: [PATCH] add-log.el: Modularize add-log-current-defun, new types supported References: <87bptf5upl.fsf@jondo.cante.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAKlBMVEW1s6SysK7CwrPS0tLE xMS6uqOoo5DS0qLIyMbOzs+qqYedkU+3rZrR0b38KR5TAAAAwklEQVQ4jWNITBMUlDBGB4bGDEg8 ZWQpBmcM1VAJHOKkSVjikrCYTL4djWCTmzElZoIlJpNgFIkSOAKLenYY4ZIwxS5h2YxLwtkGQ8IE r1F4JKxwSWDagWLUDJClLcCImgzigaMcomOioKCwoSAwNMEBKgiKSpw+NyQ5rKgoYYtLwhyfBHoy mYzLDmG8RjWR6apmXBJowNAYHB/geEEGlqCcBAx2791AsGD1KlAMWoL8tLrcfDfu+MApYYVUyBih SAAAKrfxhZoG/kQAAAAASUVORK5CYII= X-Now-Playing: Various's _Room 40_: "Xiu Xiu - Sashay Away" Date: Thu, 12 Apr 2012 20:19:56 +0200 In-Reply-To: (Stefan Monnier's message of "Thu, 12 Apr 2012 14:11:47 -0400") Message-ID: User-Agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1SIOcf-0006vj-FJ X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1334859597.92812@Ad9KWIEOUO9Kpoh0FNVdAw X-Spam-Status: No X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 2224 Cc: 2224@debbugs.gnu.org, Jari Aalto X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Stefan Monnier writes: > Think about it: why should add-log support be different than say, > font-lock, outline, imenu, younameit? Oh and BTW, this same function > can/should be used for which-func-mode. --- Which Function mode is a global minor mode. When enabled, the current function name is continuously displayed in the mode line, in certain major modes. --- Didn't know about that one. Seems useful, especially if you're hacking on stuff that uses looong functions. (I've been doing some minor hacks on mplayer, and it has, if I recall correctly, a few functions that are in the 1500 line region...) Anyway, that obviously makes sense. :-) > Of course in js.el it shouldn't be called > `add-log-current-defun-type-javascript' but `js--current-defun-name' or > something like that. --? Isn't that for internal functions? These would be used by the other packages... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 12 16:40:22 2012 Received: (at 2224) by debbugs.gnu.org; 12 Apr 2012 20:40:22 +0000 Received: from localhost ([127.0.0.1]:54930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIQoV-0004y8-Qp for submit@debbugs.gnu.org; Thu, 12 Apr 2012 16:40:21 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:36506) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIQoP-0004xv-7k for 2224@debbugs.gnu.org; Thu, 12 Apr 2012 16:40:13 -0400 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q3CKcvlJ025966; Thu, 12 Apr 2012 16:38:57 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 9D5F8B4066; Thu, 12 Apr 2012 16:38:57 -0400 (EDT) From: Stefan Monnier To: Lars Magne Ingebrigtsen Subject: Re: bug#2224: [PATCH] add-log.el: Modularize add-log-current-defun, new types supported Message-ID: References: <87bptf5upl.fsf@jondo.cante.net> Date: Thu, 12 Apr 2012 16:38:57 -0400 In-Reply-To: (Lars Magne Ingebrigtsen's message of "Thu, 12 Apr 2012 20:19:56 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4190=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4190> : streams <746336> : uri <1098517> X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 2224 Cc: 2224@debbugs.gnu.org, Jari Aalto X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) >> Think about it: why should add-log support be different than say, >> font-lock, outline, imenu, younameit? Oh and BTW, this same function >> can/should be used for which-func-mode. > --- > Which Function mode is a global minor mode. When enabled, the > current function name is continuously displayed in the mode line, > in certain major modes. > --- > Didn't know about that one. Seems useful, especially if you're hacking > on stuff that uses looong functions. (I've been doing some minor hacks > on mplayer, and it has, if I recall correctly, a few functions that are > in the 1500 line region...) > Anyway, that obviously makes sense. :-) >> Of course in js.el it shouldn't be called >> `add-log-current-defun-type-javascript' but `js--current-defun-name' or >> something like that. > --? Isn't that for internal functions? These would be used by the > other packages... Using them is not a problem: using them directly is a problem. External packages such as add-log.el will just do (funcall add-log-current-defun-function) and won't care about the name of the function. But if you want to name it js-current-defun-name, that's fine as well, I don't have a strong preference between the two. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 01 00:56:29 2012 Received: (at 2224) by debbugs.gnu.org; 1 Dec 2012 05:56:29 +0000 Received: from localhost ([127.0.0.1]:47819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Teg3x-0005ye-GD for submit@debbugs.gnu.org; Sat, 01 Dec 2012 00:56:29 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:39388) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Teg3v-0005yW-Fa for 2224@debbugs.gnu.org; Sat, 01 Dec 2012 00:56:28 -0500 Received: by mail-pa0-f44.google.com with SMTP id hz11so758677pad.3 for <2224@debbugs.gnu.org>; Fri, 30 Nov 2012 21:54:17 -0800 (PST) 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=/x5UJRdBtxlaKDG86wpZjbR9DeNimosTpGjt80C6SCI=; b=IkPm4N1N7G5jra65TS2lb9UXkLo4G06o1EEvk7FfXvZpeFhcqip1Pgs5dWiVGz7es0 vzZ6X9+2WuvvbEkdyssIL58gs/EmHSKA7c1aB3rn6SRkUNjTjB76b0kaLjpZEBwhLpVd uHZamugtH6297j8Np4nvtGDI9rnzjQcE4orca5IRHEGDJGtRWCbe3Bue7WaCgIQn3fvu pQFAvEe6lRGe9Fhc6iS7530p/IWXWgVOxwNUzcbFaqAa/IiGloKSvbRhv5hwD4niePt8 U8e1BU3rf+9lqwQ9F3xtBrKefJx221kdD5jr2rhJSh8a18FGrIDG6Q9ZJSqnqrBR706b 64bQ== Received: by 10.68.233.201 with SMTP id ty9mr12194009pbc.14.1354341257514; Fri, 30 Nov 2012 21:54:17 -0800 (PST) Received: from ulysses (cm198.gamma83.maxonline.com.sg. [202.156.83.198]) by mx.google.com with ESMTPS id oi3sm4239129pbb.1.2012.11.30.21.54.14 (version=SSLv3 cipher=OTHER); Fri, 30 Nov 2012 21:54:16 -0800 (PST) From: Chong Yidong To: Stefan Monnier Subject: Re: bug#2224: [PATCH] add-log.el: Modularize add-log-current-defun, new types supported References: <87bptf5upl.fsf@jondo.cante.net> Date: Sat, 01 Dec 2012 13:54:12 +0800 In-Reply-To: (Stefan Monnier's message of "Wed, 11 Apr 2012 09:49:35 -0400") Message-ID: <87ip8mjp17.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 2224 Cc: 2224@debbugs.gnu.org, Lars Magne Ingebrigtsen , Jari Aalto X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.7 (/) Stefan Monnier writes: > Having them be separate functions is indeed very good. But most of them > shouldn't be in add-log.el: they should be in their respective > major-mode instead. Done in trunk. Of the new (rather than refactored) add-log-current-defun functions which Jari wrote, the Makefile, Ruby, and Python ones are not applicable because those modes already define their own. The PHP one is not applicable since we still don't have php-mode in Emacs. I added Jari's functions for HTML and CSS mode. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 01 00:56:49 2012 Received: (at control) by debbugs.gnu.org; 1 Dec 2012 05:56:49 +0000 Received: from localhost ([127.0.0.1]:47822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Teg4G-0005zB-NK for submit@debbugs.gnu.org; Sat, 01 Dec 2012 00:56:48 -0500 Received: from mail-da0-f44.google.com ([209.85.210.44]:50159) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Teg4F-0005z5-Q4 for control@debbugs.gnu.org; Sat, 01 Dec 2012 00:56:48 -0500 Received: by mail-da0-f44.google.com with SMTP id z20so480428dae.3 for ; Fri, 30 Nov 2012 21:54:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=y7Qx2APsYpQY3qJQAHBhAV9lBKhbM8QpCCkpARmJerY=; b=GcyAG6XJJz5e7hPNZtG5k9wL17LhL7Hz7BzFHcWe2UUAMaFFAPXQXz6bemamtAVaRy LF+Y/bGRuIVZqeKWB1361tM/CdQKfDGBzvNhEouBhk/BDtgnE7ryzzq0NBe/k4SSzDjP VjAlQFBdYGG/ngFF01V6XR/oECCn9fAbhmIutRY3HDS9raqNWWqc4JDlac9AkHyOIeWC wiGPCyA1hRcUsJY4r6783coLsIzPjLqXNX6HMDHMeUmQ1ILaLNGWmS2csI28DSpTyyhi HmIpXqxwFHbVvEZ0CoYGgroGUjUrmDainZ2kRQn93mpE1Gp3mLmu1ZYqNIDVIpGFmcht 0BPg== Received: by 10.68.236.131 with SMTP id uu3mr11766215pbc.104.1354341277823; Fri, 30 Nov 2012 21:54:37 -0800 (PST) Received: from ulysses (cm198.gamma83.maxonline.com.sg. [202.156.83.198]) by mx.google.com with ESMTPS id qt3sm4233016pbb.32.2012.11.30.21.54.36 (version=SSLv3 cipher=OTHER); Fri, 30 Nov 2012 21:54:37 -0800 (PST) From: Chong Yidong To: control@debbugs.gnu.org Subject: close 2224 Date: Sat, 01 Dec 2012 13:54:34 +0800 Message-ID: <87fw3qjp0l.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) close 2224 thanks From unknown Sun Aug 17 09:10:38 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 29 Dec 2012 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator