503 |
|
|
504 |
Makefile mode can be configured by modifying the following variables: |
Makefile mode can be configured by modifying the following variables: |
505 |
|
|
506 |
makefile-browser-buffer-name: |
`makefile-browser-buffer-name': |
507 |
Name of the macro- and target browser buffer. |
Name of the macro- and target browser buffer. |
508 |
|
|
509 |
makefile-target-colon: |
`makefile-target-colon': |
510 |
The string that gets appended to all target names |
The string that gets appended to all target names |
511 |
inserted by `makefile-insert-target'. |
inserted by `makefile-insert-target'. |
512 |
\":\" or \"::\" are quite common values. |
\":\" or \"::\" are quite common values. |
513 |
|
|
514 |
makefile-macro-assign: |
`makefile-macro-assign': |
515 |
The string that gets appended to all macro names |
The string that gets appended to all macro names |
516 |
inserted by `makefile-insert-macro'. |
inserted by `makefile-insert-macro'. |
517 |
The normal value should be \" = \", since this is what |
The normal value should be \" = \", since this is what |
519 |
allow a larger variety of different macro assignments, so you |
allow a larger variety of different macro assignments, so you |
520 |
might prefer to use \" += \" or \" := \" . |
might prefer to use \" += \" or \" := \" . |
521 |
|
|
522 |
makefile-tab-after-target-colon: |
`makefile-tab-after-target-colon': |
523 |
If you want a TAB (instead of a space) to be appended after the |
If you want a TAB (instead of a space) to be appended after the |
524 |
target colon, then set this to a non-nil value. |
target colon, then set this to a non-nil value. |
525 |
|
|
526 |
makefile-browser-leftmost-column: |
`makefile-browser-leftmost-column': |
527 |
Number of blanks to the left of the browser selection mark. |
Number of blanks to the left of the browser selection mark. |
528 |
|
|
529 |
makefile-browser-cursor-column: |
`makefile-browser-cursor-column': |
530 |
Column in which the cursor is positioned when it moves |
Column in which the cursor is positioned when it moves |
531 |
up or down in the browser. |
up or down in the browser. |
532 |
|
|
533 |
makefile-browser-selected-mark: |
`makefile-browser-selected-mark': |
534 |
String used to mark selected entries in the browser. |
String used to mark selected entries in the browser. |
535 |
|
|
536 |
makefile-browser-unselected-mark: |
`makefile-browser-unselected-mark': |
537 |
String used to mark unselected entries in the browser. |
String used to mark unselected entries in the browser. |
538 |
|
|
539 |
makefile-browser-auto-advance-after-selection-p: |
`makefile-browser-auto-advance-after-selection-p': |
540 |
If this variable is set to a non-nil value the cursor |
If this variable is set to a non-nil value the cursor |
541 |
will automagically advance to the next line after an item |
will automagically advance to the next line after an item |
542 |
has been selected in the browser. |
has been selected in the browser. |
543 |
|
|
544 |
makefile-pickup-everything-picks-up-filenames-p: |
`makefile-pickup-everything-picks-up-filenames-p': |
545 |
If this variable is set to a non-nil value then |
If this variable is set to a non-nil value then |
546 |
`makefile-pickup-everything' also picks up filenames as targets |
`makefile-pickup-everything' also picks up filenames as targets |
547 |
(i.e. it calls `makefile-pickup-filenames-as-targets'), otherwise |
(i.e. it calls `makefile-pickup-filenames-as-targets'), otherwise |
548 |
filenames are omitted. |
filenames are omitted. |
549 |
|
|
550 |
makefile-cleanup-continuations-p: |
`makefile-cleanup-continuations-p': |
551 |
If this variable is set to a non-nil value then Makefile mode |
If this variable is set to a non-nil value then Makefile mode |
552 |
will assure that no line in the file ends with a backslash |
will assure that no line in the file ends with a backslash |
553 |
(the continuation character) followed by any whitespace. |
(the continuation character) followed by any whitespace. |
556 |
IMPORTANT: Please note that enabling this option causes Makefile mode |
IMPORTANT: Please note that enabling this option causes Makefile mode |
557 |
to MODIFY A FILE WITHOUT YOUR CONFIRMATION when \"it seems necessary\". |
to MODIFY A FILE WITHOUT YOUR CONFIRMATION when \"it seems necessary\". |
558 |
|
|
559 |
makefile-browser-hook: |
`makefile-browser-hook': |
560 |
A function or list of functions to be called just before the |
A function or list of functions to be called just before the |
561 |
browser is entered. This is executed in the makefile buffer. |
browser is entered. This is executed in the makefile buffer. |
562 |
|
|
563 |
makefile-special-targets-list: |
`makefile-special-targets-list': |
564 |
List of special targets. You will be offered to complete |
List of special targets. You will be offered to complete |
565 |
on one of those in the minibuffer whenever you enter a `.'. |
on one of those in the minibuffer whenever you enter a `.'. |
566 |
at the beginning of a line in Makefile mode." |
at the beginning of a line in Makefile mode." |
611 |
(make-local-variable 'comment-start-skip) |
(make-local-variable 'comment-start-skip) |
612 |
(setq comment-start-skip "#+[ \t]*") |
(setq comment-start-skip "#+[ \t]*") |
613 |
|
|
614 |
|
;; Make sure TAB really inserts \t. |
615 |
|
(set (make-local-variable 'indent-line-function) 'indent-to-left-margin) |
616 |
|
|
617 |
;; become the current major mode |
;; become the current major mode |
618 |
(setq major-mode 'makefile-mode) |
(setq major-mode 'makefile-mode) |
619 |
(setq mode-name "Makefile") |
(setq mode-name "Makefile") |
1058 |
;; Have a macro assign. Fill just this line, and then backslash |
;; Have a macro assign. Fill just this line, and then backslash |
1059 |
;; resulting region. |
;; resulting region. |
1060 |
(save-restriction |
(save-restriction |
1061 |
(narrow-to-region (point) (save-excursion |
(narrow-to-region (point) (line-beginning-position 2)) |
|
(end-of-line) |
|
|
(forward-char) |
|
|
(point))) |
|
1062 |
(let ((fill-paragraph-function nil)) |
(let ((fill-paragraph-function nil)) |
1063 |
(fill-paragraph nil)) |
(fill-paragraph nil)) |
1064 |
(makefile-backslash-region (point-min) (point-max) nil))))) |
(makefile-backslash-region (point-min) (point-max) nil))))) |
1185 |
large dependencies from the browser to the client buffer. |
large dependencies from the browser to the client buffer. |
1186 |
\(point) advances accordingly in the client buffer." |
\(point) advances accordingly in the client buffer." |
1187 |
(interactive) |
(interactive) |
1188 |
(save-excursion |
(with-current-buffer makefile-browser-client |
|
(set-buffer makefile-browser-client) |
|
1189 |
(end-of-line) |
(end-of-line) |
1190 |
(insert "\\\n\t"))) |
(insert "\\\n\t"))) |
1191 |
|
|
1450 |
"Determine if point is on a macro line in the browser." |
"Determine if point is on a macro line in the browser." |
1451 |
(save-excursion |
(save-excursion |
1452 |
(beginning-of-line) |
(beginning-of-line) |
1453 |
(re-search-forward "\\$[{(]" (makefile-end-of-line-point) t))) |
(re-search-forward "\\$[{(]" (line-end-position) t))) |
1454 |
|
|
1455 |
(defun makefile-browser-this-line-target-name () |
(defun makefile-browser-this-line-target-name () |
1456 |
"Extract the target name from a line in the browser." |
"Extract the target name from a line in the browser." |
1457 |
(save-excursion |
(save-excursion |
1458 |
(end-of-line) |
(end-of-line) |
1459 |
(skip-chars-backward "^ \t") |
(skip-chars-backward "^ \t") |
1460 |
(buffer-substring (point) (1- (makefile-end-of-line-point))))) |
(buffer-substring (point) (1- (line-end-position))))) |
1461 |
|
|
1462 |
(defun makefile-browser-this-line-macro-name () |
(defun makefile-browser-this-line-macro-name () |
1463 |
"Extract the macro name from a line in the browser." |
"Extract the macro name from a line in the browser." |
1464 |
(save-excursion |
(save-excursion |
1465 |
(beginning-of-line) |
(beginning-of-line) |
1466 |
(re-search-forward "\\$[{(]" (makefile-end-of-line-point) t) |
(re-search-forward "\\$[{(]" (line-end-position) t) |
1467 |
(let ((macro-start (point))) |
(let ((macro-start (point))) |
1468 |
(skip-chars-forward "^})") |
(skip-chars-forward "^})") |
1469 |
(buffer-substring macro-start (point))))) |
(buffer-substring macro-start (point))))) |
1487 |
(defun makefile-browser-toggle-state-for-line (n) |
(defun makefile-browser-toggle-state-for-line (n) |
1488 |
(makefile-browser-set-state-for-line n (not (makefile-browser-get-state-for-line n)))) |
(makefile-browser-set-state-for-line n (not (makefile-browser-get-state-for-line n)))) |
1489 |
|
|
|
(defun makefile-beginning-of-line-point () |
|
|
(save-excursion |
|
|
(beginning-of-line) |
|
|
(point))) |
|
|
|
|
|
(defun makefile-end-of-line-point () |
|
|
(save-excursion |
|
|
(end-of-line) |
|
|
(point))) |
|
|
|
|
1490 |
(defun makefile-last-line-p () |
(defun makefile-last-line-p () |
1491 |
(= (makefile-end-of-line-point) (point-max))) |
(= (line-end-position) (point-max))) |
1492 |
|
|
1493 |
(defun makefile-first-line-p () |
(defun makefile-first-line-p () |
1494 |
(= (makefile-beginning-of-line-point) (point-min))) |
(= (line-beginning-position) (point-min))) |
1495 |
|
|
1496 |
|
|
1497 |
|
|