David PONCE <mailto:david.ponce@wanadoo.fr> wrote:
> Hi Igor,
>
>> I have a test1.c source file, which includes another test2.h file.
>>
>> When I do semantic-complete-jump, with a tag, that is specified in
>> .h, it throws wrong type argument: overlayp [x y] with x and y some
>> numbers.
>>
>> If I open test2.c file whose test2.h file is included in test1.c,
>> everything works ok.
>>
>> backtrace:
>> Debugger entered--Lisp error: (wrong-type-argument overlayp [86897
>>   89161]) semantic-overlay-get([86897 89161] face)
>>   semantic-highlight-tag(("IpcCloseConnection" function
> (:arguments (...)
>>> type "int") nil [86897 89161]) nil)
>>   semantic-momentary-highlight-tag(("IpcCloseConnection" function
>> (:arguments (...) :type "int") nil [86897 89161]))
>>   semantic-complete-jump()
>> * call-interactively(semantic-complete-jump)
>
> It looks like your test2.h file hasn't been loaded in a buffer when
> referenced from test1.c, so the overlays haven't been created.
>
> However I am not sure why that occurred.  Probably Eric knows much
> more on that aspect of semantic ;-)
>
> Could you tell us which version of Emacs/cedet/semantic you are using,
> and post your test files (and related directory structure), so we
> could try to reproduce the error?

emacs 21.3.1 on win2k, cedet-1.0beta3a.

I've used name testxx.x as an example, but I did not reproduce problem
on test files. This happens on my work project, and I cannot give
away code.

I'll try to reproduce it with test files (If I find the time).

Could that loading of .h file have to do something with some settings?

This is my .emacs:
---------------
(custom-set-variables
  ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 '(blink-cursor nil)
 '(case-fold-search t)
 '(clearcase-checkout-arguments (quote ("-unre")))
 '(column-number-mode t)
 '(current-language-environment "Latin-1")
 '(default-input-method "latin-1-prefix")
 '(ecb-auto-activate t)
 '(ecb-auto-expand-tag-tree (quote expand-spec))
 '(ecb-auto-expand-tag-tree-collapse-other (quote only-if-on-tag))
 '(ecb-display-image-icons-for-semantic-tags t)
 '(ecb-expand-methods-switch-off-auto-expand nil)
 '(ecb-layout-name "igor2")
 '(ecb-methods-nodes-expand-spec (quote (type function section nonterminal keyword token)))
 '(ecb-options-version "2.27")
 '(ecb-source-path (quote ("Y:\\src")))
 '(ecb-tip-of-the-day nil)
 '(ecb-tree-buffer-style (quote ascii-guides))
 '(ecb-window-sync (quote (Info-mode dired-mode)))
 '(ecb-window-sync-delay 0.25)
 '(ecb-windows-width 0.2)
 '(global-font-lock-mode t nil (font-lock))
 '(semantic-imenu-auto-rebuild-directory-indexes nil)
 '(semanticdb-project-roots (quote ("Y:\\src")))
 '(show-paren-mode t nil (paren))
 '(tool-bar-mode nil nil (tool-bar))
 '(transient-mark-mode t)
 '(truncate-partial-width-windows nil)
 '(which-function-mode nil nil (which-func))
 '(x-stretch-cursor t))
(custom-set-faces
  ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 '(default ((t (:stipple nil :background "#ffffff" :foreground "#000000" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 120 :width normal :family "outline-proggysquarett"))))

 '(cursor ((t (:background "red" :foreground "white"))))
 '(font-lock-builtin-face ((((class color) (background light)) (:foreground "black"))))
 '(font-lock-comment-face ((((class color) (background light)) (:foreground "blue"))))
 '(font-lock-constant-face ((((class color) (background light)) (:foreground "red"))))
 '(font-lock-doc-face ((t (:foreground "blue"))))
 '(font-lock-function-name-face ((((class color) (background light)) (:foreground "red"))))
 '(font-lock-keyword-face ((((class color) (background light)) (:foreground "darkred"))))
 '(font-lock-string-face ((((class color) (background light)) (:foreground "darkgreen"))))
 '(font-lock-type-face ((((class color) (background light)) (:foreground "steelblue"))))
 '(font-lock-variable-name-face ((((class color) (background light)) (:foreground "magenta4"))))
 '(tooltip ((((class color)) (:background "lightyellow" :foreground "black" :family "proggy clean")))))

(setq-default indent-tabs-mode nil)   ; always replace tabs with spaces
(setq-default tab-width 4)            ; set tab width to 4 for all buffers
(setq-default c-basic-offset 4)
(setq font-lock-support-mode 'lazy-lock-mode)

(defun ob-c-mode-common-hook ()
  ;; my customizations for all of c-mode, c++-mode, objc-mode, java-mode
  (c-set-offset 'substatement-open 0)
  (c-set-offset 'statement-block-intro 4)
  (c-set-offset 'defun-block-intro 4)
  (c-set-offset 'statement-case-intro 4)
  (c-set-offset 'arglist-close 0)
  (c-set-offset 'arglist-intro 4)
  (c-set-offset 'c 0)
  (c-set-offset 'arglist-cont-nonempty 4)
  ;; other customizations can go here
  )

(add-hook 'c-mode-common-hook 'ob-c-mode-common-hook)
(add-hook 'ob-c-mode-common-hook 'turn-on-font-lock)

(load-file "~/.emacs.d/clearcase.el")
(define-key global-map "\C-cp" 'clearcase-ediff-pred-current-buffer)
(define-key global-map "\C-cb" 'clearcase-gui-vtree-browser-current-buffer)

;; Configuration variables here:
;;(setq semantic-load-turn-useful-things-on t)
;; Load CEDET
(load-file "~/.emacs.d/cedet-1.0beta3a/common/cedet.el")

(add-to-list 'load-path
             "~/.emacs.d/ecb-2.27")

(require 'eldoc)
(require 'ecb)
(require 'semantic-ia)

(cond ((require 'ecb)
       (define-key global-map "\C-cl" 'ecb-toggle-ecb-windows)
       ))

(define-key global-map "\M-g" 'goto-line)
(define-key global-map "\M-o" 'occur)
(define-key global-map "\M-n" 'revert-buffer)
(define-key global-map "\C-xar" 'replace-regexp)

(setq-default senator-minor-mode t)

;(setq debug-on-error '(wrong-type-argument))
-----------------


--
Igor Lautar, OB MA Team
tel: +386 1 586 5115
e-mail: igor.lautar@hermes.si