Browse Source

org-export: uniquify and sort allowed keys in dispatcher expert UI

* contrib/lisp/org-export.el (org-export-dispatch-ui): uniquify and
  sort allowed keys.
Nicolas Goaziou 5 years ago
parent
commit
68234d5a41
1 changed files with 2 additions and 2 deletions
  1. 2 2
      contrib/lisp/org-export.el

+ 2 - 2
contrib/lisp/org-export.el

@@ -4857,9 +4857,9 @@ back to standard interface."
 	 ;; always available.
 	 (allowed-keys
 	  (nconc (list ?1 ?2 ?3 ?4)
-		 (if (not first-key) (mapcar 'car backends)
+		 (if (not first-key) (org-uniquify (mapcar 'car backends))
 		   (let (sub-menu)
-		     (dolist (backend backends (mapcar 'car sub-menu))
+		     (dolist (backend backends (sort (mapcar 'car sub-menu) '<))
 		       (when (eq (car backend) first-key)
 			 (setq sub-menu (append (nth 2 backend) sub-menu))))))
 		 (cond ((eq first-key ?P) (list ?f ?p ?x ?a))