From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>
Cc: 'Emacs-Devel' <emacs-devel@gnu.org>
Subject: RE: finder.el patch
Date: Fri, 21 Mar 2008 14:00:08 -0700 [thread overview]
Message-ID: <007101c88b96$8c2c2e00$0600a8c0@us.oracle.com> (raw)
In-Reply-To: <jwv1w64gcbl.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 540 bytes --]
> > 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.
[-- Attachment #2: finder-2008-03-21a.patch --]
[-- Type: application/octet-stream, Size: 2114 bytes --]
diff -u -w "finder-CVS-2008-03-12.el" "finder-patched-2008-03-21a.el"
--- finder-CVS-2008-03-12.el 2008-03-12 10:07:40.000000000 -0700
+++ finder-patched-2008-03-21a.el 2008-03-21 13:52:48.000000000 -0700
@@ -110,6 +110,16 @@
(define-key map "d" 'finder-list-keywords)
map))
+(defvar finder-mode-syntax-table
+ (let ((st (make-syntax-table emacs-lisp-mode-syntax-table)))
+ (modify-syntax-entry ?\; ". " st)
+ st)
+ "Syntax table used while in `finder-mode'.")
+
+(defvar finder-font-lock-keywords
+ '(("`\\([^']+\\)'" 1 font-lock-constant-face prepend))
+ "Font-lock keywords for Finder mode, in addition to Lisp mode keywords.")
+
;;; Code for regenerating the keyword list.
@@ -343,7 +353,11 @@
(interactive)
(kill-all-local-variables)
(use-local-map finder-mode-map)
- (set-syntax-table emacs-lisp-mode-syntax-table)
+ (set-syntax-table finder-mode-syntax-table)
+ (setq font-lock-defaults
+ '((finder-font-lock-keywords lisp-font-lock-keywords
+ lisp-font-lock-keywords-1 lisp-font-lock-keywords-2)
+ nil nil (("+-*/.<>=!?$%_&~^:@" . "w")) nil))
(setq mode-name "Finder")
(setq major-mode 'finder-mode)
(set (make-local-variable 'finder-headmark) nil)
@@ -359,15 +373,13 @@
finder directory, \\[finder-exit] = quit, \\[finder-summary] = help")))
(defun finder-exit ()
- "Exit Finder mode and kill the buffer."
+ "Exit Finder mode.
+Delete the window and kill the buffer."
(interactive)
- (or (one-window-p t)
- (delete-window))
- ;; Can happen in either buffer -- kill each of the two that exists
- (and (get-buffer "*Finder*")
- (kill-buffer "*Finder*"))
- (and (get-buffer "*Finder Category*")
- (kill-buffer "*Finder Category*")))
+ (condition-case nil (delete-window) (error nil))
+ (when (get-buffer "*Finder*") (kill-buffer "*Finder*"))
+ (when (get-buffer "*Finder-package*") (kill-buffer "*Finder-package*"))
+ (when (get-buffer "*Finder Category*") (kill-buffer "*Finder Category*")))
\f
(provide 'finder)
Diff finished at Fri Mar 21 13:58:18
next prev parent reply other threads:[~2008-03-21 21:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-12 18:14 finder.el patch Drew Adams
2008-03-14 21:40 ` Drew Adams
2008-03-21 18:34 ` Stefan Monnier
2008-03-21 21:00 ` Drew Adams [this message]
2008-03-23 1:09 ` Stefan Monnier
2008-03-23 2:04 ` Drew Adams
2008-03-23 2:45 ` Stefan Monnier
2008-03-23 6:09 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='007101c88b96$8c2c2e00$0600a8c0@us.oracle.com' \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).