From: Glenn Morris Date: Mon, 11 Feb 2008 04:06:27 +0000 (+0000) Subject: Kevin Ryde X-Git-Tag: emacs-pretest-23.0.90~8015 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8a798137003661bf0a624898bca99741096fd8c3;p=emacs.git Kevin Ryde (ffap-rfc-directories): New variable. (ffap-rfc): Look in those dirs before offering ffap-rfc-path. --- diff --git a/lisp/ffap.el b/lisp/ffap.el index c34478a30de..9d3b2142f39 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -956,12 +956,19 @@ If t, `ffap-tex-init' will initialize this when needed.") "/pub/gnu/emacs/elisp-archive/")) (substring name 2)))) +(defcustom ffap-rfc-directories nil + "A list of directories to look for RFC files. +If a given RFC isn't in these then `ffap-rfc-path' is offered." + :type '(repeat directory) + :group 'ffap) + (defvar ffap-rfc-path (concat (ffap-host-to-filename "ftp.rfc-editor.org") "/in-notes/rfc%s.txt")) (defun ffap-rfc (name) - (format ffap-rfc-path - (substring name (match-beginning 1) (match-end 1)))) + (let ((num (match-string 1 name))) + (or (ffap-locate-file (format "rfc%s.txt" num) t ffap-rfc-directories) + (format ffap-rfc-path num)))) ;;; At-Point Functions: