mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Don't automatically add the modes to auto-mode-alist.
This commit is contained in:
parent
fdb9ff880c
commit
205c74c2c2
2 changed files with 2 additions and 26 deletions
|
@ -10,6 +10,7 @@
|
|||
;;;
|
||||
;;; (add-to-list 'load-path "/path/to/haml-mode.el")
|
||||
;;; (require 'haml-mode nil 't)
|
||||
;;; (add-to-list 'auto-mode-alist '("\\.sass$" . sass-mode))
|
||||
;;;
|
||||
|
||||
;;; Code:
|
||||
|
@ -47,14 +48,6 @@
|
|||
(if (= n 0) ""
|
||||
(concat str (string-* str (- n 1)))))
|
||||
|
||||
(defun find-if (f lst)
|
||||
"Returns the first element of a list for which a function
|
||||
returns a non-nil value, or nil if no such element is found."
|
||||
(while (not (or (null lst)
|
||||
(apply f (list (car lst)))))
|
||||
(setq lst (cdr lst)))
|
||||
(if (null lst) nil (car lst)))
|
||||
|
||||
(defun hre (str)
|
||||
"Prepends a Haml-tab-matching regexp to str."
|
||||
(concat "^\\(" (string-* " " haml-indent-offset) "\\)*" str))
|
||||
|
@ -245,9 +238,4 @@ immediately previous multiple of `haml-indent-offset' spaces."
|
|||
|
||||
(provide 'haml-mode)
|
||||
|
||||
(unless (find-if
|
||||
#'(lambda(it) (string= it "\\.haml\\'"))
|
||||
(mapcar 'car auto-mode-alist))
|
||||
(add-to-list 'auto-mode-alist '("\\.haml\\'" . haml-mode)))
|
||||
|
||||
;;; haml-mode.el ends here
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
;;;
|
||||
;;; (add-to-list 'load-path "/path/to/sass-mode.el")
|
||||
;;; (require 'sass-mode nil 't)
|
||||
;;; (add-to-list 'auto-mode-alist '("\\.sass$" . sass-mode))
|
||||
;;;
|
||||
|
||||
;;; Code:
|
||||
|
@ -45,13 +46,6 @@
|
|||
(if (= n 0) ""
|
||||
(concat str (string-* str (- n 1)))))
|
||||
|
||||
(defun find-if (f lst)
|
||||
"Returns the first element of a list for which a function returns a non-nil value, or nil if no such element is found."
|
||||
(while (not (or (null lst)
|
||||
(apply f (list (car lst)))))
|
||||
(setq lst (cdr lst)))
|
||||
(if (null lst) nil (car lst)))
|
||||
|
||||
(defun sre (str)
|
||||
"Prepends a Sass-tab-matching regexp to str."
|
||||
(concat "^\\(" (string-* " " sass-indent-offset) "\\)*" str))
|
||||
|
@ -165,10 +159,4 @@ immediately previous multiple of `sass-indent-offset' spaces."
|
|||
|
||||
(provide 'sass-mode)
|
||||
|
||||
|
||||
(unless (find-if
|
||||
#'(lambda(it) (string= it "\\.sass\\'"))
|
||||
(mapcar 'car auto-mode-alist))
|
||||
(add-to-list 'auto-mode-alist '("\\.sass\\'" . sass-mode)))
|
||||
|
||||
;;; sass-mode.el ends here
|
||||
|
|
Loading…
Add table
Reference in a new issue