[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] Changes to auctex/tex.el,v
From: |
Ralf Angeli |
Subject: |
[AUCTeX-diffs] Changes to auctex/tex.el,v |
Date: |
Sat, 29 Jan 2011 15:58:09 +0000 |
CVSROOT: /cvsroot/auctex
Module name: auctex
Changes by: Ralf Angeli <angeli> 11/01/29 15:58:09
Index: tex.el
===================================================================
RCS file: /cvsroot/auctex/auctex/tex.el,v
retrieving revision 5.672
retrieving revision 5.673
diff -u -b -r5.672 -r5.673
--- tex.el 22 Jan 2011 16:24:29 -0000 5.672
+++ tex.el 29 Jan 2011 15:58:09 -0000 5.673
@@ -2400,11 +2400,14 @@
(pattern (TeX-match-buffer 0))
(symbol (buffer-substring begin end))
(list (funcall (nth 2 entry)))
- (completion (try-completion symbol list)))
+ (completion (try-completion symbol list))
+ (buf-name "*Completions*"))
(cond ((eq completion t)
(and close
(not (looking-at (regexp-quote close)))
- (insert close)))
+ (insert close))
+ (let ((window (get-buffer-window buf-name)))
+ (when window (delete-window window))))
((null completion)
(error "Can't find completion for \"%s\"" pattern))
((not (string-equal symbol completion))
@@ -2413,13 +2416,19 @@
(and close
(eq (try-completion completion list) t)
(not (looking-at (regexp-quote close)))
- (insert close)))
+ (insert close))
+ (let ((window (get-buffer-window buf-name)))
+ (when window (delete-window window))))
(t
+ (if (fboundp 'completion-in-region)
+ (completion-in-region begin end
+ (all-completions symbol list nil))
(message "Making completion list...")
(let ((list (all-completions symbol list nil)))
- (with-output-to-temp-buffer "*Completions*"
+ (with-output-to-temp-buffer buf-name
(display-completion-list list)))
- (message "Making completion list...done"))))
+ (set-window-dedicated-p (get-buffer-window buf-name) 'soft)
+ (message "Making completion list...done")))))
(funcall (nth 1 entry)))))
(defcustom TeX-default-macro "ref"