From: Chris Mann Date: Wed, 29 Jul 2009 09:46:44 +0000 (+0930) Subject: *WML* buffer can now be buried via 'q'. X-Git-Url: https://repo.or.cz/w/wesnoth-mode.git/commitdiff_plain/1a2d6f95a7c2b01f0478ae296cfd45c141c00700 *WML* buffer can now be buried via 'q'. * wesnoth-mode.el (wesnoth-check-wml): Allow buffer to be buried via 'q'. (wesnoth-check-directory): Add TODO note. --- diff --git a/wesnoth-mode.el b/wesnoth-mode.el index bc07b0c..d31b880 100644 --- a/wesnoth-mode.el +++ b/wesnoth-mode.el @@ -1621,9 +1621,12 @@ maintained through successive calls." (outbuf (get-buffer-create "*WML*")) (last-match-pos 1) (details nil) - (foreach '())) + (foreach '()) + (map (make-sparse-keymap))) + (define-key map (kbd "q") 'bury-buffer) (save-excursion (set-buffer outbuf) + (use-local-map map) (let ((buffer (buffer-name)) (buffer-read-only nil)) (if preserve-buffer @@ -1746,6 +1749,8 @@ maintained through successive calls." (if (= warnings 1) "." "s.")) warnings))) (message (format "Checking %s...done" source-buffer))))))) +;; TODO: This will not load dependant files in the right order. Need to +;; process from _main.cfg and similar. (defun wesnoth-check-directory (dir) "Check all WML in DIR. Where DIR is a directory containing WML files."