Gered
5ab38869db
when cycling through buffers, skip over a bunch of built-in emacs buffers. as well, skip over dired-sidebar-mode buffers, as these get super annoyingly mixed in all over the place at times
7 lines
258 B
EmacsLisp
7 lines
258 B
EmacsLisp
(defun buffer-mode (&optional buffer-or-name)
|
|
"Returns the major mode associated with a buffer. If buffer-name is ni, return
|
|
current buffer's mode."
|
|
(buffer-local-value
|
|
'major-mode
|
|
(if buffer-or-name (get-buffer buffer-or-name) (current-buffer))))
|