Skip to content

Instantly share code, notes, and snippets.

@xuchunyang
Created July 28, 2015 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xuchunyang/9296e3d1469416124bcb to your computer and use it in GitHub Desktop.
Save xuchunyang/9296e3d1469416124bcb to your computer and use it in GitHub Desktop.
(defun show-major-mode-name-action (candidate)
(with-current-buffer candidate
(unless (eq major-mode 'messages-buffer-mode)
(message "The major-mode name of buffer at the cursor is %S"
major-mode))))
(helm :sources (helm-build-sync-source "buffers"
:candidates '("*scratch*" "*Messages*")
:action #'show-major-mode-name-action))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment