X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/7a22490f14441898e1c4f6679f5924f097f3bb34..6e5a5743ddab1142018f20000081184f0bd9dc94:/lisp/woman.el diff --git a/lisp/woman.el b/lisp/woman.el index b1be2d67b6..2dda211200 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -1,9 +1,9 @@ ;;; woman.el --- browse UN*X manual pages `wo (without) man' -;; Copyright (C) 2000-2013 Free Software Foundation, Inc. +;; Copyright (C) 2000-2014 Free Software Foundation, Inc. ;; Author: Francis J. Wright -;; Maintainer: FSF +;; Maintainer: emacs-devel@gnu.org ;; Keywords: help, unix ;; Adapted-By: Eli Zaretskii ;; Version: 0.551 @@ -414,18 +414,12 @@ (substring arg 0 (match-end 1)) arg)))) +(require 'cl-lib) + (eval-when-compile ; to avoid compiler warnings (require 'dired) - (require 'cl-lib) (require 'apropos)) -(defun woman-mapcan (fn x) - "Return concatenated list of FN applied to successive `car' elements of X. -FN must return a list, cons or nil. Useful for splicing into a list." - ;; Based on the Standard Lisp function MAPCAN but with args swapped! - ;; More concise implementation than the recursive one. -- dak - (apply #'nconc (mapcar fn x))) - (defun woman-parse-colon-path (paths) "Explode search path string PATHS into a list of directory names. Allow Cygwin colon-separated search paths on Microsoft platforms. @@ -440,7 +434,7 @@ As a special case, if PATHS is nil then replace it by calling (mapcar 'woman-Cyg-to-Win (woman-parse-man.conf))) ((string-match-p ";" paths) ;; Assume DOS-style path-list... - (woman-mapcan ; splice list into list + (cl-mapcan ; splice list into list (lambda (x) (if x (list x) @@ -451,14 +445,14 @@ As a special case, if PATHS is nil then replace it by calling (list paths)) (t ;; Assume UNIX/Cygwin-style path-list... - (woman-mapcan ; splice list into list + (cl-mapcan ; splice list into list (lambda (x) (mapcar 'woman-Cyg-to-Win (if x (list x) (woman-parse-man.conf)))) (let ((path-separator ":")) (parse-colon-path paths))))) ;; Assume host-default-style path-list... - (woman-mapcan ; splice list into list + (cl-mapcan ; splice list into list (lambda (x) (if x (list x) (woman-parse-man.conf))) (parse-colon-path (or paths ""))))) @@ -495,6 +489,8 @@ As a special case, if PATHS is nil then replace it by calling (defgroup woman nil "Browse UNIX manual pages `wo (without) man'." :tag "WoMan" + :link '(custom-manual "(woman) Top") + :link '(emacs-commentary-link :tag "Commentary" "woman.el") :group 'help) (defcustom woman-show-log nil @@ -949,7 +945,7 @@ or different fonts." (defun woman-default-faces () "Set foreground colors of italic and bold faces to their default values." - (declare (obsolete choose-completion-guess-base-position "23.2")) + (declare (obsolete "customize the woman-* faces instead." "24.4")) (interactive) (face-spec-set 'woman-italic (face-user-default-spec 'woman-italic)) (face-spec-set 'woman-bold (face-user-default-spec 'woman-bold))) @@ -957,7 +953,7 @@ or different fonts." (defun woman-monochrome-faces () "Set foreground colors of italic and bold faces to that of the default face. This is usually either black or white." - (declare (obsolete choose-completion-guess-base-position "23.2")) + (declare (obsolete "customize the woman-* faces instead." "24.4")) (interactive) (set-face-foreground 'woman-italic 'unspecified) (set-face-foreground 'woman-bold 'unspecified)) @@ -2300,7 +2296,7 @@ Currently set only from '\" t in the first line of the source file.") ;; Process \k escapes BEFORE changing tab width (?): (goto-char from) - (woman-mark-horizonal-position) + (woman-mark-horizontal-position) ;; Set buffer-local variables: (setq fill-column woman-fill-column @@ -3452,7 +3448,7 @@ Format paragraphs upto TO. Supports special chars. Each element has the form (KEY VALUE . INC) -- inc may be nil. Also bound locally in `woman2-roff-buffer'.") -(defun woman-mark-horizonal-position () +(defun woman-mark-horizontal-position () "\\kx -- Store current horizontal position in INPUT LINE in register x." (while (re-search-forward "\\\\k\\(.\\)" nil t) (goto-char (match-beginning 0))