Commits (12)
......@@ -25,7 +25,7 @@
;; Force tmux title to "mail/news".
(cond ((and (string-equal (ft/host-system) "console")
(string-match "^screen" ft/term))
(string-match "^screen" (ft/term)))
(send-string-to-terminal "\ekmail/news\e\\")))
;; Tell me stuff.
......@@ -340,6 +340,8 @@ end of the text."
(interactive) (insert "\nKind Regards, Frank Terbeck\n"))
(defun ft/gnus-message-keys ()
evil-normal-state-local-map (kbd "TAB") 'ft/eudc-expand-inline)
evil-normal-state-local-map (kbd "zA") 'ft/message-attach-file)
......@@ -549,7 +549,41 @@ The basic offset is 4 spaces. 8 Spaces are replaced by a tab.")
"ft c style
Used for my pet projects; like taggit and cmc.
It indents by four spaces and is otherwise similar to the BSD style.")
(defconst ft/c-eclipsish
'((c-basic-offset . 4)
(tab-width . 4)
(c-special-indent-hook . smart-tab-indent-hook)
(indent-tabs-mode . t)
(c-comment-only-line-offset . 0)
(c-hanging-braces-alist . ((brace-list-open)
(substatement-open after)))
(c-hanging-colons-alist . ((access-label after)
(case-label after)
(label after)
(member-init-intro before)))
(c-cleanup-list . (defun-close-semi
(c-offsets-alist . ((arglist-close . c-lineup-arglist)
(block-open . 0)
(case-label . 0)
(inexpr-class . 0)
(inline-open . 0)
(inextern-lang . [0])
(innamespace . [0])
(knr-argdecl-intro . +)
(label . 0)
(statement-block-intro . +)
(statement-cont . +)
(substatement-label . 0)
(substatement-open . 0)))
(c-echo-syntactic-information-p . t))
"C/C++ style similar to Eclipse's default")
(c-add-style "ft" ft/c-style)
(c-add-style "eclipsish" ft/c-eclipsish)
(setq c-default-style '((java-mode . "java")
(awk-mode . "awk")
......@@ -934,6 +968,17 @@ It indents by four spaces and is otherwise similar to the BSD style.")
:states (insert replace)
:maps (eshell-mode-map)))))
(use-package eudc
:after ldap ivy
:map ("c m" ft/eudc-expand-inline :maps (ft/private-evil-map))
(defun ft/eudc-expand-inline (&optional replace)
(let ((completing-read-function #'ivy-completing-read))
(eudc-expand-inline replace)))
(setq eudc-server-hotlist '(("" . bbdb))))
(use-package font-lock
:config (setq font-lock-maximum-decoration '((t . t))))
......@@ -952,6 +997,12 @@ It indents by four spaces and is otherwise similar to the BSD style.")
(ft/bind-space (list evil-normal-state-map
(defun ft/buffer-file-name ()
(message "Buffer file name: %s" buffer-file-name))
(define-key ft/private-evil-map "f" 'ft/buffer-file-name)
(define-key ft/private-evil-map "u" 'universal-argument))
(use-package geiser
......@@ -1254,6 +1305,8 @@ buffer's working directory (which is available in the
(use-package keychain-environment
:commands keychain-update)
(use-package ldap)
(use-package ledger-mode
:ensure t
:commands ledger-mode
......@@ -1519,6 +1572,18 @@ the file as PDF."
(kbd "C-d") #'evil-scroll-down
(kbd "C-u") #'evil-scroll-up)
(add-hook 'org-mode-hook
(lambda ()
;; Strike-through is annoying with diff-stats in change logs.
(let ((name (file-name-base buffer-file-name))
(targets '("CHANGES" "ChangeLog")))
(when (member name targets)
(setq org-emphasis-alist '(("*" bold)
("/" italic)
("_" underline)
("=" org-verbatim verbatim)
("~" org-code verbatim)
("+" (:strike-through nil))))))))
(add-hook 'org-agenda-mode-hook (lambda () (hl-line-mode 1)))
(w/function org-babel-do-load-languages
......@@ -1526,7 +1591,11 @@ the file as PDF."
(mapcar (lambda (x)
(cons x t))
'(emacs-lisp haskell
maxima octave)))))
maxima octave)))))
(use-package org-ref
:ensure t
:after org)
(use-package ox-textile
:load-path "vendor/ox-textile"
......@@ -1641,6 +1710,44 @@ beginning of the next S-expression."
(setq show-paren-delay 0)
(setq show-paren-style 'parenthesis))
(use-package pdf-tools
:ensure t
:magic ("%PDF" . pdf-view-mode)
(evil-set-initial-state 'pdf-view-mode 'emacs)
(add-hook 'pdf-view-mode-hook
(lambda ()
(set (make-local-variable 'evil-emacs-state-cursor) (list nil))))
(pdf-tools-install :no-query)
(setq-default pdf-view-display-size 'fit-page)
(bind-keys :map pdf-view-mode-map
("g" . pdf-view-first-page)
("G" . pdf-view-last-page)
("l" . image-forward-hscroll)
("h" . image-backward-hscroll)
("j" . pdf-view-next-line-or-next-page)
("k" . pdf-view-previous-line-or-previous-page)
("J" . pdf-view-next-page)
("K" . pdf-view-previous-page)
("q" . pdf-view-goto-page)
("Q" . pdf-view-midnight-minor-mode)
("u" . pdf-view-revert-buffer)
("al" . pdf-annot-list-annotations)
("ad" . pdf-annot-delete)
("aa" . pdf-annot-attachment-dired)
("am" . pdf-annot-add-markup-annotation)
("at" . pdf-annot-add-text-annotation)
("y" . pdf-view-kill-ring-save)
("i" . pdf-misc-display-metadata)
("s" . pdf-occur)
("b" . pdf-view-set-slice-from-bounding-box)
("r" . pdf-view-reset-slice)))
(use-package org-pdfview
:ensure t
:after pdf-tools)
(use-package quack
:after scheme
:config (progn
......@@ -261,8 +261,8 @@ string `"%PDF"`.
## Hooks
The `:hook` keyword allows adding functions onto hooks, here only the basename
of the hook is required. Thus, all of the following are equivalent:
The `:hook` keyword allows adding functions onto package hooks. Thus,
all of the following are equivalent:
``` elisp
(use-package ace-jump-mode
......@@ -298,6 +298,20 @@ equivalent:
(add-hook 'text-mode-hook #'ace-jump-mode))
When using `:hook` omit the "-hook" suffix if you specify the hook
explicitly, as this is appended by default. For example the following
code will not work as it attempts to add to the `prog-mode-hook-hook`
which does not exist:
``` elisp
(use-package ace-jump-mode
:hook (prog-mode-hook . ace-jump-mode))
If you do not like this behaviour, set `use-package-hook-name-suffix`
to nil. By default the value of this variable is "-hook".
The use of `:hook`, as with `:bind`, `:mode`, `:interpreter`, etc., causes the
functions being hooked to implicitly be read as `:commands` (meaning they will
establish interactive `autoload` definitions for that module, if not already