diff options
| author | Richard M. Stallman | 1995-08-23 23:51:38 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-08-23 23:51:38 +0000 |
| commit | bd0e4eb1cce72dab45a765f82b844b7acde91d16 (patch) | |
| tree | bb80c82f1110eb6fbb4c2c7f85d417574ff49307 | |
| parent | 33b78bd601f2c2676c578f3c5d3baa9aba1bab53 (diff) | |
| download | emacs-bd0e4eb1cce72dab45a765f82b844b7acde91d16.tar.gz emacs-bd0e4eb1cce72dab45a765f82b844b7acde91d16.zip | |
Doc fixes.
(makefile-font-lock-keywords): Highlight lines of just whitespace.
| -rw-r--r-- | lisp/progmodes/make-mode.el | 56 |
1 files changed, 27 insertions, 29 deletions
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index f28cbf95a27..c31bffcba4c 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el | |||
| @@ -12,10 +12,6 @@ | |||
| 12 | ;; Also, the doc strings need fixing: the first line doesn't stand alone, | 12 | ;; Also, the doc strings need fixing: the first line doesn't stand alone, |
| 13 | ;; and other usage is not high quality. Symbol names don't have `...'. | 13 | ;; and other usage is not high quality. Symbol names don't have `...'. |
| 14 | 14 | ||
| 15 | ;; So, for the meantime, this is not the default mode for makefiles. | ||
| 16 | |||
| 17 | ;; $Id: makefile.el,v 1.23 1995/06/24 07:34:27 rms Exp rms $ | ||
| 18 | |||
| 19 | ;; This file is part of GNU Emacs. | 15 | ;; This file is part of GNU Emacs. |
| 20 | 16 | ||
| 21 | ;; GNU Emacs is free software; you can redistribute it and/or modify | 17 | ;; GNU Emacs is free software; you can redistribute it and/or modify |
| @@ -220,8 +216,12 @@ not be enclosed in { } or ( ).") | |||
| 220 | ;; Do dependencies. These get the function name face. | 216 | ;; Do dependencies. These get the function name face. |
| 221 | (list makefile-dependency-regex 1 'font-lock-function-name-face) | 217 | (list makefile-dependency-regex 1 'font-lock-function-name-face) |
| 222 | 218 | ||
| 223 | ;; Highlight leading spaces, since they are hard to see and | 219 | ;; Highlight lines that contain just whitespace. |
| 224 | ;; can make a makefile fail to function. | 220 | ;; They can cause trouble, especially if they start with a tab. |
| 221 | '("^[ \t]+$" . makefile-space-face) | ||
| 222 | |||
| 223 | ;; Highlight leading spaces, since they are hard to see before a tab | ||
| 224 | ;; and can make a makefile fail to function. | ||
| 225 | ;; Don't highlight leading tabs, because they are normal | 225 | ;; Don't highlight leading tabs, because they are normal |
| 226 | ;; and people assume that 8 cols of whitespace means a tab. | 226 | ;; and people assume that 8 cols of whitespace means a tab. |
| 227 | '("^ " . makefile-space-face))) | 227 | '("^ " . makefile-space-face))) |
| @@ -247,12 +247,11 @@ not be enclosed in { } or ( ).") | |||
| 247 | ;;; ------------------------------------------------------------ | 247 | ;;; ------------------------------------------------------------ |
| 248 | 248 | ||
| 249 | (defvar makefile-brave-make "make" | 249 | (defvar makefile-brave-make "make" |
| 250 | "A make that can handle the \'-q\' option.") | 250 | "A make that can handle the `-q' option.") |
| 251 | 251 | ||
| 252 | (defvar makefile-query-one-target-method 'makefile-query-by-make-minus-q | 252 | (defvar makefile-query-one-target-method 'makefile-query-by-make-minus-q |
| 253 | "A function symbol [one that can be used as the first argument to | 253 | "Function to call to determine whether a make target is up to date. |
| 254 | funcall] that provides a function that must conform to the following | 254 | The function must satisfy this calling convention: |
| 255 | interface: | ||
| 256 | 255 | ||
| 257 | * As its first argument, it must accept the name of the target to | 256 | * As its first argument, it must accept the name of the target to |
| 258 | be checked, as a string. | 257 | be checked, as a string. |
| @@ -271,7 +270,8 @@ interface: | |||
| 271 | ;;; --- end of up-to-date-overview configuration ------------------ | 270 | ;;; --- end of up-to-date-overview configuration ------------------ |
| 272 | 271 | ||
| 273 | (defvar makefile-mode-map nil | 272 | (defvar makefile-mode-map nil |
| 274 | "The keymap that is used in makefile-mode.") | 273 | "The keymap that is used in Makefile mode.") |
| 274 | |||
| 275 | (if makefile-mode-map | 275 | (if makefile-mode-map |
| 276 | () | 276 | () |
| 277 | (setq makefile-mode-map (make-sparse-keymap)) | 277 | (setq makefile-mode-map (make-sparse-keymap)) |
| @@ -356,7 +356,7 @@ interface: | |||
| 356 | "Table of all macro names known for this buffer.") | 356 | "Table of all macro names known for this buffer.") |
| 357 | 357 | ||
| 358 | (defvar makefile-browser-client | 358 | (defvar makefile-browser-client |
| 359 | "A buffer in makefile-mode that is currently using the browser.") | 359 | "A buffer in Makefile mode that is currently using the browser.") |
| 360 | 360 | ||
| 361 | (defvar makefile-browser-selection-vector nil) | 361 | (defvar makefile-browser-selection-vector nil) |
| 362 | (defvar makefile-has-prereqs nil) | 362 | (defvar makefile-has-prereqs nil) |
| @@ -401,8 +401,7 @@ interface: | |||
| 401 | ;;;###autoload | 401 | ;;;###autoload |
| 402 | (defun makefile-mode () | 402 | (defun makefile-mode () |
| 403 | "Major mode for editing Makefiles. | 403 | "Major mode for editing Makefiles. |
| 404 | Calling this function invokes the function(s) \"makefile-mode-hook\" before | 404 | This function ends by invoking the function(s) `makefile-mode-hook'. |
| 405 | doing anything else. | ||
| 406 | 405 | ||
| 407 | \\{makefile-mode-map} | 406 | \\{makefile-mode-map} |
| 408 | 407 | ||
| @@ -410,20 +409,19 @@ In the browser, use the following keys: | |||
| 410 | 409 | ||
| 411 | \\{makefile-browser-map} | 410 | \\{makefile-browser-map} |
| 412 | 411 | ||
| 413 | makefile-mode can be configured by modifying the following | 412 | Makefile mode can be configured by modifying the following variables: |
| 414 | variables: | ||
| 415 | 413 | ||
| 416 | makefile-browser-buffer-name: | 414 | makefile-browser-buffer-name: |
| 417 | Name of the macro- and target browser buffer. | 415 | Name of the macro- and target browser buffer. |
| 418 | 416 | ||
| 419 | makefile-target-colon: | 417 | makefile-target-colon: |
| 420 | The string that gets appended to all target names | 418 | The string that gets appended to all target names |
| 421 | inserted by makefile-insert-target. | 419 | inserted by `makefile-insert-target'. |
| 422 | \":\" or \"::\" are quite common values. | 420 | \":\" or \"::\" are quite common values. |
| 423 | 421 | ||
| 424 | makefile-macro-assign: | 422 | makefile-macro-assign: |
| 425 | The string that gets appended to all macro names | 423 | The string that gets appended to all macro names |
| 426 | inserted by makefile-insert-macro. | 424 | inserted by `makefile-insert-macro'. |
| 427 | The normal value should be \" = \", since this is what | 425 | The normal value should be \" = \", since this is what |
| 428 | standard make expects. However, newer makes such as dmake | 426 | standard make expects. However, newer makes such as dmake |
| 429 | allow a larger variety of different macro assignments, so you | 427 | allow a larger variety of different macro assignments, so you |
| @@ -453,8 +451,8 @@ makefile-browser-auto-advance-after-selection-p: | |||
| 453 | 451 | ||
| 454 | makefile-pickup-everything-picks-up-filenames-p: | 452 | makefile-pickup-everything-picks-up-filenames-p: |
| 455 | If this variable is set to a non-nil value then | 453 | If this variable is set to a non-nil value then |
| 456 | makefile-pickup-everything also picks up filenames as targets | 454 | `makefile-pickup-everything' also picks up filenames as targets |
| 457 | (i.e. it calls makefile-find-filenames-as-targets), otherwise | 455 | (i.e. it calls `makefile-find-filenames-as-targets'), otherwise |
| 458 | filenames are omitted. | 456 | filenames are omitted. |
| 459 | 457 | ||
| 460 | makefile-cleanup-continuations-p: | 458 | makefile-cleanup-continuations-p: |
| @@ -464,7 +462,7 @@ makefile-cleanup-continuations-p: | |||
| 464 | This is done by silently removing the trailing whitespace, leaving | 462 | This is done by silently removing the trailing whitespace, leaving |
| 465 | the backslash itself intact. | 463 | the backslash itself intact. |
| 466 | IMPORTANT: Please note that enabling this option causes makefile-mode | 464 | IMPORTANT: Please note that enabling this option causes makefile-mode |
| 467 | to MODIFY A FILE WITHOUT YOUR CONFIRMATION when \'it seems necessary\'. | 465 | to MODIFY A FILE WITHOUT YOUR CONFIRMATION when \"it seems necessary\". |
| 468 | 466 | ||
| 469 | makefile-browser-hook: | 467 | makefile-browser-hook: |
| 470 | A function or list of functions to be called just before the | 468 | A function or list of functions to be called just before the |
| @@ -472,8 +470,8 @@ makefile-browser-hook: | |||
| 472 | 470 | ||
| 473 | makefile-special-targets-list: | 471 | makefile-special-targets-list: |
| 474 | List of special targets. You will be offered to complete | 472 | List of special targets. You will be offered to complete |
| 475 | on one of those in the minibuffer whenever you enter a \".\" | 473 | on one of those in the minibuffer whenever you enter a `.'. |
| 476 | at the beginning of a line in makefile-mode." | 474 | at the beginning of a line in Makefile mode." |
| 477 | 475 | ||
| 478 | (interactive) | 476 | (interactive) |
| 479 | (kill-all-local-variables) | 477 | (kill-all-local-variables) |
| @@ -528,7 +526,7 @@ makefile-special-targets-list: | |||
| 528 | ;;; Motion code. | 526 | ;;; Motion code. |
| 529 | 527 | ||
| 530 | (defun makefile-next-dependency () | 528 | (defun makefile-next-dependency () |
| 531 | "Move (point) to the beginning of the next dependency line below (point)." | 529 | "Move point to the beginning of the next dependency line." |
| 532 | (interactive) | 530 | (interactive) |
| 533 | (let ((here (point))) | 531 | (let ((here (point))) |
| 534 | (end-of-line) | 532 | (end-of-line) |
| @@ -537,7 +535,7 @@ makefile-special-targets-list: | |||
| 537 | (goto-char here) nil))) | 535 | (goto-char here) nil))) |
| 538 | 536 | ||
| 539 | (defun makefile-previous-dependency () | 537 | (defun makefile-previous-dependency () |
| 540 | "Move (point) to the beginning of the next dependency line above (point)." | 538 | "Move point to the beginning of the previous dependency line." |
| 541 | (interactive) | 539 | (interactive) |
| 542 | (let ((here (point))) | 540 | (let ((here (point))) |
| 543 | (beginning-of-line) | 541 | (beginning-of-line) |
| @@ -593,7 +591,7 @@ Anywhere else just self-inserts." | |||
| 593 | (makefile-remember-macro macro-name)))) | 591 | (makefile-remember-macro macro-name)))) |
| 594 | 592 | ||
| 595 | (defun makefile-insert-macro-ref (macro-name) | 593 | (defun makefile-insert-macro-ref (macro-name) |
| 596 | "Complete on a list of known macros, then insert complete ref at (point)." | 594 | "Complete on a list of known macros, then insert complete ref at point." |
| 597 | (interactive | 595 | (interactive |
| 598 | (list | 596 | (list |
| 599 | (progn | 597 | (progn |
| @@ -614,7 +612,7 @@ Anywhere else just self-inserts." | |||
| 614 | (makefile-remember-target target-name)))) | 612 | (makefile-remember-target target-name)))) |
| 615 | 613 | ||
| 616 | (defun makefile-insert-target-ref (target-name) | 614 | (defun makefile-insert-target-ref (target-name) |
| 617 | "Complete on a list of known targets, then insert target-ref at (point) ." | 615 | "Complete on a list of known targets, then insert target-ref at point." |
| 618 | (interactive | 616 | (interactive |
| 619 | (list | 617 | (list |
| 620 | (progn | 618 | (progn |
| @@ -1002,7 +1000,7 @@ large dependencies from the browser to the client buffer. | |||
| 1002 | 1000 | ||
| 1003 | (defun makefile-browser-insert-selection () | 1001 | (defun makefile-browser-insert-selection () |
| 1004 | "Insert all selected targets and/or macros in the makefile buffer. | 1002 | "Insert all selected targets and/or macros in the makefile buffer. |
| 1005 | Insertion takes place at (point)." | 1003 | Insertion takes place at point." |
| 1006 | (interactive) | 1004 | (interactive) |
| 1007 | (save-excursion | 1005 | (save-excursion |
| 1008 | (goto-line 1) | 1006 | (goto-line 1) |
| @@ -1130,7 +1128,7 @@ with the generated name!" | |||
| 1130 | my-uid)))) | 1128 | my-uid)))) |
| 1131 | 1129 | ||
| 1132 | (defun makefile-query-targets (filename target-table prereq-list) | 1130 | (defun makefile-query-targets (filename target-table prereq-list) |
| 1133 | "Fill the up-to-date-overview-buffer. | 1131 | "Fill the up-to-date overview buffer. |
| 1134 | Checks each target in TARGET-TABLE using `makefile-query-one-target-method' | 1132 | Checks each target in TARGET-TABLE using `makefile-query-one-target-method' |
| 1135 | and generates the overview, one line per target name." | 1133 | and generates the overview, one line per target name." |
| 1136 | (insert | 1134 | (insert |