+2013-05-09 Leo Liu <sdl.web@gmail.com>
+
+ * 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 <monnier@iro.umontreal.ca>
* progmodes/ruby-mode.el: First cut at SMIE support.
(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
(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
(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")