Skip to content

Commit

Permalink
Fix unreliable hooks (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudolf Adamkovič committed May 5, 2021
1 parent 229b0df commit e08a5ed
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/README.md
Expand Up @@ -149,13 +149,10 @@ You can change the cursor style to indicate whether God mode is active as
follows:

```emacs-lisp
(defun my-god-mode-update-cursor ()
(setq cursor-type (if (or god-local-mode buffer-read-only)
'box
'bar)))
(defun my-god-mode-update-cursor-type ()
(setq cursor-type (if (or god-local-mode buffer-read-only) 'box 'bar)))
(add-hook 'god-mode-enabled-hook #'my-god-mode-update-cursor)
(add-hook 'god-mode-disabled-hook #'my-god-mode-update-cursor)
(add-hook 'post-command-hook #'my-god-mode-update-cursor-type)
```

## Change mode line color
Expand All @@ -173,8 +170,7 @@ whether God mode is active as follows:
(set-face-background 'mode-line (if limited-colors-p "black" "#0a2832"))
(set-face-background 'mode-line-inactive (if limited-colors-p "black" "#0a2832")))))))
(add-hook 'god-mode-enabled-hook #'my-god-mode-update-mode-line)
(add-hook 'god-mode-disabled-hook #'my-god-mode-update-mode-line)
(add-hook 'post-command-hook 'my-god-mode-update-mode-line)
```

## `overwrite-mode`
Expand Down

0 comments on commit e08a5ed

Please sign in to comment.