Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions god-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,18 @@ If it was not active when `god-local-mode-pause' was called, nothing happens."
(god-local-mode -1)))

;;;###autoload
(defun god-mode-all ()
"Toggle `god-local-mode' in all buffers."
(defun god-mode-all (&optional arg)
"Toggle `god-local-mode' in all buffers.

If called from Lisp, toggle the mode if ARG is nil. Enable the
mode if ARG is zero or a positive number. Disable the mode if
ARG is a negative number."
(interactive)
(let ((new-status (if (bound-and-true-p god-local-mode) -1 1)))
(let ((new-status
(cond
((null arg) (if (bound-and-true-p god-local-mode) -1 1))
((> 0 arg) -1)
(t 1))))
(setq god-global-mode t)
(mapc (lambda (buffer)
(with-current-buffer buffer
Expand Down