From 5a9ed5919515bac0344a03cf66ce9217cd39080d Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 18 Dec 2015 20:38:07 +0100 Subject: Add tagedit library --- emacs/.emacs.d/init.el | 15 +++++++------- emacs/.emacs.d/site-lisp/oni-tagedit.el | 35 +++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 7 deletions(-) create mode 100644 emacs/.emacs.d/site-lisp/oni-tagedit.el (limited to 'emacs/.emacs.d') diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index bf1088c..1c84fb7 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -141,10 +141,6 @@ MODE1 is enabled and vice-versa." "Set the `disabled' property for each item in FUNCTIONS to nil." (mapc #'(lambda (f) (put f 'disabled nil)) functions)) -(defun oni:set-keys-for-tagedit () - "Set some keybindings for `tagedit-mode'." - (local-set-key (kbd "M-k") #'tagedit-kill-attribute)) - (defun oni:set-python-imenu-function () "Set the `imenu-create-index-function' variable. @@ -782,9 +778,14 @@ If no direction is given, don't split." (oni:add-hooks 'slime-repl-mode-hook #'paredit-mode #'set-up-slime-ac) -(oni:add-hooks 'tagedit-mode-hook - #'tagedit-add-experimental-features - #'tagedit-add-paredit-like-keybindings #'oni:set-keys-for-tagedit) +;; Use all the cool experimental tagedit features +(add-hook 'tagedit-mode-hook 'tagedit-add-experimental-features) + +;; Make tagedit behave somewhat like tagedit. +(add-hook 'tagedit-mode-hook 'tagedit-add-paredit-like-keybindings) + +;; Bind tagedit-specific keys +(add-hook 'tagedit-mode-hook 'oni:set-keys-for-tagedit) (oni:add-hooks 'texinfo-mode-hook #'outline-minor-mode) diff --git a/emacs/.emacs.d/site-lisp/oni-tagedit.el b/emacs/.emacs.d/site-lisp/oni-tagedit.el new file mode 100644 index 0000000..8cede20 --- /dev/null +++ b/emacs/.emacs.d/site-lisp/oni-tagedit.el @@ -0,0 +1,35 @@ +;;; oni-tagedit.el --- Extra commands and functions for tagedit -*- lexical-binding: t; -*- + +;; Copyright (C) 2015 Tom Willemse + +;; Author: Tom Willemse +;; Keywords: + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; Here are some extra commands and functions for tagedit. + +;;; Code: + +(require 'tagedit) + +;;;###autoload +(defun oni:set-keys-for-tagedit () + "Set some keybindings for `tagedit-mode'." + (define-key tagedit-mode-map (kbd "M-k") #'tagedit-kill-attribute)) + +(provide 'oni-tagedit) +;;; oni-tagedit.el ends here -- cgit v1.2.3-54-g00ecf