aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-02-11 04:06:27 +0000
committerGlenn Morris2008-02-11 04:06:27 +0000
commit8a798137003661bf0a624898bca99741096fd8c3 (patch)
tree708197da6142cba0d7fc98a14310e318c847d283
parent3a77346c8e418ab2ee250a25221ce3eaf79b32f5 (diff)
downloademacs-8a798137003661bf0a624898bca99741096fd8c3.tar.gz
emacs-8a798137003661bf0a624898bca99741096fd8c3.zip
Kevin Ryde <user42 at zip.com.au>
(ffap-rfc-directories): New variable. (ffap-rfc): Look in those dirs before offering ffap-rfc-path.
-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.")
956 "/pub/gnu/emacs/elisp-archive/")) 956 "/pub/gnu/emacs/elisp-archive/"))
957 (substring name 2)))) 957 (substring name 2))))
958 958
959(defcustom ffap-rfc-directories nil
960 "A list of directories to look for RFC files.
961If a given RFC isn't in these then `ffap-rfc-path' is offered."
962 :type '(repeat directory)
963 :group 'ffap)
964
959(defvar ffap-rfc-path 965(defvar ffap-rfc-path
960 (concat (ffap-host-to-filename "ftp.rfc-editor.org") "/in-notes/rfc%s.txt")) 966 (concat (ffap-host-to-filename "ftp.rfc-editor.org") "/in-notes/rfc%s.txt"))
961 967
962(defun ffap-rfc (name) 968(defun ffap-rfc (name)
963 (format ffap-rfc-path 969 (let ((num (match-string 1 name)))
964 (substring name (match-beginning 1) (match-end 1)))) 970 (or (ffap-locate-file (format "rfc%s.txt" num) t ffap-rfc-directories)
971 (format ffap-rfc-path num))))
965 972
966 973
967;;; At-Point Functions: 974;;; At-Point Functions: