top | item 40780408

(no title)

michaelhoffman | 1 year ago

This used to be the case until Emacs 24.1, in 2012.

    Passing a nil argument to a minor mode function call now ENABLES
    the minor mode unconditionally.  This is so that you can write e.g.
    
        (add-hook 'text-mode-hook #'foo-mode)
    
    to enable foo-mode in Text mode buffers, removing the need for
    'turn-on-foo-mode' style functions.  This affects all mode commands
    defined by 'define-minor-mode'.  If called interactively, the mode
    command still toggles the minor mode.

discuss

order

No comments yet.