Skip to content

Commit

Permalink
tweak(binary): simplify condition
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed May 31, 2023
1 parent 19c78b5 commit 0b85122
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions elisp/+binary.el
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,8 @@ Returns either nil, or the position of the first null byte."
"If `hexl-mode' is not already active, and the current buffer
is binary, activate `hexl-mode'."
(interactive)
(unless (eq major-mode 'hexl-mode)
(when (+binary-hexl-buffer-p)
(hexl-mode))))
(when (and (not (eq major-mode 'hexl-mode)) (+binary-hexl-buffer-p))
(hexl-mode 1)))

;;;###autoload
(defun +binary-setup-modes ()
Expand Down

0 comments on commit 0b85122

Please sign in to comment.