+2008-03-22 Drew Adams <drew.adams@oracle.com>
+
+ * finder.el (finder-mode-syntax-table, finder-font-lock-keywords):
+ New variables.
+ (finder-mode): Use finder-mode-syntax-table. Set font-lock-defaults.
+ (finder-exit): Ignore errors rather than avoiding them.
+ Kill *Finder-package* buffer also.
+
2008-03-24 Andreas Schwab <schwab@suse.de>
* xt-mouse.el (xterm-mouse-event): Avoid error with buttons > 5.
* vc-hg.el (vc-hg-after-dir-status):
* vc-bzr.el (vc-bzr-after-dir-status): Detect missing files.
- * vc-cvs.el (vc-cvs-after-dir-status, vc-cvs-parse-status): Detect
- removed files.
+ * vc-cvs.el (vc-cvs-after-dir-status, vc-cvs-parse-status):
+ Detect removed files.
* vc.el (vc-status-printer): Use a different face for missing files.
(vc-status-hide-up-to-date): Rename from
(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.")
+
;;; Code for regenerating the keyword list.
(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 nil nil
+ (("+-*/.<>=!?$%_&~^:@" . "w")) nil))
(setq mode-name "Finder")
(setq major-mode 'finder-mode)
(set (make-local-variable 'finder-headmark) nil)
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)