Skip to content

Commit

Permalink
Fix comparing command names in strokes.el (bug#40600)
Browse files Browse the repository at this point in the history
* lisp/strokes.el (strokes-alphabetic-lessp): Simply call string-lessp
because the cdr of the argument may be a string.
  • Loading branch information
tsuu32 authored and npostavs committed Apr 17, 2020
1 parent e105d01 commit be77a68
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lisp/strokes.el
Expand Up @@ -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)))
Expand Down

0 comments on commit be77a68

Please sign in to comment.