Hi there. I know this question is covered in the FAQ, and I've tried
everything I can think of to fix the problem. When I start emacs or
xemacs I get the error:
(1) (initialization/error) An error has occurred while loading ~/.emacs:
Symbol's value as variable is void: semantic
After editing my .emacs file, I got this error right away, so I read
through the faq and troubleshooting guides to see what might be going
wrong. I removed the old jde from xemacs and tried again. It still
didn't work. I then removed the old speedbar, and it still doesn't work.
I did a find / -name '*jde*' and removed anything that wasn't in
/usr/share/emacs/site-lisp/jde-2.2.0. I'm stumped because I'm pretty
sure that I have removed all old references of the elisp, but I still
get the error. I saw a suggestion to byte-compile everything that jde
relies on - is there a simple way to do that? What is every elist file
jde relies on? And here's the real boner question, how do I byte-complie
an elisp package?
Here's the backtrace output:
Signaling: (void-variable semantic)
byte-code("..." [nil (byte-code "��!?" [require working] 2) ((error
...)) require semantic-util defgroup semantic "File and tag browser
frame."] 4)
load-internal("semantic" nil t nil nil nil)
load("semantic" nil t nil)
require(semantic)
load-internal("jde-parse" nil t nil nil nil)
load("jde-parse" nil t nil)
require(jde-parse)
load-internal("jde-db" nil t nil nil nil)
load("jde-db" nil t nil)
require(jde-db)
load-internal("jde" nil t nil nil nil)
load("jde" nil t nil)
require(jde)
load-internal("~/.emacs" t t t nil nil)
load("~/.emacs" t t t)
load-user-init-file("")
load-init-file()
command-line()
normal-top-level()
Here's my system:
Debian Gnu/Linux kernel 2.2.17 with emacs 19, 20, and xemacs21.
I downloaded and installed speedbar 0.12, semantic 1.2.1, and jde 2.2.0.
And the contents of my .emacs file:
(custom-set-variables
'(font-menu-ignore-scaled-fonts t)
'(font-lock-maximum-decoration 2)
'(column-number-mode t)
'(gnuserv-program (concat exec-directory "/gnuserv"))
'(bar-cursor t)
'(make-backup-files nil)
'(font-menu-this-frame-only-p nil)
'(toolbar-visible-p nil)
'(nnmail-spool-file "/var/spool/mail/$user")
'(line-number-mode t)
'(font-lock-mode t nil (font-lock)))
(custom-set-faces
'(default ((t (:family "Fixed" :size "10pt"))) t))
;;(custom-set-variables
;; '(gnuserv-program (concat exec-directory "/gnuserv"))
;; '(bar-cursor t)
;; '(make-backup-files nil)
;; '(nnmail-spool-file "/var/spool/mail/$user")
;; '(font-lock-mode t nil (font-lock)))
;;(custom-set-faces
;; '(default ((t (:size "10pt"))) t))
;; Java support
(add-to-list 'load-path (expand-file-name
"/usr/share/emacs/site-lisp/semantic-1.2.1"))
(add-to-list 'load-path (expand-file-name
"/usr/share/emacs/site-lisp/speedbar-0.12"))
(add-to-list 'load-path (expand-file-name
"/usr/share/emacs/site-lisp/jde-2.2.0/lisp"))
(require 'jde)
(defun my-jde-mode-hook ()
;;(setq c-auto-newline t)
(define-key c-mode-base-map "\C-m" 'newline-and-indent)
(message "jde-hook function executed"))
(add-hook 'jde-mode-hook 'my-jde-mode-hook)
;; set bash as the default shell (this may fix the path bug)
(setq shell-file-name "bash")
(setq shell-command-switch "-c")
(setq explicit-shell-file-name shell-file-name)
(setenv "SHELL" shell-file-name)