/.emacs.d/compile-mode/compile-mode.el
Emacs Lisp | 2691 lines | 1811 code | 323 blank | 557 comment | 90 complexity | 7be65c7dede24c8bfbc4c1048a2ff365 MD5 | raw file
Possible License(s): GPL-2.0
Large files files are truncated, but you can click here to view the full file
- ;;; mode-compile.el --- Smart command for compiling files
- ;; according to major-mode.
- ;;
- ;; Copyright (c) 1994 - 2006 heddy Boubaker C.E.N.A.
- ;;
- ;; Author: Heddy Boubaker <heddy.Boubaker@cena.fr>
- ;; Maintainer: Heddy Boubaker <heddy.Boubaker@cena.fr>
- ;; Created: June 1994
- ;; Last modified: 2006/12/01 13:52:47
- ;; Version: 2.29
- ;; Keywords: compile, compilation, modes, languages
- ;; Tested for:
- ;; XEmacs (Lucid GNU Emacs) >= 19.10
- ;; Must work with FSF GNU Emacs > 19.31 ;-)
- ;; Do not work anymore for Emacses <= 18
- ;; Ftp access:
- ;; archive.cis.ohio-state.edu:pub/gnu/emacs/elisp-archive/misc/mode-compile.el.Z
- ;; WWW access:
- ;; <URL http://www.tls.cena.fr/~boubaker/Emacs/>
- ;;
- ;; LCD Archive Entry:
- ;; mode-compile|Heddy Boubaker|boubaker@cena.fr|
- ;; Smart command for compiling files according to major-mode and more.|
- ;; 2003/04/01 13:52:47|2.28|~/misc/mode-compile.el.Z|
- ;;
- ;;; This file is NOT part of GNU Emacs but the same permissions apply.
- ;;
- ;; GNU Emacs is free software; you can redistribute it and/or modify it under
- ;; the terms of the GNU General Public License as published by the Free
- ;; Software Foundation; either version 2, or (at your option) any later
- ;; version.
- ;;
- ;; GNU Emacs is distributed in the hope that it will be useful, but WITHOUT
- ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- ;; more details.
- ;;
- ;; You should have received a copy of the GNU General Public License along
- ;; with GNU Emacs; see the file COPYING. If not, write to the Free Software
- ;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- ;;
- ;; @ Purpose:
- ;; ==========
- ;;
- ;; Provide `mode-compile' function as a replacement for the use of `compile'
- ;; command which is very dumb for creating it's compilation command (use
- ;; "make -k" by default). `mode-compile' is a layer above `compile'; Its
- ;; purpose is mainly to build a smart compile-command for `compile' to
- ;; execute it. This compile-command is built according to number of
- ;; parameters:
- ;; - the major-mode.
- ;; - presence or not of a makefile in current directory.
- ;; - the buffer-file-name and extension.
- ;; - what is in the current buffer (`main' function,"#!/path/shell", ...).
- ;; - and more ... (see Commentary section below).
- ;; Most of these parameters are higly customizable throught Emacs Lisp
- ;; variables (to be set in your .emacs or through Customization menu).
- ;; Running mode-compile after an universal-argument (C-u) allows remote
- ;; compilations, user is prompted for a host name to run the compilation
- ;; command on. Another function provided is `mode-compile-kill' which
- ;; terminate a running compilation session launched by `mode-compile'.
- ;;
- ;; @ Installation:
- ;; ===============
- ;;
- ;; Byte compile this file (*) somewhere in your `load-path' and add in
- ;; your .emacs:
- ;; (autoload 'mode-compile "mode-compile"
- ;; "Command to compile current buffer file based on the major mode" t)
- ;; (global-set-key "\C-cc" 'mode-compile)
- ;; (autoload 'mode-compile-kill "mode-compile"
- ;; "Command to kill a compilation launched by `mode-compile'" t)
- ;; (global-set-key "\C-ck" 'mode-compile-kill)
- ;;
- ;; By default mode-compile is very verbose and waits a few seconds (1 by
- ;; default) after each message for the user to have time to read it. You
- ;; could set variables `mode-compile-expert-p' and
- ;; `mode-compile-reading-time' to change this behaviour. On X-Windows
- ;; systems setting the variable `mode-compile-other-frame-p' will create a
- ;; new frame and launch the compilation command in it.
- ;;
- ;; (*) Don't take care of messages:
- ;; ** reference to free variable efs-remote-shell-file-name
- ;; This is perfectly normal ;-}. But if you know a way to avoid it let me
- ;; know.
- ;;
- ;; @ Bug Reports:
- ;; ==============
- ;;
- ;; To report a bug please use function `mode-compile-submit-bug-report'
- ;; Please note that this bug-report facility uses Barry Warsaw's reporter.el
- ;; which is part of GNU Emacs v19 and bundled with many other packages. If
- ;; needed, you can obtain a copy of reporter.el at the elisp-archive.
- ;;
- ;; @ Documentation:
- ;; ================
- ;;
- ;; This section will explain how the `compile-command' are built according to
- ;; the `major-mode' and how to customize it. The major modes `mode-compile'
- ;; currently known are:
- ;; - c-mode, c++-mode, makefile-mode, dired-mode, ada-mode, emacs-lisp-mode,
- ;; lisp-interaction-mode, sh-mode, csh-mode, fundamental-mode, text-mode,
- ;; indented-text-mode compilation-mode, fortran-mode, c?perl-mode,
- ;; zsh-mode java-mode, tcl-mode, python-mode, ruby-mode
- ;; For other modes a default behaviour is provided.
- ;;
- ;; When running `mode-compile' or `mode-compile-kill' the hooks
- ;; `mode-compile-(before|after)-(compile|kill)-hook' are executed. The
- ;; current buffer could be automaticaly saved if variable
- ;; `mode-compile-always-save-buffer-p' is set to `t'. ALL the modified
- ;; buffers could be automaticaly saved if variable `mode-compile-save-all-p'
- ;; is set to `t'.
- ;;
- ;; @@ fundamental-mode, text-mode, indented-text-mode & UNKNOWN MODES:
- ;; *** THIS IS TOO THE DEFAULT BEHAVIOR FOR UNKNOWN MODES ***
- ;; Try to guess what the file is by:
- ;; - 1st looking at it's name and extension (see variable
- ;; `mode-compile-filename-regexp-alist').
- ;; - 2nd looking at string "#!/path/shell" at first line to extract shell
- ;; to run the script with (see variable `mode-compile-shell-alist').
- ;; - 3rd looking at a makefile in current directory.
- ;; - then calling `compile' with the last compile command which is
- ;; asked to be edited by user ...
- ;; The `kill-compile' command is then bound dynamically (buffer-local).
- ;;
- ;; @@ compilation-mode:
- ;; Call `compile' with the last compile command.
- ;;
- ;; @@ makefile-mode:
- ;; The makefile is run with make throught `compile' (user is prompted
- ;; for the rule to run, see variable
- ;; `mode-compile-prefered-default-makerule' to see how a default choice
- ;; could be selected).
- ;;
- ;; @@ emacs-lisp-mode, lisp-interaction-mode:
- ;; If the buffer is a .el file byte-compile it to produce a .elc file,
- ;; else just byte-compile the buffer (this don't use `compile' but
- ;; `byte-compile').
- ;;
- ;; @@ dired-mode:
- ;; Find a makefile in the directory and run make with it (like in
- ;; makefile-mode), else try to byte-recompile all .el files olders than
- ;; their associated .elc files (unlike `byte-recompile-directory' this is
- ;; not recursive), finally if no .el files are present ask compilation
- ;; command to user by calling `default-compile'. To find a makefile a
- ;; regexp is provided which name is `mode-compile-makefile-regexp'.
- ;;
- ;; @@ sh-mode, csh-mode, zsh-mode:
- ;; Run "[cz]?sh" with debugging arguments as specified in
- ;; `[cz]?sh-dbg-flags' on the currently edited file.
- ;;
- ;; @@ c?perl-mode:
- ;; Run file with "perl -w" (can step throught errors with compile's
- ;; `next-error' command).
- ;;
- ;; @@ tcl-mode:
- ;; Run file with "wish" (can step throught errors with compile's
- ;; `next-error' command).
- ;;
- ;; @@ c-mode, c++-mode:
- ;; First it try to see if there is a makefile in the directory, makefiles to
- ;; look for are specified by the variable `mode-compile-makefile-regexp'.
- ;; If yes two cases could happen: there is only one makefile so use it, or
- ;; there is more than one (sometimes when you need to write portable soft
- ;; you could have some makefiles by system: SunOs.make, HP.make ...), in
- ;; that case prompt to user for choice (with smart completion). Once the
- ;; makefile has been selected it extract the rules from it and ask to user
- ;; to choose a rule to make (with smart completion, see variable
- ;; `mode-compile-prefered- default-makerule' to see how a default choice
- ;; could be selected).
- ;;
- ;; There are some cases where no makefiles are presents (YES I KNOW this is
- ;; bad practice but you sometimes have no needs to write a Makefile). In
- ;; that case the function try to build the most intelligent compilation
- ;; command by using the favourite user C/C++ compiler: value of environment
- ;; variable "CC" or "CXX" or first found, in the PATH, of compilers
- ;; specified in variable `cc-compilers-list' or `c++-compilers-list'. Then
- ;; it look for the varenv "CFLAGS" of "CXXFLAGS" to append to the compiler
- ;; command, find the file to compile:
- ;; <name-of-the-file-to-compiled>.(c|cc|C|cpp) (see *) and ask for
- ;; confirmation. If you really trust mode-compile will build the right
- ;; command and want to bypass confirmation you could set the variable
- ;; `mode-compile-never-edit-command-p' to t.
- ;;
- ;; (*) How to find <name-of-the-file-to-compiled>:
- ;; In both case the command try to guess which file has to be compiled:
- ;; It's a trivial choice when current buffer file is a
- ;; .(c|C|cc|cpp... -any file with extension specified in
- ;; `cc-source-file-ext-list' or `c++-source-file-ext-list') file but
- ;; when it's a .(h|H|hh) file what to do? The variable
- ;; `cc-companion-file-regexp' or `c++-companion-file-regexp' specify
- ;; how to find a .(c|C|cc|cpp...) file from a .(h|H|hh...); This is
- ;; done by appending .(c|C|cc|cpp) to
- ;; <filename-without-matching-regexp>. In c-mode with default value
- ;; it produce:
- ;; file.h, file_[Pp].h -> file.c
- ;; I sometimes use files _p.h to indicate that the file is a private header
- ;; file for a .c file.
- ;; In c++-mode with default value it produce:
- ;; file.hh, file_[Pp].hh -> file.cc
- ;; I sometimes use files _p.cc to indicate that the file is a private header
- ;; file for a .cc file.
- ;; The output of compilation will be a
- ;; <name-of-the-file-to-compiled>.o file if no `main' function is
- ;; found inside or a <name-of-the-file-to-compiled> EXECUTABLE file
- ;; if `main' function found.
- ;;
- ;; @@ ada-mode:
- ;; Same as c/c++-mode but run Ada compiler on the Ada file. There are no
- ;; companion file and no way to find a main function in Ada.
- ;;
- ;; @@ fortran-mode:
- ;; Same as c-mode but run Fortran compiler on .[Ff](or)? files.
- ;;
- ;; @@ java-mode:
- ;; Same as c-mode but call "javac" without the -o option on .java files
- ;;
- ;; @@ python-mode:
- ;; Run file with "python" (can step throught errors with compile's
- ;; `next-error' command).
- ;;
- ;; @@ ruby-mode:
- ;; Run file with "ruby" (can step throught errors with compile's
- ;; `next-error' command).
- ;;
- ;; @@ message-mode:
- ;; Run `message-send'.
- ;;
- ;; @ WhatsNew:
- ;; ===========
- ;;
- ;; Support for ruby-mode
- ;;
- ;; @ Contributors/Helpers:
- ;; =======================
- ;;
- ;; Adrian Aichner <aichner@ecf.teradyne.com>
- ;; "William A. Perkins" <wa_perkins@pnl.gov>
- ;; Bin Mu <mubin@DerivaTech.COM>
- ;; Gael MARZIOU <Gael_Marziou@grenoble.hp.com>
- ;; Christian Motschke <motschke@prosun.first.gmd.de>
- ;; boris <boris@cs.rochester.edu>
- ;; Edward Hartnett <ejh@larry.gsfc.nasa.gov>.
- ;; Hartmut MANZ <manz@intes-stuttgart.de>.
- ;; Henry Guillaume <henryg@tusc.com.au>.
- ;; Ian Young <imy@wcl-rs.bham.ac.uk>
- ;; Ilya Zakharevich <ilya@math.ohio-state.edu>.
- ;; Kevin Broadey <KevinB@bartley.demon.co.uk>.
- ;; Lawrence R. Dodd <dodd@roebling.poly.edu>.
- ;; Martin Jost <asictest@ztivax.zfe.siemens.de>.
- ;; Michael Welsh Duggan <md5i+@andrew.cmu.edu>.
- ;; Rolf EBERT <rolf@gundog.lbl.gov>.
- ;; Scott Hofmann <scotth@visix.com>.
- ;; Stefan Schoef <Stefan.Schoef@arbi.informatik.uni-oldenburg.de>.
- ;; John W. Harwell <ccjohnh@showme.missouri.edu> - JWH.
- ;; Charles L.G. Comstock <dgtized@gmail.com> - CLGC
- ;;
- ;; @ ToDo:
- ;; =======
- ;;
- ;; Extending this to some others programming languages (modes).
- ;; Writting an Info documentation.
- ;; Contributors are greatly accepted (send me diffs and don't forget to
- ;; update documentation and all comments too please).
- ;; Maybe Using ange-ftp parse .netrc utilities for remote host and
- ;; user infos.
- ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; @ Requirements ;;;
- ;; mode-compile is not a replacement for compile
- ;; it is just a layer above it.
- (require 'compile)
- ;;; For Emacs-Lisp files compilations
- (require 'byte-compile "bytecomp")
- ;;; For easy macros
- (require 'backquote)
- (require 'cl)
- (load-library "cl-macs")
- ;; Pretty print elisp
- (require 'pp)
- ;;; Setting obsolete vars
- (eval-and-compile
- (condition-case ()
- (require 'obsolete)
- (error nil))
- (if (and (featurep 'obsolete) (fboundp 'define-obsolete-variable-alias))
- nil ;; We've got what we needed
- (defmacro define-obsolete-variable-alias (old new)
- (` (progn (defalias (, old) (, new))
- (put (, old) 'byte-obsolete-variable (, new)))
- ))))
- ;;; For using custom - stolen from w3-cus.el -
- (eval-and-compile
- (condition-case ()
- (require 'custom)
- (error nil))
- (if (and (featurep 'custom) (fboundp 'custom-declare-variable))
- nil ;; We've got what we needed
- ;; We have the old custom-library, hack around it!
- (defmacro defgroup (&rest args)
- nil)
- (defmacro defcustom (var value doc &rest args)
- (` (defvar (, var) (, value) (, doc))))))
- ;; Custom groups
- (defgroup compilation nil
- "Compilations from within Emacs variables."
- :link '(url-link :tag "Author's Emacs Page"
- "http://www.tls.cena.fr/~boubaker/Emacs/")
- :group 'tools
- :group 'development)
- (defgroup compilation-lang nil
- "Language specific compilation options."
- :group 'languages
- :group 'compilation)
- (defgroup compilation-script nil
- "Scripts compilation options."
- :group 'compilation)
- (defgroup compilation-elisp nil
- "Emacs developpement compilation options."
- :group 'lisp
- :group 'compilation)
- ;; @ User variables ;;;
- ;; @@ Common variables to mode-compile for all modes ;;;
- (defcustom mode-compile-modes-alist
- '((c-mode . (cc-compile kill-compilation))
- (java-mode . (java-compile kill-compilation))
- (c++-mode . (c++-compile kill-compilation))
- (ada-mode . (ada-compile kill-compilation))
- (fortran-mode . (f77-compile kill-compilation))
- (dired-mode . (dired-compile kill-compilation))
- (emacs-lisp-mode . (elisp-compile keyboard-quit)) ; I'm SURE IT'S NOT the best way
- (lisp-interaction-mode . (elisp-compile keyboard-quit)) ; to kill a byte-compilation.
- (makefile-mode . (makefile-compile kill-compilation))
- (sh-mode . (sh-compile kill-compilation))
- (csh-mode . (csh-compile kill-compilation))
- (zsh-mode . (zsh-compile kill-compilation))
- (perl-mode . (perl-compile kill-compilation))
- (cperl-mode . (perl-compile kill-compilation))
- (tcl-mode . (tcl-compile kill-compilation)) ; JWH
- (python-mode . (python-compile kill-compilation)) ; BM
- (ruby-mode . (ruby-compile kill-compilation)) ; CLGC
- ;(message-mode . (message-compile kill-compilation))
- (fundamental-mode . (guess-compile nil)) ; bound dynamically
- (text-mode . (guess-compile nil)) ; itou
- (indented-text-mode . (guess-compile nil)) ; itou
- (compilation-mode . (default-compile kill-compilation)))
- "Assoc list of compile/kill functions for some known modes.
- Each element look like (MODE . (COMPILE-FUNCTION KILL-FUNCTION))
- `mode-compile' will call COMPILE-FUNCTION and `mode-compile-kill'
- KILL-FUNCTION if current major-mode is MODE.
- If you want to add or modify a COMPILE-FUNCTION and it's associated
- KILL-FUNCTION for MODE and don't want to hack `mode-compile' you could
- do the following (it exists however a more subtle method for
- modifying, this is left as an exercice for the reader :-):
- (defun my-mode-compile() ...)
- (defun my-mode-compile-kill() ...)
- (setq mode-compile-modes-alist
- (append '((my-mode . (my-mode-compile my-mode-compile-kill)))
- mode-compile-modes-alist))"
- :type '(repeat
- (cons :tag "Association: mode/compilation functions"
- (function :tag "Mode")
- (list :tag "Compilation functions"
- (choice :tag "Function to run the compilation"
- (function-item :tag "Default" :value default-compile)
- (function-item :tag "Guess" :value guess-compile)
- (function-item :tag "Emacs lisp byte compilation" :value elisp-compile)
- (function :tag "Your choice, take care..."))
- (choice :tag "Function to kill a running compilation"
- (function-item :tag "Just kill" :value kill-compilation)
- (const :tag "Nothing -- use with guess-compile --" :value nil)
- (function-item :tag "To use with elisp-compile" :value keyboard-quit)
- ;; This item could not be selected due to a custom (hum) feature ...
- (function :tag "Your choice, take care..." :value nil)))))
- :group 'compilation)
- (defcustom mode-compile-filename-regexp-alist
- ;; These could be in auto-mode-alist. But if you are like me
- ;; and don't like these modes (prefear to edit these kind of
- ;; files in text-mode) this is a nice way to compile them
- ;; without to be bored with their associated modes.
- '((mode-compile-makefile-regexp . makefile-mode)
- ("\\.sh$" . sh-mode)
- ("\\.csh$" . csh-mode)
- ("\\.zsh$" . zsh-mode))
- "Assoc list of major-modes for some filenames regexp.
- Each element look like (REGEXP . MODE) This variable is really similar
- to `auto-mode-alist' in the fact that it associate a MODE to a REGEXP
- matching a filename. The only differences is that you are not obliged
- to have the specified MODE available to use it (`guess-compile' use
- it), the MODE is only a pointer to an assoq in
- `mode-compile-modes-alist' to get the COMPILE-FUNCTION and the
- KILL-FUNCTION. The REGEXP could be a form wich evaluate to a string.
- To add a new filename regexp do the following:
- (setq mode-compile-filename-regexp-alist
- (append '((my-filename-regexp . some-mode-mode-compile-know)
- mode-compile-modes-alist))"
- :type '(repeat
- (cons :tag "Association: filename/mode"
- (choice :tag "Filename regexp match"
- (regexp :tag "Regexp as a string")
- (symbol :tag "Variable containing the regexp")
- (sexp :tag "Form wich evaluate to a string"))
- ;; I need to bind dynamicaly this with const, ideas??
- ;;`(choice
- ;; ,@(mapcar (lambda (x) `(const ,(car x))) mode-compile-modes-alist))))
- (function :tag "Mode to use -- should be a valid assoq in mode-compile-modes-alist --")))
- :group 'compilation)
- (defcustom mode-compile-shell-alist
- '(("sh" . sh-mode)
- ("csh" . csh-mode)
- ("zsh" . zsh-mode)
- ("perl" . perl-mode)
- ("tcl" . tcl-mode) ; JWH
- ("python" . python-mode) ; BM
- ("ruby" . ruby-mode)) ; CLGC
- "Assoc list of compile function for some known shells.
- Each element look like (SHELL . MODE) This variable look like
- `auto-mode-alist' in the fact that it associate a MODE to a name; A
- SHELL name here. The main difference is that you are not obliged to
- have the specified MODE available to use it (`guess-compile' use it),
- the MODE is only a pointer to an assoq in `mode-compile-modes-alist'
- to get the COMPILE-FUNCTION and the KILL-FUNCTION.
- To add a new shell do the following:
- (setq mode-compile-filename-shell-alist
- (append '((my-shell-name . some-mode-mode-compile-know)
- mode-compile-modes-alist))"
- :type '(repeat
- (cons :tag "Association: shell name/mode"
- (string :tag "Shell name")
- ;; I need to bind dynamicaly this with const, ideas??
- ;;`(choice
- ;; ,@(mapcar (lambda (x) `(const ,(car x))) mode-compile-modes-alist))))
- (function :tag "Mode to use -- should be a valid assoq in mode-compile-modes-alist --")))
- :group 'compilation)
- ;;;###autoload
- (defcustom mode-compile-make-program "make"
- "*The `make' program used to process makefiles.
- If you have GNU make installed with name \"gmake\" use it."
- :type 'string
- :group 'compilation)
- (defcustom mode-compile-makefile-regexp
- "\\(^[Mm]akefile\\|.*\\.[mM][aA]?[kK][eE]?\\.?.*$\\)"
- "Regexp matching 'could be' makefiles filenames."
- :type 'regexp
- :group 'compilation)
- (defcustom mode-compile-makefile-backups-regexp
- "\\(\\(~\\|\\.[bB][aA][cC]?[kK]\\)$\\)\\|\\(\\(^\\|/\\)[.,][^/]+$\\)"
- "Regexp to find if a Makefile is a backup or not"
- :type 'regexp
- :group 'compilation)
- ;;;###autoload
- (defcustom mode-compile-ignore-makefile-backups t
- "*Tell mode compile to ignore makefiles backup files when selecting the Makefile to use."
- :type 'boolean
- :group 'compilation)
- ;;;###autoload
- (defvar mode-compile-default-make-options "-k"
- "Default options to give to `make'.")
- ;;;###autoload
- (defcustom mode-compile-make-options (eval mode-compile-default-make-options)
- "*Options to give to `make'.
- This could be any form evaluating to a string.
- Some people asked me a way to modify the make options everytime a
- compilation command is launched, do that:
- (defun my-mode-compile-ask-make-options()
- \"*Hook called by mode-compile, asking for make options.\"
- (interactive)
- (read-string \"Make options: \"
- mode-compile-default-make-options))
- (setq mode-compile-make-options
- 'my-mode-compile-ask-make-options)"
- :type '(choice
- string
- (sexp :tag "Form evaluating to a string"))
- :group 'compilation)
- ;;;###autoload
- (defcustom mode-compile-prefered-default-makerule 'none
- "*Default makerule you would like to see in minibuffer as a default choice
- when selecting the make rule to build.
- Possible values are:
- 'none -- let mode-compile deciding for you.
- 'all -- try hard to show you the \"all\" rule.
- 'default -- try hard to show you the \"default\" rule.
- 'file -- try to show you the name of the file which will be
- result of compilation.
- The 'none action is taken as default is something fail."
- :type '(radio :tag "Symbol"
- (const :tag "None - Let mode compile made the choice" :value none)
- (const :tag "All - Show the \"all\" rule" :value all)
- (const :tag "Default - Show the \"default\" rule" :value default)
- (const :tag "File - Show the \"result file name\" rule" :value file))
- :group 'compilation)
- ;;;###autoload
- (defcustom mode-compile-ignore-makerule-regexp nil
- "*Makefile rules which must be ignored when building completion list.
- For example if you want to remove all `files rules' set
- it to: \"\\\\.\\\\([aoc]\\\\|s[ao][.0-9]*\\\\)\". "
- :type '(choice (const :tag "none" :value nil)
- (const :tag "The `all files' rule" :value "\\.\\([aoc]\\|s[ao][.0-9]*\\)")
- regexp)
- :group 'compilation)
- ;;;###autoload
- (defcustom mode-compile-save-all-p nil
- "*Non-nil means save ALL the modified buffers without asking
- before launching compilation command."
- :type 'boolean
- :group 'compilation)
- ;;;###autoload
- (defcustom mode-compile-always-save-buffer-p nil
- "*Non-nil means save the current buffer without asking
- before launching compilation command."
- :type 'boolean
- :group 'compilation)
- ;;;###autoload
- (defcustom mode-compile-never-edit-command-p nil
- "*Non-nil means never ask to user to edit the compile command."
- :type 'boolean
- :group 'compilation)
- ;; @@ Compilation in other frame vars ;;;
- (defgroup compilation-frame nil
- "Compile in another frame variables."
- :group 'frames
- :group 'compilation)
- ;;;###autoload
- (defcustom mode-compile-other-frame-p nil
- "*Non-nil means compile in another frame.
- A new Emacs FRAME is created and the compilation command is executed
- in this other frame. To specify the frame parameters see also
- variable `mode-compile-frame-parameters-alist'."
- :type 'boolean
- :group 'compilation-frame)
- (defcustom mode-compile-other-frame-name "COMPILATION"
- "Name of mode-compile's other frame.
- This name could be used in your .Xdefault or .Xresources file as:
- Emacs.MODE-COMPILE-OTHER-FRAME-NAME.resource_to_be_set: ..."
- :type 'string
- :group 'compilation-frame)
- (defconst mode-compile-default-frame-parameters
- (list
- (cons 'name mode-compile-other-frame-name)
- (cons 'width 85) ; columns
- (cons 'height 30)) ; lines
- "Default parameters for mode-compile's other frame.")
- (defvar mode-compile-frame-parameters-alist
- (purecopy mode-compile-default-frame-parameters)
- "Parameters for the new Compilation Screen created
- if variable `mode-compile-other-frame-p' is non nil..
- See also variable `mode-compile-default-frame-parameters' and
- `mode-compile-other-frame-name'.
- For informations about Screen/Frame parameters see:
- - Info, Nodes: Lispref::Screen::Screen Parameters
- - GNU Emacs Lisp Reference Manual, chapter 26 p375: Frames.")
- ;; @@ Hooks ;;;
- ;;;###autoload
- (defcustom mode-compile-before-compile-hook nil
- "Hook to be run before compile command is executed
- when `mode-compile' is invoked."
- :type 'hook
- :group 'compilation)
- ;;;###autoload
- (defcustom mode-compile-after-compile-hook nil
- "Hook to be run after compile command is executed
- when `mode-compile' is invoked."
- :type 'hook
- :group 'compilation)
- ;;;###autoload
- (defcustom mode-compile-before-kill-hook nil
- "Hook to be run before killing compile command is executed
- when `mode-compile-kill' is invoked."
- :type 'hook
- :group 'compilation)
- ;;;###autoload
- (defcustom mode-compile-after-kill-hook nil
- "Hook to be run after killing compile command is executed
- when `mode-compile-kill' is invoked."
- :type 'hook
- :group 'compilation)
- ;; @@ System dependencies ;;;
- (defvar mode-compile-exe-file-ext
- (cond
- ((memq system-type '(ms-dos emx windows-95 windows-98 windows-nt)) ".exe")
- (t ""))
- "*Extension of executable files (with dot included)")
- (defvar mode-compile-dir-separator-char
- (cond
- ;; MSDOSish file systems
- ((memq system-type '(ms-dos emx windows-95 windows-98 windows-nt)) "\\")
- ;; Unixish file systems
- (t "/"))
- "*Separator char between directories")
- ;; @@ Facilities variables ;;;
- ;;;###autoload
- (defvar mode-compile-choosen-compiler nil
- "*Global variable containing the name of the compiler
- which will be used for compiling without makefile.
- Could be used in combination with
- (cc|c++|ada|f77)-default-compiler-options
- to automaticaly choose the compiler specific options.
- example:
- (defun my-compiler-get-options()
- (cond
- ((string= mode-compile-choosen-compiler \"gcc\")
- \"-Wall -pedantic-errors\")
- ((string= mode-compile-choosen-compiler \"cc\")
- \"cc options whatever they are...\")
- (t
- (message \"Don't know this compiler: %s\" mode-compile-choosen-compiler)
- (read-string
- (format \"Options for %s compiler: \" mode-compile-choosen-compiler)))))
- (setq cc-default-compiler-options 'my-compiler-get-options)")
- ;; @@ User level ;;;
- ;;;###autoload
- (defcustom mode-compile-expert-p nil
- "*Non nil means `mode-compile' will not speaks too much.
- See also variable variable mode-compile-reading-time."
- :type 'boolean
- :group 'compilation)
- ;;;###autoload
- (defcustom mode-compile-reading-time 1
- "*Seconds to wait in verbose mode after printing a message.
- In verbose mode mode-compile print too much messages that it is
- allmost impossible to read them. Just setting this delay leave you the
- time to read all the messages. If you don't want any delay set it to
- `0'.
- See also function sit-for."
- :type 'integer
- :group 'compilation)
- ;; @@ Remote compilation vars ;;;
- (defgroup compilation-remote nil
- "Remote compilations options."
- :group 'compilation)
- (defcustom mode-compile-remote-hosts-alist '()
- "Alist of favourites hosts names and the username
- to use to log on (HOSTNAME . USERNAME).
- If USERNAME is a function it will be called with HOSTNAME as argument
- and should return an USERNAME string (for example you could use
- something like efs-get-user - not tested -), if it is nil the function
- user-login-name will be used."
- :type '(repeat
- (cons
- (string :tag "Hostname")
- (choice
- (const :tag "We'll use \'user-login-name" :value nil)
- (string :tag "Username")
- (function :tag "Function which return USERNAME given a HOSTNAME" :value efs-get-user))))
- :group 'compilation-remote)
- (defcustom mode-compile-remote-execute-command "rsh"
- "The shell command used to run a command remotely.
- \"rsh\" is the only choice I know but I'm far to know everything...
- This variable is set automaticaly with the value of
- remote-shell-program or efs-remote-shell-file-name at load time."
- :type 'string
- :group 'compilation)
- (eval-when 'load
- (cond
- ((not (string= mode-compile-remote-execute-command "rsh"))
- ;; user changed default
- nil)
- ;; Try to not multiply definitions of the same stuff
- ;; in too many emacs lisp packages ...
- ((and (boundp 'remote-shell-program) remote-shell-program)
- (setq mode-compile-remote-execute-command remote-shell-program))
- ((and (boundp 'efs-remote-shell-file-name) efs-remote-shell-file-name)
- (setq mode-compile-remote-execute-command efs-remote-shell-file-name))
- ))
- (defcustom mode-compile-remote-execute-set-host-arg ""
- "Argument To set the remote host name to the
- mode-compile-remote-execute-command,
- None is required for \"rsh\"."
- :type 'string
- :group 'compilation-remote)
- (defcustom mode-compile-remote-execute-set-command-arg ""
- "Argument to set the command to be run remotely to the
- mode-compile-remote-execute-command.
- None is required for \"rsh\"."
- :type 'string
- :group 'compilation-remote)
- (defcustom mode-compile-remote-execute-set-username-arg "-l"
- "Argument to set the username under which we will log on
- on the remote host, to give to mode-compile-remote-execute-command."
- :type 'string
- :group 'compilation-remote)
- (defcustom mode-compile-remote-execute-misc-args ""
- "Misc additionnals arguments to give to the
- mode-compile-remote-execute-command."
- :type 'string
- :group 'compilation-remote)
- ;; @@ c-mode compile variables ;;;
- (defgroup compile-c nil
- "C Compilation options."
- :group 'c
- :group 'compilation-lang)
- (defcustom cc-compilers-list '( "gcc" "c89" "acc" "cc" )
- "List of user's favourites C compilers in order of preferencies."
- :type '(repeat (string :tag "C Compiler name"))
- :group 'compile-c)
- (defcustom cc-companion-file-regexp "\\(_[Pp]\\)?\\.[pP]?h"
- "Regexp to find associated .c file from a .h."
- :type 'regexp
- :group 'compile-c)
- (defcustom cc-default-compiler "cc"
- "*Default C compiler to use when everything else fails.
- This could be any form evaluating to a string, so you could map it to
- a function asking you interactively to choose the compiler.
- example:
- (defun my-choose-compiler()
- (read-string \"C compiler: \"))
- (setq cc-compilers-list '()
- cc-default-compiler 'my-choose-compiler)"
- :type '(choice string function)
- :group 'compile-c)
- (defcustom cc-compiler-varenv "CC"
- "Varenv indicating the C compiler to use."
- :type 'string
- :group 'compile-c)
- (defcustom cc-cflags-varenv "CFLAGS"
- "Varenv indicating the C compiler flags to use."
- :type 'string
- :group 'compile-c)
- (defcustom cc-source-ext-list '( "c" )
- "Extensions for C compileable source files."
- :type '(repeat string)
- :group 'compile-c)
- (defcustom cc-headers-ext-list '( "h" )
- "Extensions for C headers source files."
- :type '(repeat string)
- :group 'compile-c)
- (defcustom cc-default-compiler-options "-g"
- "*Default options to give to the C compiler.
- This could be any form evaluating to a string.
- See `mode-compile-choosen-compiler' variable."
- :type '(choice
- string
- (sexp :tag "Form evaluating to a string"))
- :group 'compile-c)
- (defcustom cc-source-file-ext-regexp "\\.c"
- "Regexp to find, from it's name, if a C file is compileable."
- :type 'string
- :group 'compile-c)
- (defcustom cc-build-output-args t
- "Build output-args for c-mode."
- :type 'boolean
- :group 'compile-c)
- (defcustom cc-object-file-ext "o"
- "Extension of objects file (result of compilation)
- in c mode."
- :type 'string
- :group 'compile-c)
- ;; @@ java-mode compile variables ;;;
- (defgroup compile-java nil
- "Java compilation options."
- :group 'compilation-lang)
- (defcustom java-compilers-list '( "javac" )
- "List of user's favourites java compilers in order of preferencies."
- :type '(repeat (string :tag "Java Compiler name"))
- :group 'compile-java)
- (defcustom java-companion-file-regexp ""
- "Regexp to find associated compileable Java companion file.
- This is useless in Java because there do not exists uncompileable files."
- :type 'regexp
- :group 'compile-java)
- (defcustom java-default-compiler "javac"
- "*Default C compiler to use when everything else fails.
- This could be any form evaluating to a string, so you could map it to
- a function asking you interactively to choose the compiler.
- example:
- (defun my-choose-compiler()
- (read-string \"Java compiler: \"))
- (setq java-default-compiler 'my-choose-compiler)."
- :type '(choice string function)
- :group 'compile-java)
- (defcustom java-compiler-varenv "JAVAC"
- "Varenv indicating the C compiler to use."
- :type 'string
- :group 'compile-java)
- (defcustom java-cflags-varenv "JAVAC_FLAGS"
- "Varenv indicating the C compiler flags to use."
- :type 'string
- :group 'compile-java)
- (defcustom java-source-ext-list '( "java" )
- "Extensions for Java compileable source files."
- :type '(repeat string)
- :group 'compile-java)
- (defcustom java-headers-ext-list '( "java" )
- "Extensions for Java source files."
- :type '(repeat string)
- :group 'compile-java)
- (defcustom java-default-compiler-options "-O"
- "*Default options to give to the Java compiler.
- This could be any form evaluating to a string. See
- `mode-compile-choosen-compiler' variable."
- :type '(choice
- string
- (sexp :tag "Form evaluating to a string"))
- :group 'compile-java)
- (defcustom java-source-file-ext-regexp "\\.java"
- "Regexp to find, from it's name, if a Java file is compileable."
- :type 'regexp
- :group 'compile-java)
- (defcustom java-build-output-args nil
- "Dont build output-args for Java-mode."
- :type 'boolean
- :group 'compile-java)
- (defcustom java-object-file-ext "class"
- "Extension of objects file (result of compilation)
- in java mode."
- :type 'string
- :group 'compile-java)
- ;; @@ c++-mode compile variables ;;;
- (defgroup compile-c++ nil
- "C++ compilation options"
- :group 'compilation-lang)
- (defcustom c++-compilers-list '( "g++" "gcc" "CC" )
- "List of user's favourites C++ compilers in order of preferencies."
- :type '(repeat (string :tag "C++ Compiler name"))
- :group 'compile-c++)
- (defcustom c++-companion-file-regexp "\\(_[Pp]\\)?\\.\\([pP]?[Hh][Hh]?\\|[Hh]\\+\\+?\\)"
- "Regexp to find associated compileable C++ companion file
- from a header file."
- :type 'regexp
- :group 'compile-c++)
- (defcustom c++-default-compiler "CC"
- "*Default C++ compiler to use when everything else fails..
- This could be any form evaluating to a string, so you could map it to
- a function asking you interactively to choose the compiler.
- example:
- (defun my-choose-compiler()
- (read-string \"C++ compiler: \"))
- (setq c++-default-compiler 'my-choose-compiler)"
- :type '(choice string function)
- :group 'compile-c++)
- (defcustom c++-compiler-varenv "CXX"
- "Varenv indicating the C++ compiler to use."
- :type 'string
- :group 'compile-c++)
- (defcustom c++-cflags-varenv "CXXFLAGS"
- "Varenv indicating the C++ compiler flags to use."
- :type 'string
- :group 'compile-c++)
- (defcustom c++-source-ext-list '( "cc" "C" "CC" "cpp" "cxx" "c++" "c+" )
- "Extensions for C++ compileable source files."
- :type '(repeat string)
- :group 'compile-c++)
- (defcustom c++-headers-ext-list '( "H" "hh" "HH" "h++" "h+" "h" "hpp" "hxx" )
- "Extensions for C++ headers source files."
- :type '(repeat string)
- :group 'compile-c++)
- (defcustom c++-default-compiler-options "-g"
- "*Default options to give to the C++ compiler.
- This could be any form evaluating to a string. See
- `mode-compile-choosen-compiler' variable."
- :type '(choice
- string
- (sexp :tag "Form evaluating to a string"))
- :group 'compile-c++)
- (defcustom c++-source-file-ext-regexp "\\.\\(cc\\|CC?\\|c\\+\\+?\\|cpp\\|cxx\\)"
- "Regexp to find, from it's name, if a C++ file is compileable."
- :type 'regexp
- :group 'compile-c++)
- (defcustom c++-build-output-args t
- "Build output-args for c++-mode."
- :type 'boolean
- :group 'compile-c++)
- (defcustom c++-object-file-ext "o"
- "Extension of objects file (result of compilation)
- in c++ mode."
- :type 'string
- :group 'compile-c++)
- ;; @@ ada-mode compile variables ;;;
- (defgroup compile-ada nil
- "Ada compilation options"
- :group 'compilation-lang)
- (defcustom ada-compilers-list
- '( "gcc" "gnat" "ada" )
- "List of user's favourites Ada compilers in order of preferencies."
- :type '(repeat (string :tag "Ada Compiler name"))
- :group 'compile-ada)
- (defcustom ada-companion-file-regexp ""
- "Regexp to find associated compileable Ada companion file from a spec file.
- This is useless in Ada because there do not exists uncompileable files."
- :type 'regexp
- :group 'compile-ada)
- (defcustom ada-default-compiler "ada"
- "*Default Ada compiler to use when everything else fails.
- This could be any form evaluating to a string, so you could map it to
- a function asking you interactively to choose the compiler.
- example:
- (defun my-choose-compiler()
- (read-string \"Ada compiler: \"))
- (setq ada-default-compiler 'my-choose-compiler)"
- :type '(choice string function)
- :group 'compile-ada)
- (defcustom ada-compiler-varenv "ADA"
- "Varenv indicating the Ada compiler to use."
- :type 'string
- :group 'compile-ada)
- (defcustom ada-aflags-varenv "AFLAGS"
- "Varenv indicating the Ada compiler flags to use."
- :type 'string
- :group 'compile-ada)
- (defcustom ada-source-ext-list '( "ads" "adb" "ada" "a" )
- "Extensions for Ada compileable source files."
- :type '(repeat string)
- :group 'compile-ada)
- (defcustom ada-headers-ext-list '( "ads" "ada" "a" )
- "Extensions for Ada spec source files."
- :type '(repeat string)
- :group 'compile-ada)
- (defcustom ada-default-compiler-options "-g"
- "*Default options to give to the Ada compiler.
- This could be any form evaluating to a string. See
- `mode-compile-choosen-compiler' variable."
- :type '(choice
- string
- (sexp :tag "Form evaluating to a string"))
- :group 'compile-ada)
- (defcustom ada-source-file-ext-regexp "\\.\\(ad[abs]\\|a\\)"
- "Regexp to find, from it's name, if an Ada file is compileable.
- This is useless in Ada because there do not exists uncompileable files."
- :type 'regexp
- :group 'compile-ada)
- (defcustom ada-build-output-args t
- "Build output-args for ada-mode."
- :type 'boolean
- :group 'compile-ada)
- (defcustom ada-object-file-ext "o"
- "Extension of objects file (result of compilation)
- in ada mode."
- :type 'string
- :group 'compile-ada)
- ;; @@ fortran-mode compile variables ;;;
- (defgroup compile-fortran nil
- "Fortran compilation options"
- :group 'compilation-lang)
- (defcustom f77-compilers-list '( "f77" "fc" )
- "List of user's favourite Fortran compilers in order of preferencies."
- :type '(repeat (string :tag "C Compiler name"))
- :group 'compile-fortran)
- (defcustom f77-companion-file-regexp "\\(_[Pp]\\)?\\.[pP]?inc"
- "Regexp to find associated .f file from a .inc."
- :type 'regexp
- :group 'compile-fortran)
- (defcustom f77-default-compiler "f77"
- "*Default fortran compiler to use when everything else fails..
- This could be any form evaluating to a string, so you could map it to
- a function asking you interactively to choose the compiler.
- example:
- (defun my-choose-compiler()
- (read-string \"Fortran compiler: \"))
- (setq f77-default-compiler 'my-choose-compiler)"
- :type '(choice string function)
- :group 'compile-fortran)
- (defcustom f77-compiler-varenv "F77"
- "Varenv indicating the fortran compiler to use."
- :type 'string
- :group 'compile-fortran)
- (defcustom f77-cflags-varenv "FCOPTS"
- "Varenv indicating the fortran compiler flags to use."
- :type 'string
- :group 'compile-fortran)
- (defcustom f77-source-ext-list '( "f" "F" "for" "For" )
- "Extensions for fortran compileable source files."
- :type '(repeat string)
- :group 'compile-fortran)
- (defcustom f77-headers-ext-list '( "inc" "h")
- "Extensions for fortran include files."
- :type '(repeat string)
- :group 'compile-fortran)
- (defcustom f77-default-compiler-options "-w66 -a"
- "*Default options to give to the fortran compiler.
- This could be any form evaluating to a string. See
- `mode-compile-choosen-compiler' variable."
- :type '(choice
- string
- (sexp :tag "Form evaluating to a string"))
- :group 'compile-fortran)
- (defcustom f77-source-file-ext-regexp "\\.\\([Ff]\\|for\\)"
- "Regexp to find, from it's name, if a fortran file is compileable."
- :type 'regexp
- :group 'compile-fortran)
- (defcustom f77-build-output-args t
- "Build output-args for f77-mode."
- :type 'boolean
- :group 'compile-fortran)
- (defcustom f77-object-file-ext "o"
- "Extension of objects file (result of compilation)
- in Fortran mode."
- :type 'string
- :group 'compile-fortran)
- ;; @@ sh-mode compile variables ;;;
- (defgroup compile-sh nil
- "Sh (Bourne Shell scripts) compilation options"
- :group 'compilation-script)
- (defcustom sh-command "sh"
- "Command to run sh scripts"
- :type 'string
- :group 'compile-sh)
- (defcustom sh-dbg-flags "-fvx"
- "*Flags to give to sh for debugging a Bourne Shell script.
- The -f flag must always be present."
- :type 'string
- :group 'compile-sh)
- (defvar sh-compilation-error-regexp-alist nil
- ;; I'd never seen a Bourne shell returning file+line where a syntax
- ;; error occured.
- "Alist that specifies how to match errors in sh output.
- See variable compilation-error-regexp-alist for more details.")
- ;; @@ csh-mode compile variables ;;;
- (defgroup compile-csh nil
- "Csh (C Shell) compilation options"
- :group 'compilation-script)
- (defcustom csh-command "csh"
- "Command to run csh scripts"
- :type 'string
- :group 'compile-csh)
- (defcustom csh-dbg-flags "-fVX"
- "*Flags to give to csh for debugging a C Shell script.
- The -f flag must always be present."
- :type 'string
- :group 'compile-csh)
- (defvar csh-compilation-error-regexp-alist nil
- ;; I'd never seen a C shell returning file+line where a syntax
- ;; error occured.
- "Alist that specifies how to match errors in csh output.
- See variable compilation-error-regexp-alist for more details.")
- ;; @@ zsh-mode compile variables ;;;
- (defgroup compile-zsh nil
- "Zsh (Z Shell scripts) compilation options"
- :group 'compilation-script)
- (defcustom zsh-command "zsh"
- "Command to run zsh scripts"
- :type 'string
- :group 'compile-zsh)
- (defcustom zsh-dbg-flags "-nCvx"
- "*Flags to give to zsh for debugging a Z Shell script."
- :type 'string
- :group 'compile-zsh)
- (defvar zsh-compilation-error-regexp-alist nil
- ;; I'd never seen a Z shell returning file+line where a syntax
- ;; error occured.
- "Alist that specifies how to match errors in csh output.
- See variable compilation-error-regexp-alist for more details.")
- ;; @@ tcl-mode compile variables - JWH ;;;
- (defgroup compile-tcl nil
- "Tcl compilation options"
- :group 'compilation-script)
- (defcustom tcl-command "wish"
- "Command to run tcl scripts"
- :type 'string
- :group 'compile-tcl)
- (defcustom tcl-dbg-flags ""
- "*Flags to give to tcl -- none."
- :type 'string
- :group 'compile-tcl)
- (defvar tcl-compilation-error-regexp-alist
- ;; TK (file "/directory-path/filename.tcl" line XY)
- '(
- ("file \"\\([^ ]+\\)\" line \\([0-9]+\\)[)]" 1 2)
- )
- "Alist that specifies how to match errors in tcl output.
- See variable compilation-error-regexp-alist for more details.")
- ;; @@ python-mode compile variables - BM ;;;
- (defgroup compile-python nil
- "Python compilation options"
- :group 'compilation-script)
- (defcustom python-command "python"
- "Command to run python scripts"
- :type 'string
- :group 'compile-python)
- (defcustom python-dbg-flags ""
- "*Flags to give to python -- none."
- :type 'string
- :group 'compile-python)
- (defvar python-compilation-error-regexp-alist
- ;; TK (file "/directory-path/filename.tcl" line XY in ZZZ)
- '(
- ("File \"\\([^ ]+\\)\", line \\([0-9]+\\).*" 1 2)
- )
- "Alist that specifies how to match errors in python output.
- See variable compilation-error-regexp-alist for more details.")
- ;; @@ perl-mode compile variables ;;;
- (defgroup compile-perl nil
- "Perl compilation options"
- :group 'compilation-script)
- (defcustom perl-command "perl"
- "Command to run perl."
- :type 'string
- :group 'compile-perl)
- (defcustom perl-dbg-flags "-w"
- "*Flags to give to perl for debugging a Perl script."
- :type 'string
- :group 'compile-perl)
- (defvar perl-compilation-error-regexp-alist
- ;; Contributed by Martin Jost
- '(
- ;; PERL 4
- ("in file \\([^ ]+\\) at line \\([0-9]+\\).*" 1 2)
- ;; PERL 5 Blubber at FILE line XY, <XY> line ab.
- ("at \\([^ ]+\\) line \\([0-9]+\\)," 1 2)
- ;; PERL 5 Blubber at FILE line XY.
- ("at \\([^ ]+\\) line \\([0-9]+\\)." 1 2)
- )
- ;; This look like a paranoiac regexp: could anybody find a better one? (which WORK).
- ;;'(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\\.,]" 2 3))
- "Alist that specifies how to match errors in perl output.
- See variable compilation-error-regexp-alist for more details.")
- ;; @@ ruby-mode compile variables ;;;
- (defgroup compile-ruby nil
- "Ruby compilation options"
- :group 'compilation-script)
- (defcustom ruby-command "ruby"
- "Command to run ruby"
- :type 'string
- :group 'compile-ruby)
- (defcustom ruby-dbg-flags "-w"
- "Flags to give ruby for catching warnings"
- :type 'string
- :group 'compile-ruby)
- (defvar ruby-compilation-error-regexp-alist
- '(
- ;; Unit Tests
- ("test[a-zA-Z0-9_]*([A-Z][a-zA-Z0-9_]*) \\[\\(.*\\):\\([0-9]+\\)\\]:" 1 2)
- ;; Errors and Warnings
- ("\\(.*?\\)\\([0-9A-Za-z_./\:-]+\\.rb\\):\\([0-9]+\\)" 2 3))
- "Alist that specifies how to match errors in ruby output.
- See variable compilation-error-regexp-alist for more details.")
- ;; @@ emacs lisp compile variables ;;;
- ;;;###autoload
- (defcustom emacs-lisp-byte-compile-dir-interactive-p t
- "*Non-nil means when byte-compiling a directory ask for each file
- needing to be recompiled or not."
- :type 'boolean
- :group 'compilation-elisp)
- (define-obsolete-variable-alias
- 'mode-compile-byte-compile-dir-interactive-p
- 'emacs-lisp-byte-compile-dir-interactive-p)
- (defcustom emacs-lisp-sources-regexp
- (cond
- ((boundp 'emacs-lisp-file-regexp)
- emacs-lisp-file-regexp)
- (t
- "\\.el$"))
- "Regexp to find emacs lisp sources files."
- :type 'regexp
- :group 'compilation-elisp)
- (defcustom emacs-lisp-bytecomp-ext "c"
- "Extension added to byte-compiled emacs sources files."
- :type 'string
- :group 'compilation-elisp)
- ;; @@ Misc declarations ;;;
- ;;;###autoload
- (defconst mode-compile-version "2.28"
- "Current version of mode-compile package.
- mode-compile.el,v 2.28 2003/04/01 13:52:47 boubaker Exp
- Please send bugs-fixes/contributions/comments to boubaker@cena.fr")
- (defconst mode-compile-help-address "heddy.Boubaker@cena.fr"
- "E-Mail address of mode-compile maintainer.")
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; @ No user modifiable stuff below this line ;;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; Save old compile function. In case someone will bound
- ;; mode-compile on 'compile.
- (or (fboundp 'mc--compile-sav)
- (if (fboundp 'compile)
- (progn
- (fset 'mc--compile-sav (symbol-function 'compile))
- (put 'compile 'compile-saved-on-mc--compile-sav t))
- (error "`compile' function not known to be defined...")))
- ;; @@ Internals variables and constants ;;;
- ;; Mode specific
- (defvar mc--comp-lst nil) ; c-mode,c++-mode,ada-mode,fortran-mode
- (defvar mc--def-comp nil) ; itou
- (defvar mc--compfile-regexp nil) ; itou
- (defvar mc--comp-varenv nil) ; itou
- (defvar mc--comp-options nil) ; itou
- (defvar mc--cflags-varenv nil) ; itou
- (defvar mc--source-ext-lst nil) ; itou
- (defvar mc--head-ext-lst nil) ; itou
- (defvar mc--source-ext-regexp nil) ; itou
- (defvar mc--build-op-args nil) ; itou
- (defvar mc--outfile-ext nil) ; itou
- ;; remote stuff
- (defvar mc--efs-path-list nil)
- (defvar mc--remote-host nil)
- (defvar mc--remote-host-history nil)
- (defvar mc--remote-username nil)
- (defvar mc--remote-command nil)
- (defvar mc--remote-pathname nil)
- ;; Frames/Windows stuff
- (defvar mc--other-frame nil)
- (defvar mc--ws (or
- (and (fboundp 'console-type) (console-type))
- (and (fboundp 'device-type) (device-type))
- window-system))
- (defvar mc--compile-command nil)
- ;; Compile command used when no makefile has been found.
- ;; This variable is buffer local to keep history for read-string.
- ;; Unfortunately not a real history, keep only memory of
- ;; the last compile command used.
- (make-variable-buffer-local 'mc--compile-command)
- (d…
Large files files are truncated, but you can click here to view the full file