[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14300: 24.3; comint-dynamic-complete-functions breaks
From: |
Leo Liu |
Subject: |
bug#14300: 24.3; comint-dynamic-complete-functions breaks |
Date: |
Tue, 07 May 2013 16:18:15 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3) |
On 2013-05-06 21:32 +0800, Stefan Monnier wrote:
> That's what ":exclusive t" does. Of course "no match" is tricky to
> define: if you use a fancy completion style that tries really hard to
> find a match (ido-flex style, maybe even with "typo-correction"), then
> only trying the second table when "there's no match" for the first one
> might end up meaning that it never tries the second one.
I got a solution that seems good enough. Do you see any room for
improvement? Thanks.
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index 138c1948..3118f49e 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -741,13 +741,19 @@ (defun inferior-octave-completion-table ()
(defun inferior-octave-completion-at-point ()
"Return the data to complete the Octave symbol at point."
- (let* ((end (point))
+ ;; http://debbugs.gnu.org/14300
+ (let* ((filecomp (string-match-p
+ "/" (or (comint--match-partial-filename) "")))
+ (end (point))
(start
- (save-excursion
- (skip-syntax-backward "w_" (comint-line-beginning-position))
- (point))))
- (when (> end start)
- (list start end (inferior-octave-completion-table)))))
+ (unless filecomp
+ (save-excursion
+ (skip-syntax-backward "w_" (comint-line-beginning-position))
+ (point)))))
+ (when (and start (> end start))
+ (list start end (completion-table-in-turn
+ (inferior-octave-completion-table)
+ 'comint-completion-file-name-table)))))
(define-obsolete-function-alias 'inferior-octave-complete
'completion-at-point "24.1")
- bug#14300: 24.3; comint-dynamic-complete-functions breaks, Stefan Monnier, 2013/05/04
- bug#14300: 24.3; comint-dynamic-complete-functions breaks, Leo Liu, 2013/05/04
- bug#14300: 24.3; comint-dynamic-complete-functions breaks, Stefan Monnier, 2013/05/05
- bug#14300: 24.3; comint-dynamic-complete-functions breaks, Leo Liu, 2013/05/05
- bug#14300: 24.3; comint-dynamic-complete-functions breaks, Stefan Monnier, 2013/05/05
- bug#14300: 24.3; comint-dynamic-complete-functions breaks, Leo Liu, 2013/05/05
- bug#14300: 24.3; comint-dynamic-complete-functions breaks, Stefan Monnier, 2013/05/06
- bug#14300: 24.3; comint-dynamic-complete-functions breaks,
Leo Liu <=
- bug#14300: 24.3; comint-dynamic-complete-functions breaks, Leo Liu, 2013/05/09