changeset 65494:e444511e983e

(describe-categories): "?\ " -> "?\s". (help-do-arg-highlight): Recognize also ARG-n, as in `move-to-left-margin' (ARG+n is already recognized). Simplify.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 13 Sep 2005 14:58:35 +0000
parents d454caf05903
children 7aadfee6eadc
files lisp/help-fns.el
diffstat 1 files changed, 15 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/help-fns.el	Tue Sep 13 08:53:47 2005 +0000
+++ b/lisp/help-fns.el	Tue Sep 13 14:58:35 2005 +0000
@@ -269,22 +269,20 @@
 (defun help-do-arg-highlight (doc args)
   (with-syntax-table (make-syntax-table emacs-lisp-mode-syntax-table)
     (modify-syntax-entry ?\- "w")
-    (while args
-      (let ((arg (prog1 (car args) (setq args (cdr args)))))
-        (setq doc (replace-regexp-in-string
-                   ;; This is heuristic, but covers all common cases
-                   ;; except ARG1-ARG2
-                   (concat "\\<"                   ; beginning of word
-                           "\\(?:[a-z-]*-\\)?"     ; for xxx-ARG
-                           "\\("
-                           (regexp-quote arg)
-                           "\\)"
-                           "\\(?:es\\|s\\|th\\)?"  ; for ARGth, ARGs
-                           "\\(?:-[a-z-]+\\)?"     ; for ARG-xxx
-                           "\\>")                  ; end of word
-                   (help-default-arg-highlight arg)
-                   doc t t 1))))
-    doc))
+    (dolist (arg args doc)
+      (setq doc (replace-regexp-in-string
+                 ;; This is heuristic, but covers all common cases
+                 ;; except ARG1-ARG2
+                 (concat "\\<"                   ; beginning of word
+                         "\\(?:[a-z-]*-\\)?"     ; for xxx-ARG
+                         "\\("
+                         (regexp-quote arg)
+                         "\\)"
+                         "\\(?:es\\|s\\|th\\)?"  ; for ARGth, ARGs
+                         "\\(?:-[a-z0-9-]+\\)?"  ; for ARG-xxx, ARG-n
+                         "\\>")                  ; end of word
+                 (help-default-arg-highlight arg)
+                 doc t t 1)))))
 
 (defun help-highlight-arguments (usage doc &rest args)
   (when usage
@@ -712,7 +710,7 @@
 	    (dotimes (i 95)
 	      (let ((elt (aref docs i)))
 		(when elt
-		  (insert (+ i ?\ ) ": " elt "\n"))))
+		  (insert (+ i ?\s) ": " elt "\n"))))
 	    (while (setq table (char-table-parent table))
 	      (insert "\nThe parent category table is:")
 	      (describe-vector table 'help-describe-category-set))))))))