]> code.delx.au - gnu-emacs/blobdiff - lisp/cedet/semantic/ia.el
Update copyright year to 2015
[gnu-emacs] / lisp / cedet / semantic / ia.el
index d087ac6fcdeda467869e07d0cc301d542c9dd55a..2216fa9e96472e6fdfdcf65e5d4571eeacbea8b8 100644 (file)
@@ -1,6 +1,6 @@
 ;;; semantic/ia.el --- Interactive Analysis functions
 
-;;; Copyright (C) 2000-2013 Free Software Foundation, Inc.
+;;; Copyright (C) 2000-2015 Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 ;; Keywords: syntax
@@ -123,7 +123,8 @@ Completion options are calculated with `semantic-analyze-possible-completions'."
              ;; the smart completion engine sometimes fails.
              (semantic-complete-symbol))
        ;; Use try completion to seek a common substring.
-       (let ((tc (try-completion (or pre "")  syms)))
+       (let* ((completion-ignore-case (string= (downcase pre) pre))
+              (tc (try-completion (or pre "")  syms)))
          (if (and (stringp tc) (not (string= tc (or pre ""))))
              (let ((tok (semantic-find-first-tag-by-name
                          tc syms)))
@@ -161,11 +162,14 @@ Completion options are calculated with `semantic-analyze-possible-completions'."
     ;; Complete this symbol.
     (if (not syms)
        (progn
-         (message "No smart completions found.  Trying Senator.")
-         (when (semantic-analyze-context-p a)
-           ;; This is a quick way of getting a nice completion list
-           ;; in the menu if the regular context mechanism fails.
-           (senator-completion-menu-popup)))
+         (message "No smart completions found.")
+          ;; Disabled - see http://debbugs.gnu.org/14522
+         ;; (message "No smart completions found.  Trying Senator.")
+         ;; (when (semantic-analyze-context-p a)
+         ;;   ;; This is a quick way of getting a nice completion list
+         ;;   ;; in the menu if the regular context mechanism fails.
+         ;;   (senator-completion-menu-popup))
+          )
 
       (let* ((menu
              (mapcar
@@ -179,7 +183,7 @@ Completion options are calculated with `semantic-analyze-possible-completions'."
               ;; XEmacs needs that the menu has at least 2 items.  So,
               ;; include a nil item that will be ignored by imenu.
               (cons nil menu)
-              (senator-completion-menu-point-as-event)
+              `(down-mouse-1 ,(posn-at-point))
               "Completions")))
        (when ans
          (if (not (semantic-tag-p ans))
@@ -375,6 +379,13 @@ origin of the code at point."
      ((semantic-tag-of-class-p (semantic-current-tag) 'include)
       ;; Just borrow this cool fcn.
       (require 'semantic/decorate/include)
+
+      ;; Push the mark, so you can pop global mark back, or
+      ;; use semantic-mru-bookmark mode to do so.
+      (push-mark)
+      (when (fboundp 'push-tag-mark)
+       (push-tag-mark))
+
       (semantic-decoration-include-visit)
       )