all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Small gud.el patch
@ 2006-08-03 15:23 David Hansen
  2006-08-03 18:31 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: David Hansen @ 2006-08-03 15:23 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 201 bytes --]

Hello,

this patch fixes two problems:

1. Wrong coloring of the 'd' in 'end' (syntactic keywords
   gave the 'd' comment end syntax).

2. "end" after a "document" is now colored as a keyword.

David


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gud.diff --]
[-- Type: text/x-patch, Size: 844 bytes --]

--- /home/dhansen/cvs-src/emacs/lisp/progmodes/gud.el	2006-07-20 23:23:10.000000000 +0200
+++ gud.el	2006-08-03 17:18:52.000000000 +0200
@@ -3175,12 +3175,12 @@
     ("\\$\\(\\w+\\)" (1 font-lock-variable-name-face))
     ("^\\s-*\\(\\w\\(\\w\\|\\s_\\)*\\)" (1 font-lock-keyword-face))))
 
-;; FIXME: The keyword "end" associated with "document"
-;; should have font-lock-keyword-face (currently font-lock-doc-face).
+(defun gdb-script-font-lock-end-of-document (limit)
+  (re-search-forward "\\(\n\\)end\\>" limit t))
+
 (defvar gdb-script-font-lock-syntactic-keywords
   '(("^document\\s-.*\\(\n\\)" (1 "< b"))
-    ;; It would be best to change the \n in front, but it's more difficult.
-    ("^en\\(d\\)\\>" (1 "> b"))))
+    (gdb-script-font-lock-end-of-document (1 "> b"))))
 
 (defun gdb-script-font-lock-syntactic-face (state)
   (cond

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

end of thread, other threads:[~2006-08-03 18:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-03 15:23 Small gud.el patch David Hansen
2006-08-03 18:31 ` Stefan Monnier

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.