From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: finder.el patch Date: Fri, 21 Mar 2008 14:00:08 -0700 Message-ID: <007101c88b96$8c2c2e00$0600a8c0@us.oracle.com> References: <001501c8846c$f75757d0$c2b22382@us.oracle.com><005901c8861c$069455d0$0600a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0072_01C88B5B.DFCD5600" X-Trace: ger.gmane.org 1206133284 17139 80.91.229.12 (21 Mar 2008 21:01:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Mar 2008 21:01:24 +0000 (UTC) Cc: 'Emacs-Devel' To: "'Stefan Monnier'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 21 22:01:54 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JcoN5-0004Km-1Z for ged-emacs-devel@m.gmane.org; Fri, 21 Mar 2008 22:01:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JcoMU-0000oM-HR for ged-emacs-devel@m.gmane.org; Fri, 21 Mar 2008 17:01:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JcoMP-0000lf-JD for emacs-devel@gnu.org; Fri, 21 Mar 2008 17:01:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JcoMN-0000hY-Hg for emacs-devel@gnu.org; Fri, 21 Mar 2008 17:01:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JcoMN-0000hM-DT for emacs-devel@gnu.org; Fri, 21 Mar 2008 17:01:07 -0400 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JcoMM-0005bz-TG for emacs-devel@gnu.org; Fri, 21 Mar 2008 17:01:07 -0400 Original-Received: from agmgw2.us.oracle.com (agmgw2.us.oracle.com [152.68.180.213]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m2LL13XR027901; Fri, 21 Mar 2008 15:01:04 -0600 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by agmgw2.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m2LL13Fm023572; Fri, 21 Mar 2008 15:01:03 -0600 Original-Received: from inet-141-146-46-1.oracle.com by acsmt350.oracle.com with ESMTP id 3621907791206133203; Fri, 21 Mar 2008 14:00:03 -0700 Original-Received: from dradamslap1 (/141.144.80.154) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 21 Mar 2008 14:00:03 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AciLgkWdfUxYzshjT76K7wgG+4H5dQAAfy/g X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:93142 Archived-At: This is a multi-part message in MIME format. ------=_NextPart_000_0072_01C88B5B.DFCD5600 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit > > Here is an updated finder.el patch, which includes the bug > > fixes mentioned previously. This patch adds two minor features: > > Sorry for taking so long to reply. These are good changes. > > Actually, it does not inherit because it uses `copy-syntax-table'. > Please use `make-syntax-table' so it indeed inherits. Done. I guess just substituting make-syntax-table for copy-syntax-table is sufficient. > font-lock-add-keywords is best avoided in general. Please set > font-lock-defaults properly instead. New patch attached. ------=_NextPart_000_0072_01C88B5B.DFCD5600 Content-Type: application/octet-stream; name="finder-2008-03-21a.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="finder-2008-03-21a.patch" diff -u -w "finder-CVS-2008-03-12.el" "finder-patched-2008-03-21a.el"=0A= --- finder-CVS-2008-03-12.el 2008-03-12 10:07:40.000000000 -0700=0A= +++ finder-patched-2008-03-21a.el 2008-03-21 13:52:48.000000000 -0700=0A= @@ -110,6 +110,16 @@=0A= (define-key map "d" 'finder-list-keywords)=0A= map))=0A= =0A= +(defvar finder-mode-syntax-table=0A= + (let ((st (make-syntax-table emacs-lisp-mode-syntax-table)))=0A= + (modify-syntax-entry ?\; ". " st)=0A= + st)=0A= + "Syntax table used while in `finder-mode'.")=0A= +=0A= +(defvar finder-font-lock-keywords=0A= + '(("`\\([^']+\\)'" 1 font-lock-constant-face prepend))=0A= + "Font-lock keywords for Finder mode, in addition to Lisp mode = keywords.")=0A= +=0A= =0A= ;;; Code for regenerating the keyword list.=0A= =0A= @@ -343,7 +353,11 @@=0A= (interactive)=0A= (kill-all-local-variables)=0A= (use-local-map finder-mode-map)=0A= - (set-syntax-table emacs-lisp-mode-syntax-table)=0A= + (set-syntax-table finder-mode-syntax-table)=0A= + (setq font-lock-defaults=0A= + '((finder-font-lock-keywords lisp-font-lock-keywords=0A= + lisp-font-lock-keywords-1 lisp-font-lock-keywords-2)=0A= + nil nil (("+-*/.<>=3D!?$%_&~^:@" . "w")) nil))=0A= (setq mode-name "Finder")=0A= (setq major-mode 'finder-mode)=0A= (set (make-local-variable 'finder-headmark) nil)=0A= @@ -359,15 +373,13 @@=0A= finder directory, \\[finder-exit] =3D quit, \\[finder-summary] =3D = help")))=0A= =0A= (defun finder-exit ()=0A= - "Exit Finder mode and kill the buffer."=0A= + "Exit Finder mode.=0A= +Delete the window and kill the buffer."=0A= (interactive)=0A= - (or (one-window-p t)=0A= - (delete-window))=0A= - ;; Can happen in either buffer -- kill each of the two that exists=0A= - (and (get-buffer "*Finder*")=0A= - (kill-buffer "*Finder*"))=0A= - (and (get-buffer "*Finder Category*")=0A= - (kill-buffer "*Finder Category*")))=0A= + (condition-case nil (delete-window) (error nil))=0A= + (when (get-buffer "*Finder*") (kill-buffer "*Finder*"))=0A= + (when (get-buffer "*Finder-package*") (kill-buffer = "*Finder-package*"))=0A= + (when (get-buffer "*Finder Category*") (kill-buffer "*Finder = Category*")))=0A= =0A= =0C=0A= (provide 'finder)=0A= =0A= Diff finished at Fri Mar 21 13:58:18=0A= ------=_NextPart_000_0072_01C88B5B.DFCD5600--