emacs: Move pp^L configuration to org

This commit is contained in:
Tom Willemsen 2013-02-17 22:22:55 +01:00
parent b9c0e3838f
commit 3e5421e79d
3 changed files with 108 additions and 86 deletions

View file

@ -151,8 +151,6 @@
(setq php-function-call-face 'font-lock-function-name-face) (setq php-function-call-face 'font-lock-function-name-face)
(setq php-mode-force-pear t) (setq php-mode-force-pear t)
(setq pony-tpl-indent-moves t) (setq pony-tpl-indent-moves t)
(setq pp^L-^L-string-function 'oni:pretty-control-l-function)
(setq pp^L-^L-string-pre nil)
(setq rainbow-delimiters-max-face-count 12) (setq rainbow-delimiters-max-face-count 12)
(setq redisplay-dont-pause t) (setq redisplay-dont-pause t)
(setq send-mail-function 'smtpmail-send-it) (setq send-mail-function 'smtpmail-send-it)

View file

@ -216,7 +216,38 @@
'(python-pylint python-pyflakes)))) '(python-pylint python-pyflakes))))
#+END_SRC #+END_SRC
** Eshell * pretty-control-l-mode
Make the ~C-l~ look like a line of ~-~ up to =fill-column= or
=fci-rule-column= and remove the string displayed before the ~C-l~.
#+BEGIN_SRC emacs-lisp :tangle init2.el
(defun oni:pretty-control-l-function (win)
"Just make a string of either `fci-rule-column' or
`fill-column' length -1. Use the `-' character. WIN is ignored."
(make-string
(1- (if (boundp 'fci-rule-column)
fci-rule-column fill-column)) ?-))
(setq pp^L-^L-string-function 'oni:pretty-control-l-function)
#+END_SRC
Remove the string displayed before the ~C-l~.
#+BEGIN_SRC emacs-lisp :tangle init2.el
(setq pp^L-^L-string-pre nil)
#+END_SRC
Enable =pretty-control-l-mode= at startup and whenever a new frame is
created.
#+BEGIN_SRC emacs-lisp :tangle init2.el
(add-hook 'emacs-startup-hook 'pretty-control-l-mode)
(add-hook 'after-make-frame-functions
'(lambda (arg) (pretty-control-l-mode)))
#+END_SRC
* Eshell
Add ~unison~ to the list of =eshell-visual-commands= because it Add ~unison~ to the list of =eshell-visual-commands= because it
expects unbuffered input and eshell just doesn't give that. expects unbuffered input and eshell just doesn't give that.

View file

@ -369,13 +369,6 @@ When dealing with braces, add another line and indent that too."
(setq-local fci-rule-column 80) (setq-local fci-rule-column 80)
(flycheck-mode)) (flycheck-mode))
(defun oni:pretty-control-l-function (win)
"Just make a string of either `fci-rule-column' or
`fill-column' length -1. Use the `-' character. WIN is ignored."
(make-string
(1- (if (boundp 'fci-rule-column)
fci-rule-column fill-column)) ?-))
(defun oni:prog-mode-func () (defun oni:prog-mode-func ()
"Function for `prog-mode-hook'." "Function for `prog-mode-hook'."
(rainbow-delimiters-mode) (rainbow-delimiters-mode)