summaryrefslogtreecommitdiff
path: root/.config/emacs/modules/bd--image.el
blob: 3dd252631ce870fb036e2102b60f6e725436c748 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
;; -*- lexical-binding: t; -*-


(require 'image-mode)
(defun toggle-mode-line ()
  "If the mode line is displayed, toggle it off.
If the mode line is off, set it to the default value."
  (interactive)
  (setq mode-line-format
        (if mode-line-format
            nil
          (default-value 'mode-line-format))))


;;;; hooks
(add-hook 'image-mode-hook 'toggle-mode-line)


;;;; binds
(keymap-set image-mode-map "l" #'toggle-mode-line)


(provide 'bd--image)