| 194 | | "*A list of regular expressions for `ff-find-file'. |
|---|
| 195 | | Specifies how to recognize special constructs such as include files |
|---|
| 196 | | etc. and an associated method for extracting the filename from that |
|---|
| 197 | | construct.") |
|---|
| | 194 | ;; We include `ff-treat-as-special' documentation here so that autoload |
|---|
| | 195 | ;; can make it available to be read prior to loading this file. |
|---|
| | 196 | "*List of special constructs for `ff-treat-as-special' to recognize. |
|---|
| | 197 | Each element, tried in order, has the form (REGEXP . EXTRACT). |
|---|
| | 198 | If REGEXP matches the current line (from the beginning of the line), |
|---|
| | 199 | `ff-treat-as-special' calls function EXTRACT with no args. |
|---|
| | 200 | If EXTRACT returns nil, keep trying. Otherwise, return the |
|---|
| | 201 | filename that EXTRACT returned.") |
|---|
| 774 | | The construct is defined in the variable `ff-special-constructs'." |
|---|
| 775 | | (let* (fname |
|---|
| 776 | | (list ff-special-constructs) |
|---|
| 777 | | (elem (car list)) |
|---|
| 778 | | (regexp (car elem)) |
|---|
| 779 | | (match (cdr elem))) |
|---|
| 780 | | (while (and list (not fname)) |
|---|
| 781 | | (if (and (looking-at regexp) match) |
|---|
| 782 | | (setq fname (funcall match))) |
|---|
| 783 | | (setq list (cdr list)) |
|---|
| 784 | | (setq elem (car list)) |
|---|
| 785 | | (setq regexp (car elem)) |
|---|
| 786 | | (setq match (cdr elem))) |
|---|
| 787 | | fname)) |
|---|
| | 774 | See variable `ff-special-constructs'." |
|---|
| | 775 | (save-excursion |
|---|
| | 776 | (beginning-of-line 1) |
|---|
| | 777 | (let* (fname |
|---|
| | 778 | (list ff-special-constructs) |
|---|
| | 779 | (elem (car list)) |
|---|
| | 780 | (regexp (car elem)) |
|---|
| | 781 | (match (cdr elem))) |
|---|
| | 782 | (while (and list (not fname)) |
|---|
| | 783 | (if (and (looking-at regexp) match) |
|---|
| | 784 | (setq fname (funcall match))) |
|---|
| | 785 | (setq list (cdr list)) |
|---|
| | 786 | (setq elem (car list)) |
|---|
| | 787 | (setq regexp (car elem)) |
|---|
| | 788 | (setq match (cdr elem))) |
|---|
| | 789 | fname))) |
|---|