From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Hansen Newsgroups: gmane.emacs.devel Subject: Small gud.el patch Date: Thu, 03 Aug 2006 17:23:33 +0200 Organization: disorganized Message-ID: <87k65pvo5m.fsf@robotron.kosmorama> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1154619558 2995 80.91.229.2 (3 Aug 2006 15:39:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 3 Aug 2006 15:39:18 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 03 17:39:17 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G8fHw-0007yq-F6 for ged-emacs-devel@m.gmane.org; Thu, 03 Aug 2006 17:39:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G8fHv-0004Dt-Ry for ged-emacs-devel@m.gmane.org; Thu, 03 Aug 2006 11:39:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G8fHk-0004Dd-7O for emacs-devel@gnu.org; Thu, 03 Aug 2006 11:38:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G8fHh-0004DR-SG for emacs-devel@gnu.org; Thu, 03 Aug 2006 11:38:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G8fHh-0004DO-M4 for emacs-devel@gnu.org; Thu, 03 Aug 2006 11:38:53 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1G8fL4-000632-3z for emacs-devel@gnu.org; Thu, 03 Aug 2006 11:42:22 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1G8fHB-0007lw-3W for emacs-devel@gnu.org; Thu, 03 Aug 2006 17:38:21 +0200 Original-Received: from e178049212.adsl.alicedsl.de ([85.178.49.212]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 Aug 2006 17:38:21 +0200 Original-Received: from david.hansen by e178049212.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 Aug 2006 17:38:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-To: emacs-devel@gnu.org Original-Lines: 39 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: e178049212.adsl.alicedsl.de Mail-Copies-To: nobody User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:4FyJQ7BOc+hXZU5v+da8u49GhqE= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:58050 Archived-At: --=-=-= 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=gud.diff --- /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 --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--