[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112524: * progmodes/octave.el (infer
From: |
Leo Liu |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112524: * progmodes/octave.el (inferior-octave-completion-at-point): |
Date: |
Thu, 09 May 2013 08:52:49 +0800 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 112524
fixes bug: http://debbugs.gnu.org/14300
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Thu 2013-05-09 08:52:49 +0800
message:
* progmodes/octave.el (inferior-octave-completion-at-point):
Restore the broken file completion.
(inferior-octave-startup): Fix incorrect highlighting for the
first prompt.
modified:
lisp/ChangeLog
lisp/progmodes/octave.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-05-08 20:25:57 +0000
+++ b/lisp/ChangeLog 2013-05-09 00:52:49 +0000
@@ -1,3 +1,10 @@
+2013-05-09 Leo Liu <address@hidden>
+
+ * progmodes/octave.el (inferior-octave-completion-at-point):
+ Restore the broken file completion. (Bug#14300)
+ (inferior-octave-startup): Fix incorrect highlighting for the
+ first prompt.
+
2013-05-08 Stefan Monnier <address@hidden>
* progmodes/ruby-mode.el: First cut at SMIE support.
=== modified file 'lisp/progmodes/octave.el'
--- a/lisp/progmodes/octave.el 2013-05-07 04:53:31 +0000
+++ b/lisp/progmodes/octave.el 2013-05-09 00:52:49 +0000
@@ -716,7 +716,6 @@
(when (and inferior-octave-startup-file
(file-exists-p inferior-octave-startup-file))
(format "source (\"%s\");\n" inferior-octave-startup-file))))
- ;; XXX: the first prompt is incorrectly highlighted
(insert-before-markers
(concat
(if inferior-octave-output-list
@@ -729,7 +728,9 @@
(set-process-filter proc 'comint-output-filter)
;; Just in case, to be sure a cd in the startup file
;; won't have detrimental effects.
- (inferior-octave-resync-dirs)))
+ (inferior-octave-resync-dirs)
+ ;; A trick to get the prompt highlighted.
+ (comint-send-string proc "\n")))
(defun inferior-octave-completion-table ()
(completion-table-dynamic
@@ -741,13 +742,19 @@
(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")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112524: * progmodes/octave.el (inferior-octave-completion-at-point):,
Leo Liu <=