Matt Briggs
Matt Briggs

Reputation: 42208

how to bind "next tag" / "prev tag" in emacs

Sort of an emacs noob, I am looking for how to bind the equivilent of C-u M-. to M-right, and C-u M-* to M-left, but I have now idea what is being called with the C-u modifier. When I describe-key on it, it says "universal-argument", and talks about adding numeric modifiers to other functions, which is totally not whats happening in this case.

Upvotes: 0

Views: 785

Answers (2)

Grayscale
Grayscale

Reputation: 73

Insert this in your init-file (.emacs)

(defun testfnc ()
  (interactive)
  (let ((current-prefix-arg 4))
    (call-interactively 'find-tag)
    )
  )

(global-unset-key (kbd "M-,"))
(global-set-key (kbd "M-,") 'testfnc)

Upvotes: 1

choroba
choroba

Reputation: 241918

Looking at the documentation of find-tag, it seems that C-u M-. corresponds to (find-tag TAGNAME t). I cannot find any difference between M-* and C-u M-*, but maybe you have a different version of Emacs?

Upvotes: 2

Related Questions