bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#4310: Flymake standardizing(slightly) patch


From: Lars Ingebrigtsen
Subject: bug#4310: Flymake standardizing(slightly) patch
Date: Sun, 28 Feb 2016 17:44:22 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Jimmy Yuen Ho Wong <wyuenho@gmail.com> writes:

> I was frustrated with the fact that flymake-mode is the one minor-mode
> that I use often and complicated enough but doesn't come with anyway
> to extend it with hooks or keymaps. So I've patch the trunk flymake.el
> to be a little more emacsy.
>
> I've added a default keymap and a minor-mode hook to flymake, I was
> hoping this will make it into the next Emacs version.

[...]

> +(defvar flymake-prefix-map
> +  (let ((map (make-sparse-keymap)))
> +    (define-key map "s" 'flymake-start-syntax-check)
> +    (define-key map "n" 'flymake-goto-next-error)
> +    (define-key map "p" 'flymake-goto-prev-error)
> +    (define-key map "m" 'flymake-display-err-menu-for-current-line)
> +    map))
> +
> +(defvar flymake-mode-map
> +  (let ((map (make-sparse-keymap)))
> +    (define-key map "\C-c;" flymake-prefix-map)
> +    map)
> +  "The keymap provides the default flymake-mode bindings.")
> +
> +(defvar flymake-mode-hook nil
> +  "Mode hook for `flymake-mode`. This hook is run __before__
> +syntax check happens, but after all the initialization is done.")

As Glenn said, the hook isn't needed, but I think the minor mode map
might make sense.

I've never used flymake, though, so I can't really say.  Anybody?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]