[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r116944: Don't break emacs <= 24.3 just yet
From: |
Leo Liu |
Subject: |
[Emacs-diffs] emacs-24 r116944: Don't break emacs <= 24.3 just yet |
Date: |
Sat, 12 Apr 2014 04:12:22 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116944
revision-id: address@hidden
parent: address@hidden
committer: Leo Liu <address@hidden>
branch nick: emacs-24
timestamp: Sat 2014-04-12 12:07:53 +0800
message:
Don't break emacs <= 24.3 just yet
* progmodes/octave.el (completion-table-with-cache): Define if not
available.
(octave-goto-function-definition)
(octave-sync-function-file-names)
(octave-find-definition-default-filename): Backquote upattern for
compatibility.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/octave.el
octavemod.el-20091113204419-o5vbwnq5f7feedwu-1028
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-04-11 12:59:36 +0000
+++ b/lisp/ChangeLog 2014-04-12 04:07:53 +0000
@@ -1,3 +1,12 @@
+2014-04-12 Leo Liu <address@hidden>
+
+ * progmodes/octave.el (completion-table-with-cache): Define if not
+ available.
+ (octave-goto-function-definition)
+ (octave-sync-function-file-names)
+ (octave-find-definition-default-filename): Backquote upattern for
+ compatibility.
+
2014-04-11 Michael Albinus <address@hidden>
* net/tramp-sh.el (tramp-sh-handle-file-truename): Quote the file
=== modified file 'lisp/progmodes/octave.el'
--- a/lisp/progmodes/octave.el 2014-02-10 01:34:22 +0000
+++ b/lisp/progmodes/octave.el 2014-04-12 04:07:53 +0000
@@ -40,7 +40,19 @@
(unless (fboundp 'user-error)
(defalias 'user-error 'error))
(unless (fboundp 'delete-consecutive-dups)
- (defalias 'delete-consecutive-dups 'delete-dups)))
+ (defalias 'delete-consecutive-dups 'delete-dups))
+ (unless (fboundp 'completion-table-with-cache)
+ (defun completion-table-with-cache (fun &optional ignore-case)
+ ;; See eg bug#11906.
+ (let* (last-arg last-result
+ (new-fun
+ (lambda (arg)
+ (if (and last-arg (string-prefix-p last-arg arg
ignore-case))
+ last-result
+ (prog1
+ (setq last-result (funcall fun arg))
+ (setq last-arg arg))))))
+ (completion-table-dynamic new-fun)))))
(eval-when-compile
(unless (fboundp 'setq-local)
(defmacro setq-local (var val)
@@ -1048,8 +1060,8 @@
(unless found (goto-char orig))
found))))
(pcase (and buffer-file-name (file-name-extension buffer-file-name))
- ("cc" (funcall search
-
"\\_<DEFUN\\(?:_DLD\\)?\\s-*(\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)" 1))
+ (`"cc" (funcall search
+
"\\_<DEFUN\\(?:_DLD\\)?\\s-*(\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)" 1))
(t (funcall search octave-function-header-regexp 3)))))
(defun octave-function-file-p ()
@@ -1118,19 +1130,19 @@
(read-char-choice
"Which name to use? (a/b/q) " '(?a ?b ?q))))))
(pcase c
- (?a (let ((newname (expand-file-name
- (concat func (file-name-extension
- buffer-file-name t)))))
- (when (or (not (file-exists-p newname))
- (yes-or-no-p
- (format "Target file %s exists; proceed? "
newname)))
- (when (file-exists-p buffer-file-name)
- (rename-file buffer-file-name newname t))
- (set-visited-file-name newname))))
- (?b (save-excursion
- (goto-char name-start)
- (delete-region name-start name-end)
- (insert file)))))))))
+ (`?a (let ((newname (expand-file-name
+ (concat func (file-name-extension
+ buffer-file-name t)))))
+ (when (or (not (file-exists-p newname))
+ (yes-or-no-p
+ (format "Target file %s exists; proceed? "
newname)))
+ (when (file-exists-p buffer-file-name)
+ (rename-file buffer-file-name newname t))
+ (set-visited-file-name newname))))
+ (`?b (save-excursion
+ (goto-char name-start)
+ (delete-region name-start name-end)
+ (insert file)))))))))
(defun octave-update-function-file-comment (beg end)
"Query replace function names in function file comment."
@@ -1789,19 +1801,19 @@
(defun octave-find-definition-default-filename (name)
"Default value for `octave-find-definition-filename-function'."
(pcase (file-name-extension name)
- ("oct"
+ (`"oct"
(octave-find-definition-default-filename
(concat "libinterp/dldfcn/"
(file-name-sans-extension (file-name-nondirectory name))
".cc")))
- ("cc"
+ (`"cc"
(let ((file (or (locate-file name (octave-source-directories))
(locate-file (file-name-nondirectory name)
(octave-source-directories)))))
(or (and file (file-exists-p file))
(error "File `%s' not found" name))
file))
- ("mex"
+ (`"mex"
(if (yes-or-no-p (format "File `%s' may be binary; open? "
(file-name-nondirectory name)))
name
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r116944: Don't break emacs <= 24.3 just yet,
Leo Liu <=