[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: M-x man when cursor on top of hyphenated reference

From: Kevin Rodgers
Subject: Re: M-x man when cursor on top of hyphenated reference
Date: Thu, 19 Jun 2003 10:29:53 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv: Gecko/20020406 Netscape6/6.2.2

Dan Jacobson wrote:

Man-follow-manual-reference can find maildropex even though it has a dash:
       lockmail(1),   maildropfilter(5),  makedat(1),  maildropgdbm(5),  mail-
       dropex(5),  reformail(1),  makeuserdb(1),  makemime(1),   reformime(1),
       egrep(1), grep(1), , courier(8), sendmail(8), http://www.qmail.org.

Hovever, the m command, which usually knows what is under the cursor,
doesn't know about maildropex when on top of it

Here's a hack for you to try.  If it works, I can try to implement it as

a proper patch to man.el:

(defadvice Man-default-man-entry (after hyphenated activate)
  "Handle hypenated manual references."
  (if (string-match (format "-\\((%s)\\)?\\'" Man-section-regexp)
        (forward-line 1)
        (setq ad-return-value (Man-default-man-entry)))
    (let ((prefix (Man-possibly-hyphenated-word)))
      (if (string-match "-\\'" prefix)
          (setq ad-return-value
                (concat (substring prefix 0 (match-beginning 0))

<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;";>Kevin Rodgers</a>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]