[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gtags.el: run mode hooks as the last thing
From: |
Shigio YAMAGUCHI |
Subject: |
Re: gtags.el: run mode hooks as the last thing |
Date: |
Thu, 18 Aug 2011 09:02:13 +0900 |
Hi
You are right. I was my mistake.
It will be fixed in the next release.
Thank you.
>
> Hi -
>
> After the changes in the default key and mouse mappings in the recent
> versions of gtags.el, the mode hooks are no longer the last thing run when
> entering the mode. If I wanted to have gtags-suggested-key-mapping t, but
> disable or modify some key mapping in a hook, it would not be possible.
> It's a minor thing, but I think the correct order would be as in the patch
> below.
>
> BR,
> Jani.
>
>
> --- gtags.orig 2011-08-17 11:07:47.982839234 +0300
> +++ gtags.el 2011-08-17 11:08:34.582839262 +0300
> @@ -688,7 +688,6 @@
> (setq gtags-mode
> (if (null forces) (not gtags-mode)
> (> (prefix-numeric-value forces) 0)))
> - (run-hooks 'gtags-mode-hook)
> ; Suggested key mapping
> (if gtags-suggested-key-mapping
> (progn
> @@ -712,6 +711,7 @@
> (define-key gtags-mode-map [mouse-3] 'gtags-pop-stack)
> (define-key gtags-mode-map [mouse-2] 'gtags-find-tag-by-event)))
> )
> + (run-hooks 'gtags-mode-hook)
> )
>
> ;; make gtags select-mode
> @@ -737,7 +737,6 @@
> (setq gtags-current-buffer (current-buffer))
> (goto-char (point-min))
> (message "[GTAGS SELECT MODE] %d lines" (count-lines (point-min)
> (point-max)))
> - (run-hooks 'gtags-select-mode-hook)
> ; Mouse key mapping
> (if gtags-suggested-key-mapping
> (progn
> @@ -748,6 +747,7 @@
> (define-key gtags-select-mode-map [mouse-3] 'gtags-pop-stack)
> (define-key gtags-select-mode-map [mouse-2]
> 'gtags-select-tag-by-event)))
> )
> + (run-hooks 'gtags-select-mode-hook)
> )
>
> (provide 'gtags)
>
> _______________________________________________
> Bug-global mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-global
--
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663 C4B6 3CA5 BBB3 57BE DDA3