Commit 806f0cc7 authored by Leo Liu's avatar Leo Liu
Browse files

Fix broken completion in sh-mode

parent 3bb213b9
2012-08-27 Leo Liu <>
* progmodes/sh-script.el (sh-dynamic-complete-functions): Adapt to
completion-at-point. (Bug#12220)
* skeleton.el (skeleton-untabify): Change to nil (bug#12223).
* progmodes/sh-script.el (sh-indent-comment): Change to t (bug#12267).
......@@ -202,6 +202,11 @@
(require 'comint))
(require 'executable)
(autoload 'comint-completion-at-point "comint")
(autoload 'comint-filename-completion "comint")
(autoload 'shell-command-completion "shell")
(autoload 'shell-environment-variable-completion "shell")
(defvar font-lock-comment-face)
(defvar font-lock-set-defaults)
(defvar font-lock-string-face)
......@@ -469,7 +474,6 @@ This is buffer-local in every such buffer.")
(define-key map "`" 'skeleton-pair-insert-maybe)
(define-key map "\"" 'skeleton-pair-insert-maybe)
(define-key map [remap complete-tag] 'comint-dynamic-complete)
(define-key map [remap delete-backward-char]
(define-key map "\C-c:" 'sh-set-shell)
......@@ -556,9 +560,9 @@ This is buffer-local in every such buffer.")
"Value to use for `skeleton-pair-default-alist' in Shell-Script mode.")
(defcustom sh-dynamic-complete-functions
"Functions for doing TAB dynamic completion."
:type '(repeat function)
:group 'sh-script)
......@@ -1490,6 +1494,7 @@ with your script for an edit-interpret-debug cycle."
(set (make-local-variable 'local-abbrev-table) sh-mode-abbrev-table)
(set (make-local-variable 'comint-dynamic-complete-functions)
(add-hook 'completion-at-point-functions 'comint-completion-at-point nil t)
;; we can't look if previous line ended with `\'
(set (make-local-variable 'comint-prompt-regexp) "^[ \t]*")
(set (make-local-variable 'imenu-case-fold-search) nil)
......@@ -3682,20 +3687,6 @@ The document is bounded by `sh-here-document-word'."
;; various other commands
(autoload 'comint-dynamic-complete "comint"
"Dynamically perform completion at point." t)
(autoload 'shell-dynamic-complete-command "shell"
"Dynamically complete the command at point." t)
(autoload 'comint-dynamic-complete-filename "comint"
"Dynamically complete the filename at point." t)
(autoload 'shell-dynamic-complete-environment-variable "shell"
"Dynamically complete the environment variable at point." t)
(defun sh-beginning-of-command ()
"Move point to successive beginnings of commands."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment