From 9ffb4859b8ee9b891d04e4d9f620d8d985d354c1 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 4 Apr 2000 21:03:15 +0000 Subject: [PATCH] Some doc fixes. (makefile-mode-abbrev-table): New variable. (makefile-mode): Set local abbrev table to makefile-mode-abbrev-table. (makefile-font-lock-keywords): Fontify includes and conditionals. (toplevel): Require `dabbrev' and `add-log' when compiling. --- lisp/progmodes/make-mode.el | 75 ++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 27 deletions(-) diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index b2d50413fb4..2c016ec5444 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -1,6 +1,6 @@ ;;; make-mode.el --- makefile editing commands for Emacs -;; Copyright (C) 1992, 1994 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1994, 1999, 2000 Free Software Foundation, Inc. ;; Author: Thomas Neumann ;; Eric S. Raymond @@ -92,7 +92,9 @@ ;; Sadly we need this for a macro. (eval-when-compile - (require 'imenu)) + (require 'imenu) + (require 'dabbrev) + (require 'add-log)) ;;; ------------------------------------------------------------ ;;; Configurable stuff @@ -111,18 +113,18 @@ :group 'makemode) (defcustom makefile-browser-buffer-name "*Macros and Targets*" - "Name of the macro- and target browser buffer." + "*Name of the macro- and target browser buffer." :type 'string :group 'makefile) (defcustom makefile-target-colon ":" - "String to append to all target names inserted by `makefile-insert-target'. + "*String to append to all target names inserted by `makefile-insert-target'. \":\" or \"::\" are common values." :type 'string :group 'makefile) (defcustom makefile-macro-assign " = " - "String to append to all macro names inserted by `makefile-insert-macro'. + "*String to append to all macro names inserted by `makefile-insert-macro'. The normal value should be \" = \", since this is what standard make expects. However, newer makes such as dmake allow a larger variety of different macro assignments, so you @@ -131,32 +133,32 @@ might prefer to use \" += \" or \" := \" ." :group 'makefile) (defcustom makefile-electric-keys nil - "If non-nil, Makefile mode should install electric keybindings. + "*If non-nil, Makefile mode should install electric keybindings. Default is nil." :type 'boolean :group 'makefile) (defcustom makefile-use-curly-braces-for-macros-p nil - "Controls the style of generated macro references. + "*Controls the style of generated macro references. Non-nil means macro references should use curly braces, like `${this}'. nil means use parentheses, like `$(this)'." :type 'boolean :group 'makefile) (defcustom makefile-tab-after-target-colon t - "If non-nil, insert a TAB after a target colon. + "*If non-nil, insert a TAB after a target colon. Otherwise, a space is inserted. The default is t." :type 'boolean :group 'makefile) (defcustom makefile-browser-leftmost-column 10 - "Number of blanks to the left of the browser selection mark." + "*Number of blanks to the left of the browser selection mark." :type 'integer :group 'makefile) (defcustom makefile-browser-cursor-column 10 - "Column the cursor goes to when it moves up or down in the Makefile browser." + "*Column the cursor goes to when it moves up or down in the Makefile browser." :type 'integer :group 'makefile) @@ -166,34 +168,34 @@ The default is t." :group 'makefile) (defcustom makefile-backslash-align t - "If non-nil, `makefile-backslash-region' will align backslashes." + "*If non-nil, `makefile-backslash-region' will align backslashes." :type 'boolean :group 'makefile) (defcustom makefile-browser-selected-mark "+ " - "String used to mark selected entries in the Makefile browser." + "*String used to mark selected entries in the Makefile browser." :type 'string :group 'makefile) (defcustom makefile-browser-unselected-mark " " - "String used to mark unselected entries in the Makefile browser." + "*String used to mark unselected entries in the Makefile browser." :type 'string :group 'makefile) (defcustom makefile-browser-auto-advance-after-selection-p t - "If non-nil, cursor will move after item is selected in Makefile browser." + "*If non-nil, cursor will move after item is selected in Makefile browser." :type 'boolean :group 'makefile) (defcustom makefile-pickup-everything-picks-up-filenames-p nil - "If non-nil, `makefile-pickup-everything' picks up filenames as targets. + "*If non-nil, `makefile-pickup-everything' picks up filenames as targets. This means it calls `makefile-pickup-filenames-as-targets'. Otherwise filenames are omitted." :type 'boolean :group 'makefile) (defcustom makefile-cleanup-continuations-p t - "If non-nil, automatically clean up continuation lines when saving. + "*If non-nil, automatically clean up continuation lines when saving. A line is cleaned up by removing all whitespace following a trailing backslash. This is done silently. IMPORTANT: Please note that enabling this option causes Makefile mode @@ -202,7 +204,7 @@ to MODIFY A FILE WITHOUT YOUR CONFIRMATION when \"it seems necessary\"." :group 'makefile) (defcustom makefile-mode-hook nil - "Normal hook run by `makefile-mode'." + "*Normal hook run by `makefile-mode'." :type 'hook :group 'makefile) @@ -220,15 +222,15 @@ to MODIFY A FILE WITHOUT YOUR CONFIRMATION when \"it seems necessary\"." ("SCCS_GET") ("SILENT") ("SOURCE") ("SUFFIXES") ("WAIT") ("c.o") ("C.o") ("m.o") ("el.elc") ("y.c") ("s.o")) - "List of special targets. + "*List of special targets. You will be offered to complete on one of those in the minibuffer whenever -you enter a \".\" at the beginning of a line in makefile-mode." +you enter a \".\" at the beginning of a line in `makefile-mode'." :type '(repeat (list string)) :group 'makefile) (defcustom makefile-runtime-macros-list '(("@") ("&") (">") ("<") ("*") ("^") ("+") ("?") ("%") ("$")) - "List of macros that are resolved by make at runtime. + "*List of macros that are resolved by make at runtime. If you insert a macro reference using `makefile-insert-macro-ref', the name of the macro is checked against this list. If it can be found its name will not be enclosed in { } or ( )." @@ -260,19 +262,29 @@ not be enclosed in { } or ( )." (defconst makefile-font-lock-keywords (list + ;; Do macro assignments. These get the "variable-name" face rather ;; arbitrarily. (list makefile-macroassign-regex 1 'font-lock-variable-name-face) - ;; + ;; Do dependencies. These get the function name face. (list makefile-dependency-regex 1 'font-lock-function-name-face) - ;; + ;; Variable references even in targets/strings/comments: '("\\$[({]\\([-a-zA-Z0-9_.]+\\)[}):]" 1 font-lock-constant-face prepend) - ;; + ;; Automatic variable references. '("\\$\\([@%