diff options
| author | Joakim Verona | 2013-03-26 16:20:17 +0100 |
|---|---|---|
| committer | Joakim Verona | 2013-03-26 16:20:17 +0100 |
| commit | 6f6db22fc74ffb7fbdd4d805545b7e28cd59f0c8 (patch) | |
| tree | 4a58903b4c3d010e90fc37fe10ea4d9895876d01 /lisp/progmodes | |
| parent | 62dd123f7c11ddbe156bc0e84dcb7ca1da5368bb (diff) | |
| parent | 48c226c2c2592e31a47559bd1689fcc4354d9479 (diff) | |
| download | emacs-6f6db22fc74ffb7fbdd4d805545b7e28cd59f0c8.tar.gz emacs-6f6db22fc74ffb7fbdd4d805545b7e28cd59f0c8.zip | |
conflict resolve
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/cfengine.el | 30 | ||||
| -rw-r--r-- | lisp/progmodes/compile.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/scheme.el | 3 |
3 files changed, 26 insertions, 15 deletions
diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el index 74b81b0cd01..11eb0eeaf49 100644 --- a/lisp/progmodes/cfengine.el +++ b/lisp/progmodes/cfengine.el | |||
| @@ -30,11 +30,13 @@ | |||
| 30 | ;; The CFEngine 3.x support doesn't have Imenu support but patches are | 30 | ;; The CFEngine 3.x support doesn't have Imenu support but patches are |
| 31 | ;; welcome. | 31 | ;; welcome. |
| 32 | 32 | ||
| 33 | ;; By default, CFEngine 3.x syntax is used. | ||
| 34 | |||
| 33 | ;; You can set it up so either `cfengine2-mode' (2.x and earlier) or | 35 | ;; You can set it up so either `cfengine2-mode' (2.x and earlier) or |
| 34 | ;; `cfengine3-mode' (3.x) will be picked, depending on the buffer | 36 | ;; `cfengine3-mode' (3.x) will be picked, depending on the buffer |
| 35 | ;; contents: | 37 | ;; contents: |
| 36 | 38 | ||
| 37 | ;; (add-to-list 'auto-mode-alist '("\\.cf\\'" . cfengine-mode)) | 39 | ;; (add-to-list 'auto-mode-alist '("\\.cf\\'" . cfengine-auto-mode)) |
| 38 | 40 | ||
| 39 | ;; OR you can choose to always use a specific version, if you prefer | 41 | ;; OR you can choose to always use a specific version, if you prefer |
| 40 | ;; it: | 42 | ;; it: |
| @@ -181,7 +183,7 @@ This includes those for cfservd as well as cfagent.") | |||
| 181 | ("$(\\([[:alnum:]_]+\\))" 1 font-lock-variable-name-face) | 183 | ("$(\\([[:alnum:]_]+\\))" 1 font-lock-variable-name-face) |
| 182 | ("${\\([[:alnum:]_]+\\)}" 1 font-lock-variable-name-face) | 184 | ("${\\([[:alnum:]_]+\\)}" 1 font-lock-variable-name-face) |
| 183 | ;; Variable definitions. | 185 | ;; Variable definitions. |
| 184 | ("\\<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1 font-lock-variable-name-face) | 186 | ("\\_<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1 font-lock-variable-name-face) |
| 185 | ;; File, acl &c in group: { token ... } | 187 | ;; File, acl &c in group: { token ... } |
| 186 | ("{[ \t]*\\([^ \t\n]+\\)" 1 font-lock-constant-face))) | 188 | ("{[ \t]*\\([^ \t\n]+\\)" 1 font-lock-constant-face))) |
| 187 | 189 | ||
| @@ -189,9 +191,9 @@ This includes those for cfservd as well as cfagent.") | |||
| 189 | `( | 191 | `( |
| 190 | ;; Defuns. This happens early so they don't get caught by looser | 192 | ;; Defuns. This happens early so they don't get caught by looser |
| 191 | ;; patterns. | 193 | ;; patterns. |
| 192 | (,(concat "\\<" cfengine3-defuns-regex "\\>" | 194 | (,(concat "\\_<" cfengine3-defuns-regex "\\_>" |
| 193 | "[ \t]+\\<\\([[:alnum:]_.:]+\\)\\>" | 195 | "[ \t]+\\_<\\([[:alnum:]_.:]+\\)\\_>" |
| 194 | "[ \t]+\\<\\([[:alnum:]_.:]+\\)" | 196 | "[ \t]+\\_<\\([[:alnum:]_.:]+\\)" |
| 195 | ;; Optional parentheses with variable names inside. | 197 | ;; Optional parentheses with variable names inside. |
| 196 | "\\(?:(\\([^)]*\\))\\)?") | 198 | "\\(?:(\\([^)]*\\))\\)?") |
| 197 | (1 font-lock-builtin-face) | 199 | (1 font-lock-builtin-face) |
| @@ -212,10 +214,10 @@ This includes those for cfservd as well as cfagent.") | |||
| 212 | ("[@$]{\\([[:alnum:]_.:]+\\)}" 1 font-lock-variable-name-face) | 214 | ("[@$]{\\([[:alnum:]_.:]+\\)}" 1 font-lock-variable-name-face) |
| 213 | 215 | ||
| 214 | ;; Variable definitions. | 216 | ;; Variable definitions. |
| 215 | ("\\<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1 font-lock-variable-name-face) | 217 | ("\\_<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1 font-lock-variable-name-face) |
| 216 | 218 | ||
| 217 | ;; Variable types. | 219 | ;; Variable types. |
| 218 | (,(concat "\\<" (eval-when-compile (regexp-opt cfengine3-vartypes t)) "\\>") | 220 | (,(concat "\\_<" (eval-when-compile (regexp-opt cfengine3-vartypes t)) "\\_>") |
| 219 | 1 font-lock-type-face))) | 221 | 1 font-lock-type-face))) |
| 220 | 222 | ||
| 221 | (defvar cfengine2-imenu-expression | 223 | (defvar cfengine2-imenu-expression |
| @@ -223,9 +225,9 @@ This includes those for cfservd as well as cfagent.") | |||
| 223 | (regexp-opt cfengine2-actions t)) | 225 | (regexp-opt cfengine2-actions t)) |
| 224 | ":[^:]") | 226 | ":[^:]") |
| 225 | 1) | 227 | 1) |
| 226 | ("Variables/classes" "\\<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1) | 228 | ("Variables/classes" "\\_<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1) |
| 227 | ("Variables/classes" "\\<define=\\([[:alnum:]_]+\\)" 1) | 229 | ("Variables/classes" "\\_<define=\\([[:alnum:]_]+\\)" 1) |
| 228 | ("Variables/classes" "\\<DefineClass\\>[ \t]+\\([[:alnum:]_]+\\)" 1)) | 230 | ("Variables/classes" "\\_<DefineClass\\>[ \t]+\\([[:alnum:]_]+\\)" 1)) |
| 229 | "`imenu-generic-expression' for CFEngine mode.") | 231 | "`imenu-generic-expression' for CFEngine mode.") |
| 230 | 232 | ||
| 231 | (defun cfengine2-outline-level () | 233 | (defun cfengine2-outline-level () |
| @@ -338,7 +340,7 @@ Intended as the value of `indent-line-function'." | |||
| 338 | Treats body/bundle blocks as defuns." | 340 | Treats body/bundle blocks as defuns." |
| 339 | (unless (<= (current-column) (current-indentation)) | 341 | (unless (<= (current-column) (current-indentation)) |
| 340 | (end-of-line)) | 342 | (end-of-line)) |
| 341 | (if (re-search-backward (concat "^[ \t]*" cfengine3-defuns-regex "\\>") nil t) | 343 | (if (re-search-backward (concat "^[ \t]*" cfengine3-defuns-regex "\\_>") nil t) |
| 342 | (beginning-of-line) | 344 | (beginning-of-line) |
| 343 | (goto-char (point-min))) | 345 | (goto-char (point-min))) |
| 344 | t) | 346 | t) |
| @@ -347,7 +349,7 @@ Treats body/bundle blocks as defuns." | |||
| 347 | "`end-of-defun' function for Cfengine 3 mode. | 349 | "`end-of-defun' function for Cfengine 3 mode. |
| 348 | Treats body/bundle blocks as defuns." | 350 | Treats body/bundle blocks as defuns." |
| 349 | (end-of-line) | 351 | (end-of-line) |
| 350 | (if (re-search-forward (concat "^[ \t]*" cfengine3-defuns-regex "\\>") nil t) | 352 | (if (re-search-forward (concat "^[ \t]*" cfengine3-defuns-regex "\\_>") nil t) |
| 351 | (beginning-of-line) | 353 | (beginning-of-line) |
| 352 | (goto-char (point-max))) | 354 | (goto-char (point-max))) |
| 353 | t) | 355 | t) |
| @@ -366,7 +368,7 @@ Intended as the value of `indent-line-function'." | |||
| 366 | 368 | ||
| 367 | (cond | 369 | (cond |
| 368 | ;; Body/bundle blocks start at 0. | 370 | ;; Body/bundle blocks start at 0. |
| 369 | ((looking-at (concat cfengine3-defuns-regex "\\>")) | 371 | ((looking-at (concat cfengine3-defuns-regex "\\_>")) |
| 370 | (indent-line-to 0)) | 372 | (indent-line-to 0)) |
| 371 | ;; Categories are indented one step. | 373 | ;; Categories are indented one step. |
| 372 | ((looking-at (concat cfengine3-category-regex "[ \t]*\\(#.*\\)*$")) | 374 | ((looking-at (concat cfengine3-category-regex "[ \t]*\\(#.*\\)*$")) |
| @@ -583,7 +585,7 @@ on the buffer contents" | |||
| 583 | (save-restriction | 585 | (save-restriction |
| 584 | (goto-char (point-min)) | 586 | (goto-char (point-min)) |
| 585 | (while (not (or (eobp) v3)) | 587 | (while (not (or (eobp) v3)) |
| 586 | (setq v3 (looking-at (concat cfengine3-defuns-regex "\\>"))) | 588 | (setq v3 (looking-at (concat cfengine3-defuns-regex "\\_>"))) |
| 587 | (forward-line))) | 589 | (forward-line))) |
| 588 | (if v3 (cfengine3-mode) (cfengine2-mode)))) | 590 | (if v3 (cfengine3-mode) (cfengine2-mode)))) |
| 589 | 591 | ||
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 9e9e2f0b090..98a89bb2363 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -1814,6 +1814,7 @@ Returns the compilation buffer created." | |||
| 1814 | (define-key map [follow-link] 'mouse-face) | 1814 | (define-key map [follow-link] 'mouse-face) |
| 1815 | (define-key map "\C-c\C-c" 'compile-goto-error) | 1815 | (define-key map "\C-c\C-c" 'compile-goto-error) |
| 1816 | (define-key map "\C-m" 'compile-goto-error) | 1816 | (define-key map "\C-m" 'compile-goto-error) |
| 1817 | (define-key map "\C-o" 'compilation-display-error) | ||
| 1817 | (define-key map "\C-c\C-k" 'kill-compilation) | 1818 | (define-key map "\C-c\C-k" 'kill-compilation) |
| 1818 | (define-key map "\M-n" 'compilation-next-error) | 1819 | (define-key map "\M-n" 'compilation-next-error) |
| 1819 | (define-key map "\M-p" 'compilation-previous-error) | 1820 | (define-key map "\M-p" 'compilation-previous-error) |
| @@ -1858,6 +1859,7 @@ Returns the compilation buffer created." | |||
| 1858 | (define-key map [follow-link] 'mouse-face) | 1859 | (define-key map [follow-link] 'mouse-face) |
| 1859 | (define-key map "\C-c\C-c" 'compile-goto-error) | 1860 | (define-key map "\C-c\C-c" 'compile-goto-error) |
| 1860 | (define-key map "\C-m" 'compile-goto-error) | 1861 | (define-key map "\C-m" 'compile-goto-error) |
| 1862 | (define-key map "\C-o" 'compilation-display-error) | ||
| 1861 | (define-key map "\C-c\C-k" 'kill-compilation) | 1863 | (define-key map "\C-c\C-k" 'kill-compilation) |
| 1862 | (define-key map "\M-n" 'compilation-next-error) | 1864 | (define-key map "\M-n" 'compilation-next-error) |
| 1863 | (define-key map "\M-p" 'compilation-previous-error) | 1865 | (define-key map "\M-p" 'compilation-previous-error) |
| @@ -2299,6 +2301,12 @@ Prefix arg N says how many files to move backwards (or forwards, if negative)." | |||
| 2299 | (interactive "p") | 2301 | (interactive "p") |
| 2300 | (compilation-next-file (- n))) | 2302 | (compilation-next-file (- n))) |
| 2301 | 2303 | ||
| 2304 | (defun compilation-display-error () | ||
| 2305 | "Display the source for current error in another window." | ||
| 2306 | (interactive) | ||
| 2307 | (setq compilation-current-error (point)) | ||
| 2308 | (next-error-no-select 0)) | ||
| 2309 | |||
| 2302 | (defun kill-compilation () | 2310 | (defun kill-compilation () |
| 2303 | "Kill the process made by the \\[compile] or \\[grep] commands." | 2311 | "Kill the process made by the \\[compile] or \\[grep] commands." |
| 2304 | (interactive) | 2312 | (interactive) |
diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el index aae5526ea82..fab20102097 100644 --- a/lisp/progmodes/scheme.el +++ b/lisp/progmodes/scheme.el | |||
| @@ -310,7 +310,7 @@ See `run-hooks'." | |||
| 310 | "(" (regexp-opt | 310 | "(" (regexp-opt |
| 311 | '("begin" "call-with-current-continuation" "call/cc" | 311 | '("begin" "call-with-current-continuation" "call/cc" |
| 312 | "call-with-input-file" "call-with-output-file" "case" "cond" | 312 | "call-with-input-file" "call-with-output-file" "case" "cond" |
| 313 | "do" "else" "for-each" "if" "lambda" | 313 | "do" "else" "for-each" "if" "lambda" "λ" |
| 314 | "let" "let*" "let-syntax" "letrec" "letrec-syntax" | 314 | "let" "let*" "let-syntax" "letrec" "letrec-syntax" |
| 315 | ;; SRFI 11 usage comes up often enough. | 315 | ;; SRFI 11 usage comes up often enough. |
| 316 | "let-values" "let*-values" | 316 | "let-values" "let*-values" |
| @@ -410,6 +410,7 @@ that variable's value is a string." | |||
| 410 | (put 'make 'scheme-indent-function 1) | 410 | (put 'make 'scheme-indent-function 1) |
| 411 | (put 'style 'scheme-indent-function 1) | 411 | (put 'style 'scheme-indent-function 1) |
| 412 | (put 'root 'scheme-indent-function 1) | 412 | (put 'root 'scheme-indent-function 1) |
| 413 | (put 'λ 'scheme-indent-function 1) | ||
| 413 | 414 | ||
| 414 | (defvar dsssl-font-lock-keywords | 415 | (defvar dsssl-font-lock-keywords |
| 415 | (eval-when-compile | 416 | (eval-when-compile |