Fix comparing command names in strokes.el (bug#40600)
authorMasahiro Nakamura <tsuucat@icloud.com>
Tue, 14 Apr 2020 13:37:17 +0000 (22:37 +0900)
committerNoam Postavsky <npostavs@gmail.com>
Fri, 17 Apr 2020 00:47:35 +0000 (20:47 -0400)
* lisp/strokes.el (strokes-alphabetic-lessp): Simply call string-lessp
because the cdr of the argument may be a string.

lisp/strokes.el

index 7c00305835b909c477647536daac7a34209fc5a4..08a381801d749533785dc4f20695abc514e0098b 100644 (file)
@@ -1375,9 +1375,7 @@ If STROKES-MAP is not given, `strokes-global-map' will be used instead."
 
 (defun strokes-alphabetic-lessp (stroke1 stroke2)
   "Return t if STROKE1's command name precedes 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)))
+  (string-lessp (cdr stroke1) (cdr stroke2)))
 
 (defvar strokes-mode-map
   (let ((map (make-sparse-keymap)))