504 |
(error "Malformed Man-filter-list")) |
(error "Malformed Man-filter-list")) |
505 |
phrase) |
phrase) |
506 |
pargs " "))) |
pargs " "))) |
507 |
(setq flist (cdr flist)))) |
(setq flist (cdr flist)))) |
508 |
command)) |
command)) |
509 |
|
|
510 |
|
|
511 |
|
(defun Man-translate-cleanup (string) |
512 |
|
"Strip leading, trailing and middle spaces." |
513 |
|
(when (stringp string) |
514 |
|
;; Strip leading and trailing |
515 |
|
(if (string-match "^[ \t\f\r\n]*\\(.+[^ \t\f\r\n]\\)" string) |
516 |
|
(setq string (match-string 1 string))) |
517 |
|
;; middle spaces |
518 |
|
(setq string (replace-regexp-in-string "[\t\r\n]" " " string)) |
519 |
|
(setq string (replace-regexp-in-string " +" " " string)) |
520 |
|
string)) |
521 |
|
|
522 |
(defun Man-translate-references (ref) |
(defun Man-translate-references (ref) |
523 |
"Translates REF from \"chmod(2V)\" to \"2v chmod\" style. |
"Translates REF from \"chmod(2V)\" to \"2v chmod\" style. |
524 |
Leave it as is if already in that style. Possibly downcase and |
Leave it as is if already in that style. Possibly downcase and |
525 |
translate the section (see the Man-downcase-section-letters-flag |
translate the section (see the Man-downcase-section-letters-flag |
526 |
and the Man-section-translations-alist variables)." |
and the Man-section-translations-alist variables)." |
527 |
(let ((name "") |
(let ((name "") |
528 |
(section "") |
(section "") |
529 |
(slist Man-section-translations-alist)) |
(slist Man-section-translations-alist)) |
530 |
|
(setq ref (Man-translate-cleanup ref)) |
531 |
(cond |
(cond |
532 |
;; "chmod(2V)" case ? |
;; "chmod(2V)" case ? |
533 |
((string-match (concat "^" Man-reference-regexp "$") ref) |
((string-match (concat "^" Man-reference-regexp "$") ref) |
591 |
;;;###autoload |
;;;###autoload |
592 |
(defalias 'manual-entry 'man) |
(defalias 'manual-entry 'man) |
593 |
|
|
594 |
|
|
595 |
;;;###autoload |
;;;###autoload |
596 |
(defun man (man-args) |
(defun man (man-args) |
597 |
"Get a Un*x manual page and put it in a buffer. |
"Get a Un*x manual page and put it in a buffer. |