GNU bug report logs -
#12220
24.2; [PATCH] completion completely broken in sh-script
Previous Next
Reported by: Leo <sdl.web <at> gmail.com>
Date: Fri, 17 Aug 2012 19:41:02 UTC
Severity: normal
Tags: patch
Found in version 24.2
Done: Leo <sdl.web <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12220 in the body.
You can then email your comments to 12220 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12220
; Package
emacs
.
(Fri, 17 Aug 2012 19:41:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Leo <sdl.web <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 17 Aug 2012 19:41:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
As suggested by the subject. The bug is caused by blindly aliasing
comint-dynamic-complete to completion-at-point.
[0001-Fix-broken-completion-in-sh-script.patch (text/x-patch, inline)]
From a986b6d40ccd76e7576cf4de678372c5bdd1713d Mon Sep 17 00:00:00 2001
From: Leo Liu <sdl.web <at> gmail.com>
Date: Sat, 18 Aug 2012 02:48:15 +0800
Subject: [PATCH] Fix broken completion in sh-script
---
lisp/progmodes/sh-script.el | 27 +++++++++------------------
1 file changed, 9 insertions(+), 18 deletions(-)
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 7d38df6a..f0dec93f 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -202,6 +202,11 @@ (eval-when-compile
(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 @@ (defvar sh-mode-map
(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]
'backward-delete-char-untabify)
(define-key map "\C-c:" 'sh-set-shell)
@@ -556,9 +560,9 @@ (defvar sh-skeleton-pair-default-alist '((?( _ ?)) (?\))
"Value to use for `skeleton-pair-default-alist' in Shell-Script mode.")
(defcustom sh-dynamic-complete-functions
- '(shell-dynamic-complete-environment-variable
- shell-dynamic-complete-command
- comint-dynamic-complete-filename)
+ '(shell-environment-variable-completion
+ shell-command-completion
+ comint-filename-completion)
"Functions for doing TAB dynamic completion."
:type '(repeat function)
:group 'sh-script)
@@ -1489,6 +1493,7 @@ (define-derived-mode sh-mode prog-mode "Shell-script"
(set (make-local-variable 'local-abbrev-table) sh-mode-abbrev-table)
(set (make-local-variable 'comint-dynamic-complete-functions)
sh-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)
@@ -3681,20 +3686,6 @@ (defun sh-maybe-here-document (arg)
;; 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."
(interactive)
--
1.7.9.6 (Apple Git-31.1)
Reply sent
to
Leo <sdl.web <at> gmail.com>
:
You have taken responsibility.
(Mon, 27 Aug 2012 12:38:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Leo <sdl.web <at> gmail.com>
:
bug acknowledged by developer.
(Mon, 27 Aug 2012 12:38:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 12220-done <at> debbugs.gnu.org (full text, mbox):
Fixed in emacs-24
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 25 Sep 2012 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 67 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.