How can I automate Emacs jtags-mode?

Using jtags-mode(version 0.96) via ELPA in the development version of Emacs 24+, I can’t turn on the software small mode (manual start works fine). Before I talk about the details with what I tried and the setup that I expect to work, the bottom line is that after adding jtags-modeJava hook to the variable, I get the following complaint from Emacs when I first see the Java Source File:

Toggling jtags-mode off; better pass an explicit argument. [2 times]

After carefully reading the configuration documentation, jtags-modeI expected the following to be sufficient:

;; Support for Java coding. 
(autoload 'jtags-mode "jtags" "Toggle jtags mode." 1)

(defun java-setup ()
  (setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92)
    indent-tabs-mode nil
    tab-width 4
    fill-column 96
    c-comment-start-regexp "\\(@\\|/\\(/\\|[*][*]?\\)\\)"
    jtags-display-menu-flag t
    jtags-mode 1)
  (java-mode-indent-annotations-setup))

(add-hook 'java-mode-hook 'java-setup)
(add-hook 'java-mode-hook 'jtags-mode)
...

But this led to the complaint above. Since then, I tried to call jtags-modedirectly in the function java-setup(), but to no avail.

, , .

+3
2

xxx-mode , .. , , . hook, , . turn-on-xxx-mode, .

1 -1 . , jtags-mode hook

. , jtags-mode 1, . :

(defun java-setup ()
  (setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92)
    indent-tabs-mode nil
    tab-width 4
    fill-column 96
    c-comment-start-regexp "\\(@\\|/\\(/\\|[*][*]?\\)\\)"
    jtags-display-menu-flag t)
  (jtags-mode 1)
  (java-mode-indent-annotations-setup))

(add-hook 'java-mode-hook 'java-setup)

, . jtags-mode, , .

+4

BTW, jtags-mode Emacs-24, , Emacs-24 , . - , , .

0

All Articles