Show
Ignore:
Timestamp:
07/29/06 07:48:34 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/find-file.el

    r4037 r4131  
    190190    ("^\#\\s *\\(include\\|import\\)\\s +[<\"]\\(.*\\)[>\"]" . 
    191191     (lambda () 
    192        (setq fname (buffer-substring (match-beginning 2) (match-end 2))))) 
     192       (buffer-substring (match-beginning 2) (match-end 2)))) 
    193193    ) 
    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. 
     197Each element, tried in order, has the form (REGEXP . EXTRACT). 
     198If REGEXP matches the current line (from the beginning of the line), 
     199`ff-treat-as-special' calls function EXTRACT with no args. 
     200If EXTRACT returns nil, keep trying.  Otherwise, return the 
     201filename that EXTRACT returned.") 
    198202 
    199203(defvaralias 'ff-related-file-alist 'ff-other-file-alist) 
     
    406410            (ff-list-replace-env-vars ff-search-directories))) 
    407411 
    408     (save-excursion 
    409       (beginning-of-line 1) 
    410       (setq fname (ff-treat-as-special))) 
     412    (setq fname (ff-treat-as-special)) 
    411413 
    412414    (cond 
     
    541543            (ff-list-replace-env-vars ff-search-directories))) 
    542544 
    543     (save-excursion 
    544       (beginning-of-line 1) 
    545       (setq fname (ff-treat-as-special))) 
     545    (setq fname (ff-treat-as-special)) 
    546546 
    547547    (cond 
     
    772772(defun ff-treat-as-special () 
    773773  "Return the file to look for if the construct was special, else nil. 
    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)) 
     774See 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))) 
    788790 
    789791(defun ff-basename (string)