Variable: ffap-alist

ffap-alist is a variable defined in ffap.el.gz.

Value

((inferior-python-mode . python-ffap-module-path)
 (python-ts-mode . python-ffap-module-path)
 (python-mode . python-ffap-module-path) ("" . ffap-completable)
 ("" . ffap-in-project) ("\\.info\\'" . ffap-info)
 ("\\`info/" . ffap-info-2) ("\\`[-[:lower:]]+\\'" . ffap-info-3)
 ("\\.elc?\\'" . ffap-el) (emacs-lisp-mode . ffap-el-mode)
 (finder-mode . ffap-el-mode) (help-mode . ffap-el-mode)
 (c++-mode . ffap-c++-mode) (cc-mode . ffap-c-mode)
 ("\\.\\([chCH]\\|cc\\|hh\\)\\'" . ffap-c-mode)
 (fortran-mode . ffap-fortran-mode) ("\\.[fF]\\'" . ffap-fortran-mode)
 (plain-tex-mode . ffap-tex-mode) (latex-mode . ffap-latex-mode)
 (plain-TeX-mode . ffap-tex-mode) (LaTeX-mode . ffap-latex-mode)
 ("\\.\\(tex\\|sty\\|doc\\|cls\\)\\'" . ffap-tex)
 ("\\.bib\\'" . ffap-bib) ("\\`\\." . ffap-home)
 ("\\`[Rr][Ff][Cc][-#]?\\([0-9]+\\)" . ffap-rfc)
 (dired-mode . ffap-dired))

Documentation

Alist of (KEY . FUNCTION) pairs parsed by ffap-file-at-point.

If string NAME at point (maybe "") is not a file or URL, these pairs specify actions to try creating such a string. A pair matches if either
  KEY is a symbol, and it equals major-mode, or
  KEY is a string, it should match NAME as a regexp.
On a match, (FUNCTION NAME) is called and should return a file, an URL, or nil. If nil, search the alist for further matches. While calling FUNCTION, the match data is set according to KEY if KEY is a string, so that FUNCTION can use match-string and friends to extract substrings.

Source Code

;; Defined in /usr/src/emacs/lisp/ffap.el.gz
;;; Action List (`ffap-alist'):
;;
;; These search actions depend on the major-mode or regexps matching
;; the current name.  The little functions and their variables are
;; deferred to the next section, at some loss of "code locality".

(defvar ffap-alist
  '(
    ("" . ffap-completable)		; completion, slow on some systems
    ("" . ffap-in-project)		; maybe in the root of the project
    ("\\.info\\'" . ffap-info)		; gzip.info
    ("\\`info/" . ffap-info-2)		; info/emacs
    ("\\`[-[:lower:]]+\\'" . ffap-info-3) ; (emacs)Top [only in the parentheses]
    ("\\.elc?\\'" . ffap-el)		; simple.el, simple.elc
    (emacs-lisp-mode . ffap-el-mode)	; rmail, gnus, simple, custom
    ;; (lisp-interaction-mode . ffap-el-mode) ; maybe
    (finder-mode . ffap-el-mode)	; type `C-h p' and try it
    (help-mode . ffap-el-mode)		; maybe useful
    (c++-mode . ffap-c++-mode)         ; search ffap-c++-path
    (cc-mode . ffap-c-mode)		; same
    ("\\.\\([chCH]\\|cc\\|hh\\)\\'" . ffap-c-mode) ; stdio.h
    (fortran-mode . ffap-fortran-mode)
    ("\\.[fF]\\'" . ffap-fortran-mode)
    (plain-tex-mode . ffap-tex-mode)    ; search ffap-tex-path
    (latex-mode . ffap-latex-mode)	; similar
    (plain-TeX-mode . ffap-tex-mode)    ; AUCTeX v14 counterpart
    (LaTeX-mode . ffap-latex-mode)      ; ditto
    ("\\.\\(tex\\|sty\\|doc\\|cls\\)\\'" . ffap-tex)
    ("\\.bib\\'" . ffap-bib)		; search ffap-bib-path
    ("\\`\\." . ffap-home)		; .emacs, .bashrc, .profile
    ;; This used to have a blank, but ffap-string-at-point doesn't
    ;; handle blanks.
    ;; https://lists.gnu.org/r/emacs-devel/2008-01/msg01058.html
    ("\\`[Rr][Ff][Cc][-#]?\\([0-9]+\\)"	; no $
     . ffap-rfc)			; "100% RFC2100 compliant"
    (dired-mode . ffap-dired)		; maybe in a subdirectory
    )
  "Alist of (KEY . FUNCTION) pairs parsed by `ffap-file-at-point'.
If string NAME at point (maybe \"\") is not a file or URL, these pairs
specify actions to try creating such a string.  A pair matches if either
  KEY is a symbol, and it equals `major-mode', or
  KEY is a string, it should match NAME as a regexp.
On a match, (FUNCTION NAME) is called and should return a file, an
URL, or nil.  If nil, search the alist for further matches.
While calling FUNCTION, the match data is set according to KEY if KEY
is a string, so that FUNCTION can use `match-string' and friends
to extract substrings.")