[Emacs] 80 chars
This commit is contained in:
parent
fe057ac3ff
commit
ddc7489ef5
@ -945,17 +945,21 @@ this macro allows you to define a blacklist for your major mode that will
|
|||||||
prevent the major mode from being enabled on that file.
|
prevent the major mode from being enabled on that file.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defmacro imalison:add-blacklist-to-major (major-mode-fn-symbol)
|
(defmacro imalison:add-blacklist-to-major (major-mode-fn-symbol)
|
||||||
(let ((blacklist-var-symbol (imalison:concat-symbols major-mode-fn-symbol "-blacklist"))
|
(let ((blacklist-var-symbol
|
||||||
(check-blacklist-symbol (imalison:concat-symbols major-mode-fn-symbol "-check-blacklist")))
|
(imalison:concat-symbols major-mode-fn-symbol "-blacklist"))
|
||||||
|
(check-blacklist-symbol
|
||||||
|
(imalison:concat-symbols major-mode-fn-symbol "-check-blacklist")))
|
||||||
`(progn
|
`(progn
|
||||||
(defvar ,blacklist-var-symbol nil)
|
(defvar ,blacklist-var-symbol nil)
|
||||||
(defun ,check-blacklist-symbol (mode-fn &rest args)
|
(defun ,check-blacklist-symbol (mode-fn &rest args)
|
||||||
(unless (and (not (equal major-mode (quote ,major-mode-fn-symbol)))
|
(unless (and (not (equal major-mode (quote ,major-mode-fn-symbol)))
|
||||||
(equal nil args)
|
(equal nil args)
|
||||||
(cl-loop for blacklist-regex in ,blacklist-var-symbol
|
(cl-loop for blacklist-regex in ,blacklist-var-symbol
|
||||||
thereis (string-match blacklist-regex (buffer-name))))
|
thereis (string-match blacklist-regex
|
||||||
|
(buffer-name))))
|
||||||
(apply mode-fn args)))
|
(apply mode-fn args)))
|
||||||
(advice-add (quote ,major-mode-fn-symbol) :around (quote ,check-blacklist-symbol)))))
|
(advice-add (quote ,major-mode-fn-symbol)
|
||||||
|
:around (quote ,check-blacklist-symbol)))))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Other
|
** Other
|
||||||
The stuff in this section is pretty crusty. I don't think its used anywhere, but
|
The stuff in this section is pretty crusty. I don't think its used anywhere, but
|
||||||
@ -1535,8 +1539,7 @@ I don't have any use for this now that I use frames mode, but its an interesting
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
** stream
|
** stream
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package stream
|
(use-package stream :defer t)
|
||||||
:defer t)
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** tile
|
** tile
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
Loading…
Reference in New Issue
Block a user