summaryrefslogtreecommitdiff
path: root/lisp/ffap.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2008-02-11 04:06:27 +0000
committerGlenn Morris <rgm@gnu.org>2008-02-11 04:06:27 +0000
commit8a798137003661bf0a624898bca99741096fd8c3 (patch)
tree708197da6142cba0d7fc98a14310e318c847d283 /lisp/ffap.el
parent3a77346c8e418ab2ee250a25221ce3eaf79b32f5 (diff)
downloademacs-8a798137003661bf0a624898bca99741096fd8c3.tar.gz
Kevin Ryde <user42 at zip.com.au>
(ffap-rfc-directories): New variable. (ffap-rfc): Look in those dirs before offering ffap-rfc-path.
Diffstat (limited to 'lisp/ffap.el')
-rw-r--r--lisp/ffap.el11
1 files changed, 9 insertions, 2 deletions
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: