[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog bindings.el cedet/semantic...
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog bindings.el cedet/semantic... |
Date: |
Sat, 05 Dec 2009 22:01:04 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 09/12/05 22:01:04
Modified files:
lisp : ChangeLog bindings.el
lisp/cedet/semantic: ia.el
lisp/progmodes : etags.el
Log message:
* bindings.el (complete-symbol): Call semantic-ia-complete-symbol if
possible.
* cedet/semantic/ia.el (semantic-ia-complete-symbol): Make argument
optional.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16833&r2=1.16834
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/bindings.el?cvsroot=emacs&r1=1.234&r2=1.235
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/cedet/semantic/ia.el?cvsroot=emacs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/progmodes/etags.el?cvsroot=emacs&r1=1.217&r2=1.218
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16833
retrieving revision 1.16834
diff -u -b -r1.16833 -r1.16834
--- ChangeLog 5 Dec 2009 21:33:48 -0000 1.16833
+++ ChangeLog 5 Dec 2009 22:01:00 -0000 1.16834
@@ -1,5 +1,11 @@
2009-12-05 Chong Yidong <address@hidden>
+ * bindings.el (complete-symbol): Call semantic-ia-complete-symbol
+ if possible.
+
+ * cedet/semantic/ia.el (semantic-ia-complete-symbol): Make
+ argument optional.
+
* shell.el (shell): Require ansi-color (Bug#5113).
* ansi-color.el (ansi-color-for-comint-mode): Default to t.
Index: bindings.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/bindings.el,v
retrieving revision 1.234
retrieving revision 1.235
diff -u -b -r1.234 -r1.235
--- bindings.el 15 Nov 2009 20:25:58 -0000 1.234
+++ bindings.el 5 Dec 2009 22:01:04 -0000 1.235
@@ -671,23 +671,28 @@
(define-key esc-map "\t" 'complete-symbol)
-(defun complete-symbol (arg) "\
-Perform tags completion on the text around point.
-Completes to the set of names listed in the current tags table.
-The string to complete is chosen in the same way as the default
-for \\[find-tag] (which see).
+(defun complete-symbol (arg)
+ "Perform tags completion on the text around point.
+If a tags table is loaded, call `complete-tag'.
+Otherwise, if Semantic is active, call `semantic-ia-complete-symbol'.
With a prefix argument, this command does completion within
the collection of symbols listed in the index of the manual for the
language you are using."
(interactive "P")
- (if arg
- (info-complete-symbol)
- (if (fboundp 'complete-tag)
- (complete-tag)
- ;; Don't autoload etags if we have no tags table.
- (error "%s" (substitute-command-keys
- "No tags table loaded; use \\[visit-tags-table] to load one")))))
+ (cond (arg
+ (info-complete-symbol))
+ ((or tags-table-list tags-file-name)
+ (complete-tag))
+ ((and (fboundp 'semantic-ia-complete-symbol)
+ (fboundp 'semantic-active-p)
+ (semantic-active-p))
+ (semantic-ia-complete-symbol))
+ (t
+ (error "%s"
+ (substitute-command-keys
+ "No completions available; use \\[visit-tags-table] \
+or \\[semantic-mode]")))))
;; Reduce total amount of space we must allocate during this function
;; that we will not need to keep permanently.
Index: cedet/semantic/ia.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/cedet/semantic/ia.el,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- cedet/semantic/ia.el 22 Nov 2009 23:09:20 -0000 1.5
+++ cedet/semantic/ia.el 5 Dec 2009 22:01:04 -0000 1.6
@@ -105,19 +105,21 @@
symbols))
;;;###autoload
-(defun semantic-ia-complete-symbol (point)
- "Complete the current symbol at POINT.
+(defun semantic-ia-complete-symbol (&optional pos)
+ "Complete the current symbol at POS.
+If POS is nil, default to point.
Completion options are calculated with
`semantic-analyze-possible-completions'."
(interactive "d")
+ (or pos (setq pos (point)))
;; Calculating completions is a two step process.
;;
;; The first analyzer the current context, which finds tags
;; for all the stuff that may be references by the code around
- ;; POINT.
+ ;; POS.
;;
;; The second step derives completions from that context.
- (let* ((a (semantic-analyze-current-context point))
- (syms (semantic-ia-get-completions a point))
+ (let* ((a (semantic-analyze-current-context pos))
+ (syms (semantic-ia-get-completions a pos))
(pre (car (reverse (oref a prefix))))
)
;; If PRE was actually an already completed symbol, it doesn't
Index: progmodes/etags.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/etags.el,v
retrieving revision 1.217
retrieving revision 1.218
diff -u -b -r1.217 -r1.218
--- progmodes/etags.el 25 Nov 2009 06:08:45 -0000 1.217
+++ progmodes/etags.el 5 Dec 2009 22:01:04 -0000 1.218
@@ -2027,7 +2027,6 @@
(interactive)
(quit-window t (selected-window)))
-;; Note, there is another definition of this function in bindings.el.
;;;###autoload
(defun complete-tag ()
"Perform tags completion on the text around point.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/lisp ChangeLog bindings.el cedet/semantic...,
Chong Yidong <=