hl-highlight-mode is a global minor mode, and you can't disable a global minor mode on a per-buffer basis -- only buffer-local minor modes work that way. A global mode is either on or off globally.
Original answer about buffer-local minor modes follows...
The docstring at C-hf
hl-highlight-mode should tell you exactly what its argument does, so just follow that information.
In recent versions of Emacs, modes defined by
define-minor-mode are explicitly enabled when called from elisp with a
This is to ensure consistent behaviour for the likes of
(add-hook 'HOOK 'MINORMODEFUNCTION) -- which results in MINORMODEFUNCTION being called without its optional argument, which is the same thing as passing it an argument of
i.e. your code:
is equivalent to:
(add-hook 'org-agenda-mode-hook 'hl-highlight-mode)
Prior to that, a
nil argument to a minor mode function would toggle the mode (just like calling the mode interactively); but that might be toggling it on or off depending on circumstances, so it wasn't a dependable thing to use in non-interactive cases.
In general a positive numeric argument enables a minor mode, and a non-positive (<= 0) argument disables it. In practice one mostly sees values of
-1 used to disable modes. For modes defined by
define-minor-mode there is no difference between those two values.
Note that if
hl-highlight-mode were being enabled via a globalized minor mode, it's trickier, and you may need to use
(defun my-inhibit-globalized-hl-highlight-mode ()
"Counter-act a globalized hl-highlight-mode."
(lambda () (hl-highlight-mode 0))
(add-hook 'org-agenda-mode-hook 'my-inhibit-globalized-hl-highlight-mode)
See also https://stackoverflow.com/q/6837511