# HG changeset patch # User Juanma Barranquero # Date 1193834951 0 # Node ID f3bfe76fe37043f887aa356c3e78f6fb46366ffb # Parent 7400d979a9d9c84e0ef6820bd7215bc87fe7d1c4 (strokes-alphabetic-lessp): Simplify. Doc fix. (strokes-unload-hook): Remove function and variable. (strokes-unload-function): New-style unload function, adapted from `strokes-unload-hook'. diff -r 7400d979a9d9 -r f3bfe76fe370 lisp/strokes.el --- a/lisp/strokes.el Wed Oct 31 12:46:47 2007 +0000 +++ b/lisp/strokes.el Wed Oct 31 12:49:11 2007 +0000 @@ -1370,10 +1370,8 @@ (goto-char (point-min)))) (defun strokes-alphabetic-lessp (stroke1 stroke2) - "T if command name for STROKE1 is less than STROKE2's in lexicographic order." - (let ((command-name-1 (symbol-name (cdr stroke1))) - (command-name-2 (symbol-name (cdr stroke2)))) - (string-lessp command-name-1 command-name-2))) + "Return t if STROKE1's command name precedes STROKE2's in lexicographic order." + (string-lessp (cdr stroke1) (cdr stroke2))) (defvar strokes-mode-map (let ((map (make-sparse-keymap))) @@ -1745,11 +1743,11 @@ ;; strokes-decode-buffer does a save-excursion. (forward-char))) -(defun strokes-unload-hook () +(defun strokes-unload-function () + "Unload the Strokes library." (strokes-mode -1) - (remove-hook 'kill-emacs-query-functions 'strokes-prompt-user-save-strokes)) - -(add-hook 'strokes-unload-hook 'strokes-unload-hook) + ;; continue standard unloading + nil) (run-hooks 'strokes-load-hook) (provide 'strokes)