unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* syntax highlight fix for add-log.el
@ 2005-04-03  2:16 Marcelo Toledo
  2005-04-03 21:19 ` Richard Stallman
  2005-04-04 10:45 ` Lute Kamstra
  0 siblings, 2 replies; 5+ messages in thread
From: Marcelo Toledo @ 2005-04-03  2:16 UTC (permalink / raw)


The manual describing a Change Log entry, says: (...) "Aside from these
header lines, every line in the change log starts with a space or a
tab.".

The font-lock was not highlighting lines started with spaces, added
support for it and corrected an `indent-region' call.

Can I install it?

Index: lisp/add-log.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/add-log.el,v
retrieving revision 1.156
diff -c -r1.156 add-log.el
*** lisp/add-log.el	21 Mar 2005 14:37:35 -0000	1.156
--- lisp/add-log.el	3 Apr 2005 02:12:14 -0000
***************
*** 225,231 ****
        (2 'change-log-email-face)))
      ;;
      ;; File names.
!     ("^\t\\* \\([^ ,:([\n]+\\)"
       (1 'change-log-file-face)
       ;; Possibly further names in a list:
       ("\\=, \\([^ ,:([\n]+\\)" nil nil (1 'change-log-file-face))
--- 225,231 ----
        (2 'change-log-email-face)))
      ;;
      ;; File names.
!     ("^\\(?: \\{8\\}\\|\t\\)\\* \\([^ ,:([\n]+\\)"
       (1 'change-log-file-face)
       ;; Possibly further names in a list:
       ("\\=, \\([^ ,:([\n]+\\)" nil nil (1 'change-log-file-face))
***************
*** 310,316 ****
  			  (mark) (point)))
      (when (fboundp 'log-edit-previous-comment)
        (log-edit-previous-comment arg)
!       (indent-region (point-min) (point-max))
        (goto-char (point-min))
        (unless (save-restriction (widen) (bolp))
  	(delete-region (point) (progn (skip-chars-forward " \t\n") (point))))
--- 310,316 ----
  			  (mark) (point)))
      (when (fboundp 'log-edit-previous-comment)
        (log-edit-previous-comment arg)
!       (indent-region (point-min) (point-max) nil)
        (goto-char (point-min))
        (unless (save-restriction (widen) (bolp))
  	(delete-region (point) (progn (skip-chars-forward " \t\n") (point))))

-- 
Marcelo Toledo
marcelo@marcelotoledo.org
http://www.marcelotoledo.org
Mobile: 55 71 9116-1101

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: syntax highlight fix for add-log.el
  2005-04-03  2:16 syntax highlight fix for add-log.el Marcelo Toledo
@ 2005-04-03 21:19 ` Richard Stallman
  2005-04-03 22:47   ` Marcelo Toledo
  2005-04-04 10:45 ` Lute Kamstra
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2005-04-03 21:19 UTC (permalink / raw)
  Cc: emacs-devel

	  ;; File names.
    !     ("^\\(?: \\{8\\}\\|\t\\)\\* \\([^ ,:([\n]+\\)"

This seems to insist on 8 spaces.
It can be any number of spaces; one space is enough.

	    (log-edit-previous-comment arg)
    !       (indent-region (point-min) (point-max) nil)

This change looks like a no-op.  What is the bug you intend to fix?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: syntax highlight fix for add-log.el
  2005-04-03 21:19 ` Richard Stallman
@ 2005-04-03 22:47   ` Marcelo Toledo
  0 siblings, 0 replies; 5+ messages in thread
From: Marcelo Toledo @ 2005-04-03 22:47 UTC (permalink / raw)


Richard Stallman <rms@gnu.org> writes:

> 	  ;; File names.
>     !     ("^\\(?: \\{8\\}\\|\t\\)\\* \\([^ ,:([\n]+\\)"
>
> This seems to insist on 8 spaces.
> It can be any number of spaces; one space is enough.

Modified to work with 1 or more spaces.

> 	    (log-edit-previous-comment arg)
>     !       (indent-region (point-min) (point-max) nil)
>
> This change looks like a no-op.  What is the bug you intend to fix?

I was looking old code and old documentation where column was no
optional, sorry. Just ignore it.

I've installed this patch:

Index: lisp/ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.7247
diff -u -r1.7247 ChangeLog
--- lisp/ChangeLog	3 Apr 2005 21:26:11 -0000	1.7247
+++ lisp/ChangeLog	3 Apr 2005 22:44:25 -0000
@@ -1,3 +1,11 @@
+2005-04-03  Marcelo Toledo  <marcelo@marcelotoledo.org>
+
+        * add-log.el (change-log-font-lock-keywords): The manual
+        describing a Change Log entry, says: (...) "Aside from these
+        header lines, every line in the change log starts with a space or
+        a tab.". The font-lock was not highlighting lines started with
+        spaces, added support for it.
+
 2005-04-03  Roland Winkler  <Roland.Winkler@physik.uni-erlangen.de>
 
 	* textmodes/bibtex.el (bibtex-url): Use format to generate the url.
Index: lisp/add-log.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/add-log.el,v
retrieving revision 1.156
diff -u -r1.156 add-log.el
--- lisp/add-log.el	21 Mar 2005 14:37:35 -0000	1.156
+++ lisp/add-log.el	3 Apr 2005 22:44:33 -0000
@@ -225,7 +225,7 @@
       (2 'change-log-email-face)))
     ;;
     ;; File names.
-    ("^\t\\* \\([^ ,:([\n]+\\)"
+    ("^\\(?: +\\|\t\\)\\* \\([^ ,:([\n]+\\)"
      (1 'change-log-file-face)
      ;; Possibly further names in a list:
      ("\\=, \\([^ ,:([\n]+\\)" nil nil (1 'change-log-file-face))

-- 
Marcelo Toledo
marcelo@marcelotoledo.org
http://www.marcelotoledo.org
Mobile: 55 71 9116-1101

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: syntax highlight fix for add-log.el
  2005-04-03  2:16 syntax highlight fix for add-log.el Marcelo Toledo
  2005-04-03 21:19 ` Richard Stallman
@ 2005-04-04 10:45 ` Lute Kamstra
  2005-04-04 15:51   ` Marcelo Toledo
  1 sibling, 1 reply; 5+ messages in thread
From: Lute Kamstra @ 2005-04-04 10:45 UTC (permalink / raw)
  Cc: emacs-devel

Marcelo Toledo <marcelo@marcelotoledo.org> writes:

> The manual describing a Change Log entry, says: (...) "Aside from
> these header lines, every line in the change log starts with a space
> or a tab.".

Your patch goes only half the way in fixing the problem you describe.
What about this change to fix the rest?

Lute.


Index: lisp/add-log.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/add-log.el,v
retrieving revision 1.158
diff -u -r1.158 add-log.el
--- lisp/add-log.el	4 Apr 2005 08:47:07 -0000	1.158
+++ lisp/add-log.el	4 Apr 2005 10:39:11 -0000
@@ -225,8 +225,8 @@
       (2 'change-log-email-face)))
     ;;
     ;; File names.
-    ("^\\(?: +\\|\t\\)\\* \\([^ ,:([\n]+\\)"
-     (1 'change-log-file-face)
+    ("^\\( +\\|\t\\)\\* \\([^ ,:([\n]+\\)"
+     (2 'change-log-file-face)
      ;; Possibly further names in a list:
      ("\\=, \\([^ ,:([\n]+\\)" nil nil (1 'change-log-file-face))
      ;; Possibly a parenthesized list of names:
@@ -236,8 +236,8 @@
       nil nil (1 'change-log-list-face)))
     ;;
     ;; Function or variable names.
-    ("^\t(\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)"
-     (1 'change-log-list-face)
+    ("^\\( +\\|\t\\)(\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)"
+     (2 'change-log-list-face)
      ("\\=, *\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)" nil nil
       (1 'change-log-list-face)))
     ;;
@@ -250,8 +250,8 @@
     ;; Acknowledgements.
     ;; Don't include plain "From" because that is vague;
     ;; we want to encourage people to say something more specific.
-    ("\\(^\t\\|  \\)\\(Patch\\(es\\)? by\\|Report\\(ed by\\| from\\)\\|Suggest\\(ed by\\|ion from\\)\\)"
-     2 'change-log-acknowledgement-face))
+    ("\\(^\\( +\\|\t\\)\\|  \\)\\(Patch\\(es\\)? by\\|Report\\(ed by\\| from\\)\\|Suggest\\(ed by\\|ion from\\)\\)"
+     3 'change-log-acknowledgement-face))
   "Additional expressions to highlight in Change Log mode.")
 
 (defvar change-log-mode-map

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: syntax highlight fix for add-log.el
  2005-04-04 10:45 ` Lute Kamstra
@ 2005-04-04 15:51   ` Marcelo Toledo
  0 siblings, 0 replies; 5+ messages in thread
From: Marcelo Toledo @ 2005-04-04 15:51 UTC (permalink / raw)


Works great Lute, thanks. Can you install please?

Lute Kamstra <Lute.Kamstra.lists@xs4all.nl> writes:

> Your patch goes only half the way in fixing the problem you describe.
> What about this change to fix the rest?

-- 
Marcelo Toledo
marcelo@marcelotoledo.org
http://www.marcelotoledo.org
Mobile: 55 71 9116-1101

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-04-04 15:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-03  2:16 syntax highlight fix for add-log.el Marcelo Toledo
2005-04-03 21:19 ` Richard Stallman
2005-04-03 22:47   ` Marcelo Toledo
2005-04-04 10:45 ` Lute Kamstra
2005-04-04 15:51   ` Marcelo Toledo

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).