[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114471: * progmodes/octave.el (inferior-octave-comp
From: |
Leo Liu |
Subject: |
[Emacs-diffs] trunk r114471: * progmodes/octave.el (inferior-octave-completion-table) |
Date: |
Sat, 28 Sep 2013 03:16:30 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114471
revision-id: address@hidden
parent: address@hidden
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Sat 2013-09-28 11:15:56 +0800
message:
* progmodes/octave.el (inferior-octave-completion-table)
(inferior-octave-completion-at-point): Minor tweaks.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/octave.el
octavemod.el-20091113204419-o5vbwnq5f7feedwu-1028
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-09-28 02:54:27 +0000
+++ b/lisp/ChangeLog 2013-09-28 03:15:56 +0000
@@ -1,5 +1,8 @@
2013-09-28 Leo Liu <address@hidden>
+ * progmodes/octave.el (inferior-octave-completion-table)
+ (inferior-octave-completion-at-point): Minor tweaks.
+
* textmodes/ispell.el (ispell-lookup-words): Rename from
lookup-words. (Bug#15460)
(lookup-words): Obsolete.
=== modified file 'lisp/progmodes/octave.el'
--- a/lisp/progmodes/octave.el 2013-09-28 02:41:48 +0000
+++ b/lisp/progmodes/octave.el 2013-09-28 03:15:56 +0000
@@ -1,4 +1,4 @@
-;;; octave.el --- editing octave source files under emacs -*-
lexical-binding: t; -*-
+;;; octave.el --- editing octave source files under emacs -*-
lexical-binding: t; -*-
;; Copyright (C) 1997, 2001-2013 Free Software Foundation, Inc.
@@ -804,34 +804,30 @@
;;
;; Use cache to avoid repetitive computation of completions due to
;; bug#11906 - http://debbugs.gnu.org/11906 - which may cause
- ;; noticeable delay. CACHE: (CMD TIME VALUE).
+ ;; noticeable delay. CACHE: (CMD . VALUE).
(let ((cache))
(completion-table-dynamic
(lambda (command)
- (unless (and (equal (car cache) command)
- (< (float-time) (+ 5 (cadr cache))))
+ (unless (equal (car cache) command)
(inferior-octave-send-list-and-digest
(list (format "completion_matches ('%s');\n" command)))
- (setq cache (list command (float-time)
+ (setq cache (cons command
(delete-consecutive-dups
(sort inferior-octave-output-list
'string-lessp)))))
- (car (cddr cache))))))
+ (cdr cache)))))
(defun inferior-octave-completion-at-point ()
"Return the data to complete the Octave symbol at point."
;; http://debbugs.gnu.org/14300
- (let* ((filecomp (string-match-p
- "/" (or (comint--match-partial-filename) "")))
- (end (point))
- (start
- (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
+ (unless (string-match-p "/" (or (comint--match-partial-filename) ""))
+ (let ((beg (save-excursion
+ (skip-syntax-backward "w_" (comint-line-beginning-position))
+ (point)))
+ (end (point)))
+ (when (and beg (> end beg))
+ (list beg end (completion-table-in-turn
inferior-octave-completion-table
- 'comint-completion-file-name-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] trunk r114471: * progmodes/octave.el (inferior-octave-completion-table),
Leo Liu <=