changeset 84986:4d9afe4d96b4

(woman-topic-all-completions, woman-mini-help): Fix fallout from 2007-09-07 introduction of `dolist' when the list actually was being manipulated in the loop. (woman-Cyg-to-Win, woman-pre-process-region) (woman-horizontal-escapes, woman-if-body, woman-unescape) (woman-strings, woman-special-characters, woman1-hc) (woman-change-fonts, woman-find-next-control-line): Use `match-beginning' rather than `match-string' when the result is just used as a flag.
author David Kastrup <dak@gnu.org>
date Sun, 30 Sep 2007 19:10:44 +0000
parents f7642749252b
children 9f33047587c7
files lisp/ChangeLog lisp/woman.el
diffstat 2 files changed, 31 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Sep 30 16:43:07 2007 +0000
+++ b/lisp/ChangeLog	Sun Sep 30 19:10:44 2007 +0000
@@ -1,3 +1,15 @@
+2007-09-30  David Kastrup  <dak@gnu.org>
+
+	* woman.el (woman-topic-all-completions, woman-mini-help): Fix
+	fallout from 2007-09-07 introduction of `dolist' when the list
+	actually was being manipulated in the loop.
+	(woman-Cyg-to-Win, woman-pre-process-region)
+	(woman-horizontal-escapes, woman-if-body, woman-unescape)
+	(woman-strings, woman-special-characters, woman1-hc)
+	(woman-change-fonts, woman-find-next-control-line): Use
+	`match-beginning' rather than `match-string' when the result is
+	just used as a flag.
+
 2007-09-30  Michael Albinus  <michael.albinus@gmx.de>
 
 	* net/tramp-compat.el: New file.
@@ -1836,7 +1848,7 @@
 
 	* emacs-lisp/avl-tree.el: New file.
 
-2007-08-26  Micha,bk(Bl Cadilhac  <michael@cadilhac.name>
+2007-08-26  Micha,Ak(Bl Cadilhac  <michael@cadilhac.name>
 
 	* hi-lock.el (hi-lock-unface-buffer): Show a x-menu only if the mouse
 	was used.
--- a/lisp/woman.el	Sun Sep 30 16:43:07 2007 +0000
+++ b/lisp/woman.el	Sun Sep 30 19:10:44 2007 +0000
@@ -502,7 +502,7 @@
 	   ;; Assume no `cygpath' program available.
 	   ;; Hack /cygdrive/x/ or /x/ or (obsolete) //x/ to x:/
 	   (when (string-match "\\`\\(/cygdrive\\|/\\)?/./" file)
-	     (if (match-string 1)		; /cygdrive/x/ or //x/ -> /x/
+	     (if (match-beginning 1)		; /cygdrive/x/ or //x/ -> /x/
 		 (setq file (substring file (match-end 1))))
 	     (aset file 0 (aref file 1))	; /x/ -> xx/
 	     (aset file 1 ?:))		; xx/ -> x:/
@@ -1396,7 +1396,7 @@
   ;; will be a list of the first `woman-cache-level' elements of the
   ;; following list: (topic path-index filename).  This alist `files'
   ;; is re-processed by `woman-topic-all-completions-merge'.
-  (let (files (path-index 0))	; indexing starts at zero
+  (let (dir files (path-index 0))	; indexing starts at zero
     (while path
       (setq dir (pop path))
       (if (woman-not-member dir path)	; use each directory only once!
@@ -1947,12 +1947,10 @@
     (setq apropos-accumulator
 	  (apropos-internal "woman"
 			    (lambda (symbol)
-			      (or (commandp symbol)
-				  (user-variable-p symbol)))))
-    ;; Filter out any inhibited symbols:
-    (dolist (sym apropos-accumulator)
-      (if (get sym 'apropos-inhibit)
-          (setq apropos-accumulator (delq sym apropos-accumulator))))
+			      (and
+			       (or (commandp symbol)
+				   (user-variable-p symbol))
+			       (not (get symbol 'apropos-inhibit))))))
     ;; Find documentation strings:
     (let ((p apropos-accumulator)
 	  doc symbol)
@@ -2158,14 +2156,14 @@
   (goto-char from)
   ;; .eo turns off escape character processing
   (while (re-search-forward "\\(\\\\[\\e]\\)\\|^\\.eo" to t) ; \\
-    (if (match-string 1)
+    (if (match-beginning 1)
 	(replace-match woman-escaped-escape-string t t)
       (woman-delete-whole-line)
       ;; .ec turns on escape character processing (and sets the
       ;; escape character to its argument, if any, which I'm ignoring
       ;; for now!)
       (while (and (re-search-forward "\\(\\\\\\)\\|^\\.ec" to t) ; \
-		  (match-string 1))
+		  (match-beginning 1))
 	(replace-match woman-escaped-escape-string t t))
       ;; ***** Need test for .ec arg and warning here! *****
       (woman-delete-whole-line)))
@@ -2436,7 +2434,7 @@
 	    to t)
       (let ((from (match-beginning 0))
 	    (delim (regexp-quote (match-string 1)))
-	    (absolute (match-string 2)) ; absolute position?
+	    (absolute (match-beginning 2)) ; absolute position?
 	    (N (woman-parse-numeric-arg)) ; distance
 	    to
 	    msg)			; for warning
@@ -2615,7 +2613,7 @@
 		       ;; Interpret bogus `el \}' as `el \{',
 		       ;; especially for Tcl/Tk man pages:
 		       "\\(\\\\{\\|el[ \t]*\\\\}\\)\\|\\(\n[.']\\)?[ \t]*\\\\}[ \t]*")
-		      (match-string 1))
+		      (match-beginning 1))
 	       (re-search-forward "\\\\}"))
 	     (delete-region (if delete from (match-beginning 0)) (point))
 	     (if (looking-at "^$") (delete-char 1))
@@ -2737,7 +2735,7 @@
   (let (start)
     (while (setq start (string-match woman-unescape-regex macro start))
       (setq macro
-	    (if (match-string 1 macro)
+	    (if (match-beginning 1)
 		(replace-match "" t t macro 1)
 	      (replace-match "\\" t t macro))
 	    start (1+ start)))
@@ -2860,7 +2858,7 @@
   (while
       ;; Find .ds requests and \* escapes:
       (re-search-forward "\\(^[.'][ \t]*ds\\)\\|\\\\\\*" to t)
-    (cond ((match-string 1)		; .ds
+    (cond ((match-beginning 1)		; .ds
 	   (skip-chars-forward " \t")
 	   (if (eolp)			; ignore if no argument
 	       ()
@@ -2989,7 +2987,7 @@
 		 ((cadr replacement)	; Use ASCII simulation
 		  (woman-replace-match (cadr replacement)))))
 	(WoMan-warn (concat "Special character "
-			    (if (match-string 1) "\\(%s" "\\[%s]")
+			    (if (match-beginning 1) "\\(%s" "\\[%s]")
 			    " not interpolated!") name)
 	(if woman-ignore (woman-delete-match 0))))
     ))
@@ -3222,7 +3220,7 @@
     (setq c (concat "\\(" c "\\)\\|^[.'][ \t]*hc"))
     (save-excursion
       (while (and (re-search-forward c nil t)
-		  (match-string 1))
+		  (match-beginning 1))
 	(delete-char -1)))
     ))
 
@@ -3299,7 +3297,7 @@
 	 "^[.'][ \t]*\\(\\(\\ft\\)\\|\\(.P\\)\\)\\|\\(\\\\f\\)" nil 1)
       (let (font beg notfont fescape)
 	;; Match font indicator and leave point at end of sequence:
-	(cond ((match-string 2)
+	(cond ((match-beginning 2)
 	       ;; .ft request found
 	       (setq beg (match-beginning 0))
 	       (skip-chars-forward " \t")
@@ -3307,10 +3305,10 @@
 		   (setq font previous-font)
 		 (looking-at "[^ \t\n]+"))
 	       (forward-line))		; end of control line and \n
-	      ((match-string 3)
+	      ((match-beginning 3)
 	       ;; Macro that resets font found
 	       (setq font 'default))
-	      ((match-string 4)
+	      ((match-beginning 4)
 	       ;; \f escape found
 	       (setq beg (match-beginning 0)
                      fescape t)
@@ -3742,7 +3740,7 @@
       (while
 	  (and
 	   (setq to (re-search-forward "\\(\\\\c\\)?\n[.']" nil t))
-	   (match-string 1)
+	   (match-beginning 1)
 	   (looking-at "br"))
 	(goto-char (match-beginning 0))
 	(woman-delete-line 2)))