diff options
| author | Glenn Morris | 2012-08-28 09:01:59 -0700 |
|---|---|---|
| committer | Glenn Morris | 2012-08-28 09:01:59 -0700 |
| commit | eada086196ccb005ded188ac2e58d41f3682a125 (patch) | |
| tree | f195bbf91841ea4e85d465307d62c709924892c2 /lisp/progmodes | |
| parent | 37b9743e79bac608a45fade0744248446aaa0a33 (diff) | |
| parent | 806f0cc7302bd1dacfad8366f67a97e9bfbc8fc9 (diff) | |
| download | emacs-eada086196ccb005ded188ac2e58d41f3682a125.tar.gz emacs-eada086196ccb005ded188ac2e58d41f3682a125.zip | |
Merge from emacs-24; up to 2012-05-04T19:17:01Z!monnier@iro.umontreal.ca
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/hideif.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/hideshow.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/sh-script.el | 30 |
3 files changed, 14 insertions, 20 deletions
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index 3e3d7adc0b6..4b77c6dab1a 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el | |||
| @@ -1003,7 +1003,7 @@ Return as (TOP . BOTTOM) the extent of ifdef block." | |||
| 1003 | "Compress the define list ENV into a list of defined symbols only." | 1003 | "Compress the define list ENV into a list of defined symbols only." |
| 1004 | (let ((new-defs nil)) | 1004 | (let ((new-defs nil)) |
| 1005 | (dolist (def env new-defs) | 1005 | (dolist (def env new-defs) |
| 1006 | (if (hif-lookup (car def)) (push (car env) new-defs))))) | 1006 | (if (hif-lookup (car def)) (push (car def) new-defs))))) |
| 1007 | 1007 | ||
| 1008 | (defun hide-ifdef-set-define-alist (name) | 1008 | (defun hide-ifdef-set-define-alist (name) |
| 1009 | "Set the association for NAME to `hide-ifdef-env'." | 1009 | "Set the association for NAME to `hide-ifdef-env'." |
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index b6d2b5e319c..233b9a5212e 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el | |||
| @@ -408,6 +408,8 @@ element (using `match-beginning') before calling `hs-forward-sexp-func'.") | |||
| 408 | 408 | ||
| 409 | (defvar hs-block-end-regexp nil | 409 | (defvar hs-block-end-regexp nil |
| 410 | "Regexp for end of block.") | 410 | "Regexp for end of block.") |
| 411 | (make-variable-buffer-local 'hs-block-end-regexp) | ||
| 412 | |||
| 411 | 413 | ||
| 412 | (defvar hs-forward-sexp-func 'forward-sexp | 414 | (defvar hs-forward-sexp-func 'forward-sexp |
| 413 | "Function used to do a `forward-sexp'. | 415 | "Function used to do a `forward-sexp'. |
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index a6089aabb04..a422462775d 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -202,6 +202,11 @@ | |||
| 202 | (require 'comint)) | 202 | (require 'comint)) |
| 203 | (require 'executable) | 203 | (require 'executable) |
| 204 | 204 | ||
| 205 | (autoload 'comint-completion-at-point "comint") | ||
| 206 | (autoload 'comint-filename-completion "comint") | ||
| 207 | (autoload 'shell-command-completion "shell") | ||
| 208 | (autoload 'shell-environment-variable-completion "shell") | ||
| 209 | |||
| 205 | (defvar font-lock-comment-face) | 210 | (defvar font-lock-comment-face) |
| 206 | (defvar font-lock-set-defaults) | 211 | (defvar font-lock-set-defaults) |
| 207 | (defvar font-lock-string-face) | 212 | (defvar font-lock-string-face) |
| @@ -470,7 +475,6 @@ This is buffer-local in every such buffer.") | |||
| 470 | (define-key map "\C-\M-x" 'sh-execute-region) | 475 | (define-key map "\C-\M-x" 'sh-execute-region) |
| 471 | (define-key map "\C-c\C-x" 'executable-interpret) | 476 | (define-key map "\C-c\C-x" 'executable-interpret) |
| 472 | 477 | ||
| 473 | (define-key map [remap complete-tag] 'comint-dynamic-complete) | ||
| 474 | (define-key map [remap delete-backward-char] | 478 | (define-key map [remap delete-backward-char] |
| 475 | 'backward-delete-char-untabify) | 479 | 'backward-delete-char-untabify) |
| 476 | (define-key map "\C-c:" 'sh-set-shell) | 480 | (define-key map "\C-c:" 'sh-set-shell) |
| @@ -553,9 +557,9 @@ This is buffer-local in every such buffer.") | |||
| 553 | "Value to use for `skeleton-pair-default-alist' in Shell-Script mode.") | 557 | "Value to use for `skeleton-pair-default-alist' in Shell-Script mode.") |
| 554 | 558 | ||
| 555 | (defcustom sh-dynamic-complete-functions | 559 | (defcustom sh-dynamic-complete-functions |
| 556 | '(shell-dynamic-complete-environment-variable | 560 | '(shell-environment-variable-completion |
| 557 | shell-dynamic-complete-command | 561 | shell-command-completion |
| 558 | comint-dynamic-complete-filename) | 562 | comint-filename-completion) |
| 559 | "Functions for doing TAB dynamic completion." | 563 | "Functions for doing TAB dynamic completion." |
| 560 | :type '(repeat function) | 564 | :type '(repeat function) |
| 561 | :group 'sh-script) | 565 | :group 'sh-script) |
| @@ -1187,7 +1191,7 @@ This value is used for the `+' and `-' symbols in an indentation variable." | |||
| 1187 | :group 'sh-indentation) | 1191 | :group 'sh-indentation) |
| 1188 | (put 'sh-basic-offset 'safe-local-variable 'integerp) | 1192 | (put 'sh-basic-offset 'safe-local-variable 'integerp) |
| 1189 | 1193 | ||
| 1190 | (defcustom sh-indent-comment nil | 1194 | (defcustom sh-indent-comment t |
| 1191 | "How a comment line is to be indented. | 1195 | "How a comment line is to be indented. |
| 1192 | nil means leave it as it is; | 1196 | nil means leave it as it is; |
| 1193 | t means indent it as a normal line, aligning it to previous non-blank | 1197 | t means indent it as a normal line, aligning it to previous non-blank |
| @@ -1198,6 +1202,7 @@ a number means align to that column, e.g. 0 means first column." | |||
| 1198 | (const :tag "Indent as a normal line." t) | 1202 | (const :tag "Indent as a normal line." t) |
| 1199 | (integer :menu-tag "Indent to this col (0 means first col)." | 1203 | (integer :menu-tag "Indent to this col (0 means first col)." |
| 1200 | :tag "Indent to column number.") ) | 1204 | :tag "Indent to column number.") ) |
| 1205 | :version "24.3" | ||
| 1201 | :group 'sh-indentation) | 1206 | :group 'sh-indentation) |
| 1202 | 1207 | ||
| 1203 | 1208 | ||
| @@ -1485,6 +1490,7 @@ with your script for an edit-interpret-debug cycle." | |||
| 1485 | (set (make-local-variable 'local-abbrev-table) sh-mode-abbrev-table) | 1490 | (set (make-local-variable 'local-abbrev-table) sh-mode-abbrev-table) |
| 1486 | (set (make-local-variable 'comint-dynamic-complete-functions) | 1491 | (set (make-local-variable 'comint-dynamic-complete-functions) |
| 1487 | sh-dynamic-complete-functions) | 1492 | sh-dynamic-complete-functions) |
| 1493 | (add-hook 'completion-at-point-functions 'comint-completion-at-point nil t) | ||
| 1488 | ;; we can't look if previous line ended with `\' | 1494 | ;; we can't look if previous line ended with `\' |
| 1489 | (set (make-local-variable 'comint-prompt-regexp) "^[ \t]*") | 1495 | (set (make-local-variable 'comint-prompt-regexp) "^[ \t]*") |
| 1490 | (set (make-local-variable 'imenu-case-fold-search) nil) | 1496 | (set (make-local-variable 'imenu-case-fold-search) nil) |
| @@ -4109,20 +4115,6 @@ The document is bounded by `sh-here-document-word'." | |||
| 4109 | 4115 | ||
| 4110 | ;; various other commands | 4116 | ;; various other commands |
| 4111 | 4117 | ||
| 4112 | (autoload 'comint-dynamic-complete "comint" | ||
| 4113 | "Dynamically perform completion at point." t) | ||
| 4114 | |||
| 4115 | (autoload 'shell-dynamic-complete-command "shell" | ||
| 4116 | "Dynamically complete the command at point." t) | ||
| 4117 | |||
| 4118 | (autoload 'comint-dynamic-complete-filename "comint" | ||
| 4119 | "Dynamically complete the filename at point." t) | ||
| 4120 | |||
| 4121 | (autoload 'shell-dynamic-complete-environment-variable "shell" | ||
| 4122 | "Dynamically complete the environment variable at point." t) | ||
| 4123 | |||
| 4124 | |||
| 4125 | |||
| 4126 | (defun sh-beginning-of-command () | 4118 | (defun sh-beginning-of-command () |
| 4127 | ;; FIXME: Redefine using SMIE. | 4119 | ;; FIXME: Redefine using SMIE. |
| 4128 | "Move point to successive beginnings of commands." | 4120 | "Move point to successive beginnings of commands." |