/[emacs]/emacs/lisp/man.el
ViewVC logotype

Diff of /emacs/lisp/man.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.124 by rms, Mon Jul 7 21:01:55 2003 UTC revision 1.125 by lektu, Sun Jul 13 17:16:31 2003 UTC
# Line 504  This is necessary if one wants to dump m Line 504  This is necessary if one wants to dump m
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)
# Line 578  This guess is based on the text surround Line 591  This guess is based on the text surround
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.

Legend:
Removed from v.1.124  
changed lines
  Added in v.1.125

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26