changeset 57546:84c10e765f2b

(strokes-list-strokes): Don't try to delete char at eob. (strokes-unload-hook): Set as a variable with add-hook.
author Richard M. Stallman <rms@gnu.org>
date Sun, 17 Oct 2004 06:57:51 +0000
parents 0e1bc02edee6
children 5d572f497d32
files lisp/strokes.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/strokes.el	Sun Oct 17 06:56:40 2004 +0000
+++ b/lisp/strokes.el	Sun Oct 17 06:57:51 2004 +0000
@@ -1354,7 +1354,8 @@
 			   :color-symbols
 			   `(("foreground"
 			      . ,(frame-parameter nil 'foreground-color))))))
-	  finally do (kill-region (1+ (point)) (point-max)))
+	  finally do (unless (eobp)
+		       (kill-region (1+ (point)) (point-max))))
     (view-buffer "*Strokes List*" nil)
     (set (make-local-variable 'view-mode-map)
 	 (let ((map (copy-keymap view-mode-map)))
@@ -1745,6 +1746,8 @@
   (strokes-mode -1)
   (remove-hook 'kill-emacs-query-functions 'strokes-prompt-user-save-strokes))
 
+(add-hooks 'strokes-unload-hook 'strokes-unload-hook)
+
 (run-hooks 'strokes-load-hook)
 (provide 'strokes)