+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.
* emacs-lisp/avl-tree.el: New file.
-2007-08-26 Micha\e,bk\e(Bl Cadilhac <michael@cadilhac.name>
+2007-08-26 Micha\e,Ak\e(Bl Cadilhac <michael@cadilhac.name>
* hi-lock.el (hi-lock-unface-buffer): Show a x-menu only if the mouse
was used.
;; 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:/
;; 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!
(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)
(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)))
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
;; 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))
(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)))
(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
()
((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))))
))
(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)))
))
"^[.'][ \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")
(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)
(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)))