:group 'woman)
(defcustom woman-man.conf-path
- '("/etc" "/usr/local/lib")
+ '("/etc" "/etc/manpath.config" "/usr/local/lib")
"*List of dirs to search and/or files to try for man config file.
Default is '(\"/etc\" \"/usr/local/lib\") [for GNU/Linux, Cygwin resp.]
A trailing separator (`/' for UNIX etc.) on directories is optional
Look in `woman-man.conf-path' and return a value for `woman-manpath'.
Concatenate data from all lines in the config file of the form
-MANPATH /usr/man"
+ MANPATH /usr/man
+
+or
+
+ MANDATORY_MANPATH /usr/man"
;; Functionality suggested by Charles Curley.
(let ((path woman-man.conf-path)
file manpath)
(with-temp-buffer
(insert-file-contents file)
(while (re-search-forward
- "^[ \t]*MANPATH[ \t]+\\(\\S-+\\)" nil t)
- (setq manpath (cons (match-string 1) manpath)))
+ "^[ \t]*\\(MANDATORY_\\)?MANPATH[ \t]+\\(\\S-+\\)" nil t)
+ (setq manpath (cons (match-string 2) manpath)))
manpath))
))
(setq path (cdr path)))
(or
(and manpath (woman-parse-colon-path manpath))
(woman-parse-man.conf)
- '("/usr/man" "/usr/local/man")
+ '("/usr/man" "/usr/share/man" "/usr/local/man")
))
"*List of DIRECTORY TREES to search for UN*X manual files.
Each element should be the name of a directory that contains
(while (re-search-forward "^[ \t]*\n\\([ \t]*\n\\)+" nil t)
(replace-match "\n" t t))
+ ;; CJK characters are underlined by double-sized "__".
+ ;; (Code lifted from man.el, with trivial changes.)
+ (if (< (buffer-size) (position-bytes (point-max)))
+ ;; Multibyte characters exist.
+ (progn
+ (goto-char (point-min))
+ (while (search-forward "__\b\b" nil t)
+ (backward-delete-char 4)
+ (woman-set-face (point) (1+ (point)) 'woman-italic-face))
+ (goto-char (point-min))
+ (while (search-forward "\b\b__" nil t)
+ (backward-delete-char 4)
+ (woman-set-face (1- (point)) (point) 'woman-italic-face))))
+
;; Interpret overprinting to indicate bold face:
(goto-char (point-min))
- (while (re-search-forward "\\(.\\)\\(\\(\b\\1\\)+\\)" nil t)
+ (while (re-search-forward "\\(.\\)\\(\\(\b+\\1\\)+\\)" nil t)
(woman-delete-match 2)
(woman-set-face (1- (point)) (point) 'woman-bold-face))