;; Maintainer: FSF
;; Keywords: c, matching, tools
-;; Copyright (C) 1994-1995, 2001-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1995, 2001-2013 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
:group 'ff)
;;;###autoload
-(defvar ff-special-constructs
- `(
- ;; C/C++ include, for NeXTstep too
- (,(purecopy "^\#\\s *\\(include\\|import\\)\\s +[<\"]\\(.*\\)[>\"]") .
+(defcustom ff-special-constructs
+ ;; C/C++ include, for NeXTstep too
+ `((,(purecopy "^\#\\s *\\(include\\|import\\)\\s +[<\"]\\(.*\\)[>\"]") .
(lambda ()
- (buffer-substring (match-beginning 2) (match-end 2))))
- )
+ (buffer-substring (match-beginning 2) (match-end 2)))))
;; We include `ff-treat-as-special' documentation here so that autoload
;; can make it available to be read prior to loading this file.
- "List of special constructs for `ff-treat-as-special' to recognize.
+ "List of special constructs recognized by `ff-treat-as-special'.
Each element, tried in order, has the form (REGEXP . EXTRACT).
If REGEXP matches the current line (from the beginning of the line),
`ff-treat-as-special' calls function EXTRACT with no args.
If EXTRACT returns nil, keep trying. Otherwise, return the
-filename that EXTRACT returned.")
+filename that EXTRACT returned."
+ :type '(repeat (cons regexp function))
+ :group 'ff)
(defvaralias 'ff-related-file-alist 'ff-other-file-alist)
(defcustom ff-other-file-alist 'cc-other-file-alist
("\\.hh\\'" (".cc" ".C"))
("\\.c\\'" (".h"))
- ("\\.h\\'" (".c" ".cc" ".C" ".CC" ".cxx" ".cpp"))
+ ("\\.m\\'" (".h"))
+ ("\\.h\\'" (".c" ".cc" ".C" ".CC" ".cxx" ".cpp" ".m"))
("\\.C\\'" (".H" ".hh" ".h"))
("\\.H\\'" (".C" ".CC"))
since the search algorithm searches sequentially through each directory
specified in `ff-search-directories'. If a file is not found, a new one
is created with the first matching extension (`.cc' yields `.hh')."
+ :version "24.4" ; add .m
:type '(repeat (list regexp (choice (repeat string) function)))
:group 'ff)