summaryrefslogtreecommitdiffstats
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Tom Willemse2016-01-08 11:41:05 +0100
committerGravatar Tom Willemse2016-01-08 11:41:05 +0100
commit585fcf65f6cd61c2926a8b51c8eb15725689b63e (patch)
tree2e789c1d84fffee47f818afbbed4d07e83d46364 /emacs
parente4637aa9f9cfd05992c3ba0a8ced2119e6ab9d5c (diff)
downloaddotfiles-585fcf65f6cd61c2926a8b51c8eb15725689b63e.tar.gz
dotfiles-585fcf65f6cd61c2926a8b51c8eb15725689b63e.zip
Separate lui config
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/Makefile4
-rw-r--r--emacs/.emacs.d/init-circe.org25
-rw-r--r--emacs/.emacs.d/init-lui.org55
3 files changed, 57 insertions, 27 deletions
diff --git a/emacs/.emacs.d/Makefile b/emacs/.emacs.d/Makefile
index 0a4357a..753711e 100644
--- a/emacs/.emacs.d/Makefile
+++ b/emacs/.emacs.d/Makefile
@@ -4,7 +4,7 @@ EARGS = -Q -batch -l package -L site-lisp/
AUTOLOADS_FILE=site-lisp/site-autoloads.el
UNWANTED=$(AUTOLOADS_FILE) site-lisp/flycheck_% site-lisp/flycheck-%
SITE_LISPS = $(addsuffix c,$(filter-out $(UNWANTED),$(wildcard site-lisp/*.el))) \
- site-lisp/circe-init.elc
+ site-lisp/circe-init.elc site-lisp/lui-init.elc
.PHONY: all site-lisp snippets
all: init2.elc init.elc $(AUTOLOADS_FILE) $(SITE_LISPS) snippets
@@ -25,7 +25,7 @@ init.el: init2.el
init2.el: init.org
$(call tangle)
-site-lisp/circe-init.el: init-circe.org
+site-lisp/%-init.el: init-%.org
$(call tangle)
### Site Lisp
diff --git a/emacs/.emacs.d/init-circe.org b/emacs/.emacs.d/init-circe.org
index ba0ddb8..56655a3 100644
--- a/emacs/.emacs.d/init-circe.org
+++ b/emacs/.emacs.d/init-circe.org
@@ -16,7 +16,6 @@ wanted it. So now I use Circe.
#+BEGIN_SRC emacs-lisp
(require 'auth-source)
- (require 'lui)
(require 'circe)
(require 's)
#+END_SRC
@@ -162,30 +161,6 @@ wanted it. So now I use Circe.
:nickserv-password oni:circe-nickserv-password)))
#+END_SRC
-* Change the time-stamp
-
- I use only a small window to view the IRC channel I'm in usually,
- the default format put the time-stamp just a little too far to the
- right and would always cause either line truncation or filling to
- the next line. So I put the time-stamp in the right margin so it's
- always to the right of all messages and no messages can run under
- it, so essentially it has it's own column.
-
- #+BEGIN_SRC emacs-lisp
- (setq lui-time-stamp-position 'right-margin)
- (setq lui-time-stamp-format "%H:%M")
- #+END_SRC
-
- Give the right margin just enough room to show the time-stamps, no
- more, no less.
-
- #+BEGIN_SRC emacs-lisp
- (defun oni:set-circe-margin-width ()
- (setq right-margin-width 5))
-
- (add-hook 'lui-mode-hook #'oni:set-circe-margin-width)
- #+END_SRC
-
* Clean-up the channel buffers further
When chatting with people in an IRC channel, there really isn't much
diff --git a/emacs/.emacs.d/init-lui.org b/emacs/.emacs.d/init-lui.org
new file mode 100644
index 0000000..220b075
--- /dev/null
+++ b/emacs/.emacs.d/init-lui.org
@@ -0,0 +1,55 @@
+#+PROPERTY: tangle site-lisp/lui-init.el
+#+STARTUP: content
+
+Since starting to use Circe I've also tried using the lui library on
+another project: emacs-slack. This has caused lui to be loaded without
+circe being loaded, so my lui customizations need to be loaded
+separately when lui is loaded, not when circe is loaded.
+
+* Enable lexical binding
+
+ #+BEGIN_SRC emacs-lisp :padline no
+ ;; -*- lexical-binding: t -*-
+ #+END_SRC
+
+* Require the needed libraries
+
+ In order to keep compiler warnings to a minimum, I require the
+ libraries that are used in this configuration.
+
+ #+BEGIN_SRC emacs-lisp
+ (require 'lui)
+ #+END_SRC
+
+* Change the time-stamp
+
+ I use only a small window to view the IRC channel I'm in usually,
+ the default format put the time-stamp just a little too far to the
+ right and would always cause either line truncation or filling to
+ the next line. So I put the time-stamp in the right margin so it's
+ always to the right of all messages and no messages can run under
+ it, so essentially it has it's own column.
+
+ #+BEGIN_SRC emacs-lisp
+ (setq lui-time-stamp-position 'right-margin)
+ (setq lui-time-stamp-format "%H:%M")
+ #+END_SRC
+
+ Give the right margin just enough room to show the time-stamps, no
+ more, no less.
+
+ #+BEGIN_SRC emacs-lisp
+ (defun oni:set-circe-margin-width ()
+ (setq right-margin-width 5))
+
+ (add-hook 'lui-mode-hook #'oni:set-circe-margin-width)
+ #+END_SRC
+
+* Provide the right feature
+
+ In order to be able to use =(require 'lui-init)= we must first
+ =provide= it.
+
+ #+BEGIN_SRC emacs-lisp
+ (provide 'lui-init)
+ #+END_SRC