branch: elpa/helm
commit ce29722e518b6a6c3c260ef90f7cbf2628104e28
Author: Thierry Volpiatto <thie...@posteo.net>
Commit: Thierry Volpiatto <thie...@posteo.net>

    Use major-mode-remap-alist to determine the major mode (#2658)
    
    on buffer creation.
---
 helm-buffers.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/helm-buffers.el b/helm-buffers.el
index e8f3c50c0d..6a6669b54c 100644
--- a/helm-buffers.el
+++ b/helm-buffers.el
@@ -36,6 +36,7 @@
 (defvar dired-buffers)
 (defvar org-directory)
 (defvar helm-ff-default-directory)
+(defvar major-mode-remap-alist)
 
 
 (defgroup helm-buffers nil
@@ -335,6 +336,9 @@ Note that this variable is buffer-local.")
                           when (string-match r candidate)
                           return m)))
         (buffer (get-buffer-create candidate)))
+    (helm-aif (and (boundp 'major-mode-remap-alist)
+                   (cdr (assq mjm major-mode-remap-alist)))
+      (setq mjm it))
     (if mjm
         (with-current-buffer buffer (funcall mjm))
       (set-buffer-major-mode buffer))

Reply via email to