comparison lisp/man.el @ 5572:f1e5e8a324a5

(Man-default-man-args): Use Man-specified-section-option. (Man-default-man-entry): Likewise.
author Richard M. Stallman <rms@gnu.org>
date Wed, 12 Jan 1994 04:55:35 +0000
parents c6588bd7dd93
children a52a879c385c
comparison
equal deleted inserted replaced
5571:c50d6d8ad8c1 5572:f1e5e8a324a5
358 "Build the default man args from MANWORD and buffer's major mode." 358 "Build the default man args from MANWORD and buffer's major mode."
359 (let ((sections (cdr (assq major-mode Man-auto-section-alist)))) 359 (let ((sections (cdr (assq major-mode Man-auto-section-alist))))
360 (cond 360 (cond
361 ((null sections) manword) 361 ((null sections) manword)
362 ((consp sections) 362 ((consp sections)
363 (mapconcat (lambda (n) (concat n " " manword)) sections " ")) 363 (mapconcat (lambda (n) (concat Man-specified-section-option
364 n " " manword))
365 sections " "))
364 (t 366 (t
365 (concat sections " " manword))))) 367 (concat sections " " manword)))))
366 368
367 (defun Man-default-man-entry () 369 (defun Man-default-man-entry ()
368 "Make a guess at a default manual entry. 370 "Make a guess at a default manual entry.
386 ;; If looking at something like ioctl(2) or brc(1M), include 388 ;; If looking at something like ioctl(2) or brc(1M), include
387 ;; section number in default-entry 389 ;; section number in default-entry
388 (if (looking-at "[ \t]*([ \t]*[0-9][a-zA-Z]?[ \t]*)") 390 (if (looking-at "[ \t]*([ \t]*[0-9][a-zA-Z]?[ \t]*)")
389 (progn (skip-chars-forward "^0-9") 391 (progn (skip-chars-forward "^0-9")
390 (setq default-title 392 (setq default-title
391 (concat (buffer-substring 393 (concat Man-specified-section-option
394 (buffer-substring
392 (point) 395 (point)
393 (progn 396 (progn
394 (skip-chars-forward "0-9a-zA-Z") 397 (skip-chars-forward "0-9a-zA-Z")
395 (point))) 398 (point)))
396 " " 399 " "