From a281f040cd35dffe171d5b7d6b00fe03163be6a0 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sun, 17 Feb 2013 23:09:24 +0100 Subject: Move .emacs.d to emacs Since it's no longer placed directly in the home directory it doesn't need to be named exacly the same. --- emacs/site-lisp/quick-edit-mode.el | 74 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 emacs/site-lisp/quick-edit-mode.el (limited to 'emacs/site-lisp/quick-edit-mode.el') diff --git a/emacs/site-lisp/quick-edit-mode.el b/emacs/site-lisp/quick-edit-mode.el new file mode 100644 index 0000000..821c738 --- /dev/null +++ b/emacs/site-lisp/quick-edit-mode.el @@ -0,0 +1,74 @@ +;;; quick-edit-mode.el --- Quickly edit stuff + +;; Copyright (C) 2012 Tom Willemsen + +;; Author: Tom Willemsen +;; Keywords: convenience + +;; 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: + +;; Quickly edit stuff + +;;; Code: + +(defvar quick-edit-map + (let ((map (make-sparse-keymap))) + (define-key map "/" 'undo) + (define-key map "0" 'delete-window) + (define-key map "1" 'delete-other-windows) + (define-key map "2" 'split-window-below) + (define-key map "3" 'split-window-right) + (define-key map "K" 'kill-whole-line) + (define-key map "V" 'scroll-down-command) + (define-key map "a" 'oni:move-beginning-of-dwim) + (define-key map "b" 'backward-char) + (define-key map "d" 'oni:kill-region-or-forward-char) + (define-key map "e" 'oni:move-end-of-dwim) + (define-key map "f" 'forward-char) + (define-key map "j" 'newline-and-indent) + (define-key map "k" 'oni:kill-region-or-line) + (define-key map "n" 'next-line) + (define-key map "o" 'other-window) + (define-key map "p" 'previous-line) + (define-key map "v" 'scroll-up-command) + (define-key map "w" 'oni:kill-region-or-backward-char) + (define-key map (kbd "C-b") 'electric-buffer-list) + (define-key map (kbd "C-g") 'quick-edit-mode) + (define-key map (kbd "RET") 'quick-edit-mode) + map) + "Keymap for quick-edit-mode.") + +(defun qe-locally-disable () + "Disable quick-edit mode in the minibuffer" + (when (eq overriding-local-map quick-edit-map) + (setq-local overriding-local-map nil))) + +;;;###autoload +(define-minor-mode quick-edit-mode + "Quickly edit stuff." + :lighter " qe" + :global t + (if quick-edit-mode + (progn + (setq overriding-local-map quick-edit-map) + (add-hook 'minibuffer-setup-hook 'qe-locally-disable) + (add-hook 'special-mode-hook 'qe-locally-disable)) + (setq overriding-local-map nil) + (remove-hook 'minibuffer-setup-hook 'qe-locally-disable) + (remove-hook 'special-mode-hook 'qe-locally-disable))) + +(provide 'quick-edit-mode) +;;; quick-edit-mode.el ends here -- cgit v1.2.3-54-g00ecf From d07f2eb138231656b671ff8b0bd2e26d046d415f Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 10 Apr 2013 22:05:48 +0200 Subject: More --- .hgrc | 2 +- emacs/gnus.el | 1 + emacs/init.el | 2 +- emacs/site-lisp/dzen.el | 4 ++-- emacs/site-lisp/eltuki.el | 4 ++-- emacs/site-lisp/ext.el | 4 ++-- emacs/site-lisp/metalexpress.el | 4 ++-- emacs/site-lisp/mu4e-init.el | 4 ++-- emacs/site-lisp/oni.el | 4 ++-- emacs/site-lisp/org-init.el | 4 ++-- emacs/site-lisp/quick-edit-mode.el | 4 ++-- emacs/snippets/python-mode/import_from | 4 ++-- 12 files changed, 21 insertions(+), 20 deletions(-) (limited to 'emacs/site-lisp/quick-edit-mode.el') diff --git a/.hgrc b/.hgrc index 4fa66ab..adef43b 100644 --- a/.hgrc +++ b/.hgrc @@ -1,4 +1,4 @@ [ui] -username = Tom Willemsen +username = Tom Willemse [extensions] hgext.bookmarks = diff --git a/emacs/gnus.el b/emacs/gnus.el index aac7c6e..49b3931 100644 --- a/emacs/gnus.el +++ b/emacs/gnus.el @@ -45,6 +45,7 @@ (address "tom.willemsen@archlinux.us") (eval (setq message-sendmail-extra-arguments '("-a" "arch")))) ("aethon:" + (name "Tom Willemsen") (address "thomas@aethon.nl") (signature-file "~/documents/work/aethon/signature.txt") (eval (setq message-sendmail-extra-arguments '("-a" "aethon") diff --git a/emacs/init.el b/emacs/init.el index 60ba521..176d904 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -415,7 +415,7 @@ Also change directories to current working directory." (setq type-break-keystroke-threshold '(nil . nil)) (setq uniquify-buffer-name-style 'post-forward) (setq use-dialog-box nil) -(setq user-full-name "Tom Willemsen") +(setq user-full-name "Tom Willemse") (setq user-mail-address "tom@ryuslash.org") (setq w3m-fill-column 72) (setq window-combination-resize t) diff --git a/emacs/site-lisp/dzen.el b/emacs/site-lisp/dzen.el index 6cc3eae..da83099 100644 --- a/emacs/site-lisp/dzen.el +++ b/emacs/site-lisp/dzen.el @@ -1,8 +1,8 @@ ;;; dzen.el --- Control DZEN2 from emacs -;; Copyright (C) 2012 Tom Willemsen +;; Copyright (C) 2012 Tom Willemse -;; Author: Tom Willemsen +;; Author: Tom Willemse ;; Keywords: convenience ;; This program is free software; you can redistribute it and/or modify diff --git a/emacs/site-lisp/eltuki.el b/emacs/site-lisp/eltuki.el index 224e9ab..d457a0f 100644 --- a/emacs/site-lisp/eltuki.el +++ b/emacs/site-lisp/eltuki.el @@ -1,8 +1,8 @@ ;;; eltuki.el --- Tekuti functions -;; Copyright (C) 2012 Tom Willemsen +;; Copyright (C) 2012 Tom Willemse -;; Author: Tom Willemsen +;; Author: Tom Willemse ;; Keywords: convenience ;; This program is free software; you can redistribute it and/or modify diff --git a/emacs/site-lisp/ext.el b/emacs/site-lisp/ext.el index 2ed65d4..eb84a3f 100644 --- a/emacs/site-lisp/ext.el +++ b/emacs/site-lisp/ext.el @@ -1,8 +1,8 @@ ;;; ext.el --- More emacs functions -;; Copyright (C) 2012 Tom Willemsen +;; Copyright (C) 2012 Tom Willemse -;; Author: Tom Willemsen +;; Author: Tom Willemse ;; Keywords: local ;; This program is free software; you can redistribute it and/or modify diff --git a/emacs/site-lisp/metalexpress.el b/emacs/site-lisp/metalexpress.el index 0c4539a..d4a92d7 100644 --- a/emacs/site-lisp/metalexpress.el +++ b/emacs/site-lisp/metalexpress.el @@ -1,8 +1,8 @@ ;;; metalexpress.el --- Listen to Metal Express Radio -;; Copyright (C) 2012 Tom Willemsen +;; Copyright (C) 2012 Tom Willemse -;; Author: Tom Willemsen +;; Author: Tom Willemse ;; Keywords: multimedia ;; This program is free software; you can redistribute it and/or modify diff --git a/emacs/site-lisp/mu4e-init.el b/emacs/site-lisp/mu4e-init.el index 258a6ef..e11baf5 100644 --- a/emacs/site-lisp/mu4e-init.el +++ b/emacs/site-lisp/mu4e-init.el @@ -1,8 +1,8 @@ ;;; mu4e-init.el --- mu4e initialization -;; Copyright (C) 2012 Tom Willemsen +;; Copyright (C) 2012 Tom Willemse -;; Author: Tom Willemsen +;; Author: Tom Willemse ;; Keywords: ;; This program is free software; you can redistribute it and/or modify diff --git a/emacs/site-lisp/oni.el b/emacs/site-lisp/oni.el index 027463b..2076093 100644 --- a/emacs/site-lisp/oni.el +++ b/emacs/site-lisp/oni.el @@ -1,8 +1,8 @@ ;;; oni.el --- Functions for emacs -;; Copyright (C) 2012 Tom Willemsen +;; Copyright (C) 2012 Tom Willemse -;; Author: Tom Willemsen +;; Author: Tom Willemse ;; Keywords: local ;; This program is free software; you can redistribute it and/or modify diff --git a/emacs/site-lisp/org-init.el b/emacs/site-lisp/org-init.el index 789b1bb..3c698d2 100644 --- a/emacs/site-lisp/org-init.el +++ b/emacs/site-lisp/org-init.el @@ -1,8 +1,8 @@ ;;; org-init.el --- Org initialization -;; Copyright (C) 2012 Tom Willemsen +;; Copyright (C) 2012 Tom Willemse -;; Author: Tom Willemsen +;; Author: Tom Willemse ;; Keywords: ;; This program is free software; you can redistribute it and/or modify diff --git a/emacs/site-lisp/quick-edit-mode.el b/emacs/site-lisp/quick-edit-mode.el index 821c738..898d7c2 100644 --- a/emacs/site-lisp/quick-edit-mode.el +++ b/emacs/site-lisp/quick-edit-mode.el @@ -1,8 +1,8 @@ ;;; quick-edit-mode.el --- Quickly edit stuff -;; Copyright (C) 2012 Tom Willemsen +;; Copyright (C) 2012 Tom Willemse -;; Author: Tom Willemsen +;; Author: Tom Willemse ;; Keywords: convenience ;; This program is free software; you can redistribute it and/or modify diff --git a/emacs/snippets/python-mode/import_from b/emacs/snippets/python-mode/import_from index 5c23b8e..d9cc4e2 100644 --- a/emacs/snippets/python-mode/import_from +++ b/emacs/snippets/python-mode/import_from @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # name: from ... import ... -# contributor: Tom Willemsen +# contributor: Tom Willemse # key: from # -- -from ${1:module} import ${2:class_or_module} \ No newline at end of file +from ${1:module} import ${2:class_or_module} -- cgit v1.2.3-54-g00ecf