about summary refs log tree commit diff
path: root/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2018-09-10T18·51-0400
committerWilliam Carroll <wpcarro@gmail.com>2018-09-10T18·53-0400
commit17ee0e400bef47c371afcae76037f9ea6a44ad13 (patch)
tree0e5efee6f00e402890e91f3eceb4b29408a498b6 /configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751
parent8b2fadf4776b7ddb4a67b4bc8ff6463770e56028 (diff)
Support Vim, Tmux, Emacs with Stow
After moving off of Meta, Dotfiles has a greater responsibility to
manage configs. Vim, Tmux, and Emacs are now within Stow's purview.
Diffstat (limited to 'configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751')
-rw-r--r--configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary-autoloads.el45
-rw-r--r--configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary-integration.el37
-rw-r--r--configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary-integration.elcbin0 -> 1903 bytes
-rw-r--r--configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary-pkg.el8
-rw-r--r--configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary.el121
-rw-r--r--configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary.elcbin0 -> 8737 bytes
6 files changed, 211 insertions, 0 deletions
diff --git a/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary-autoloads.el b/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary-autoloads.el
new file mode 100644
index 000000000000..6717b8c0aabf
--- /dev/null
+++ b/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary-autoloads.el
@@ -0,0 +1,45 @@
+;;; evil-commentary-autoloads.el --- automatically extracted autoloads
+;;
+;;; Code:
+(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
+
+;;;### (autoloads nil "evil-commentary" "evil-commentary.el" (23377
+;;;;;;  61304 663704 433000))
+;;; Generated autoloads from evil-commentary.el
+
+(defvar evil-commentary-mode nil "\
+Non-nil if Evil-Commentary mode is enabled.
+See the `evil-commentary-mode' command
+for a description of this minor mode.")
+
+(custom-autoload 'evil-commentary-mode "evil-commentary" nil)
+
+(autoload 'evil-commentary-mode "evil-commentary" "\
+Commentary mode.
+
+\(fn &optional ARG)" t nil)
+
+;;;***
+
+;;;### (autoloads nil "evil-commentary-integration" "evil-commentary-integration.el"
+;;;;;;  (23377 61304 667431 263000))
+;;; Generated autoloads from evil-commentary-integration.el
+
+(autoload 'evil-commentary/org-comment-or-uncomment-region "evil-commentary-integration" "\
+Comment function for `org-mode'.
+
+\(fn BEG END)" t nil)
+
+;;;***
+
+;;;### (autoloads nil nil ("evil-commentary-pkg.el") (23377 61304
+;;;;;;  665630 323000))
+
+;;;***
+
+;; Local Variables:
+;; version-control: never
+;; no-byte-compile: t
+;; no-update-autoloads: t
+;; End:
+;;; evil-commentary-autoloads.el ends here
diff --git a/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary-integration.el b/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary-integration.el
new file mode 100644
index 000000000000..0d2760e73077
--- /dev/null
+++ b/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary-integration.el
@@ -0,0 +1,37 @@
+(declare-function org-in-src-block-p "org")
+
+(defmacro evil-commentary/org-babel-do-in-edit-buffer (beg end &rest body)
+  "Do `org-babel-do-in-edit-buffer' and restore view.
+
+Return the same value as `org-babel-do-in-edit-buffer'. Save top
+line of current window and restore it if sucess."
+  (declare (indent defun))
+  `(when (and (fboundp 'org-babel-do-in-edit-buffer)
+              (org-in-src-block-p t))
+     (let ((top-line (line-number-at-pos (window-start)))
+           (current-point (point))
+           found)
+       (push-mark ,beg)
+       (goto-char ,end)
+       (setq mark-active t)
+       (setq found (eval '(org-babel-do-in-edit-buffer
+                             ,@body)))
+       (pop-mark)
+       (if (not found)
+           (goto-char current-point)
+         (save-excursion
+           (scroll-up 1)              ; stupid fix
+           (goto-char (point-min))
+           (forward-line (1- top-line))
+           (recenter 0)))
+       found)))
+
+;;;###autoload
+(defun evil-commentary/org-comment-or-uncomment-region (beg end)
+  "Comment function for `org-mode'."
+  (interactive "r")
+  (unless (evil-commentary/org-babel-do-in-edit-buffer beg end
+            (call-interactively 'evil-commentary))
+    (comment-or-uncomment-region beg end)))
+
+(provide 'evil-commentary-integration)
diff --git a/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary-integration.elc b/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary-integration.elc
new file mode 100644
index 000000000000..d0a71de3a9cb
--- /dev/null
+++ b/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary-integration.elc
Binary files differdiff --git a/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary-pkg.el b/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary-pkg.el
new file mode 100644
index 000000000000..0797dac16525
--- /dev/null
+++ b/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary-pkg.el
@@ -0,0 +1,8 @@
+(define-package "evil-commentary" "20170413.751" "Comment stuff out. A port of vim-commentary."
+  '((evil "1.0.0"))
+  :keywords
+  '("evil" "comment" "commentary" "evil-commentary")
+  :url "http://github.com/linktohack/evil-commentary")
+;; Local Variables:
+;; no-byte-compile: t
+;; End:
diff --git a/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary.el b/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary.el
new file mode 100644
index 000000000000..702d320b3f65
--- /dev/null
+++ b/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary.el
@@ -0,0 +1,121 @@
+;;; evil-commentary.el --- Comment stuff out. A port of vim-commentary.
+
+;; Copyright (C) 2014 Quang Linh LE
+
+;; Author: Quang Linh LE <linktohack@gmail.com>
+;; URL: http://github.com/linktohack/evil-commentary
+;; Version: 2.1.1
+;; Keywords: evil comment commentary evil-commentary
+;; Package-Requires: ((evil "1.0.0"))
+
+;; This file is not part of GNU Emacs.
+
+;;; License:
+
+;; This file is part of evil-commentary
+;;
+;; evil-commentary 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.
+;;
+;; evil-commentary 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 <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;
+;; This program emulates evil-commentary initially developed by Tim Pope
+;; (tpope) It help you comment line with `counts` and `motions`.
+
+;;; Example:
+;;
+;; `gcc` to comment/uncomment a line
+;; `5gcc` to comment/uncomment 5 lines
+;; `gc$` to comment/uncomment from current position
+;; `gcap` to comment/uncomment current paragraph
+
+
+;;; Code:
+
+(require 'evil)
+(require 'evil-commentary-integration)
+
+(defgroup evil-commentary nil
+  "Comment stuff out"
+  :group 'evil
+  :prefix "evil-commentary-")
+
+(defcustom evil-commentary-comment-function-for-mode-alist
+  '((org-mode . evil-commentary/org-comment-or-uncomment-region)
+    (f90-mode . f90-comment-region)
+    (web-mode . web-mode-comment-or-uncomment-region))
+  "Mode-specific comment function.
+
+By default, `evil-commentary' use `comment-or-uncomment'
+function. By specify an alist of modes here, the comment function
+provided by major mode will be use instead.
+
+A comment functions has to accept BEG, END as its required
+parameter."
+  :group 'evil-commentary
+  :type '(alist :key-type symbol :value-type function))
+
+(evil-define-operator evil-commentary (beg end type)
+  "Comment or uncomment region that {motion} moves over."
+  :move-point nil
+  (interactive "<R>")
+  (let ((comment-function
+         (cdr (assoc major-mode
+                     evil-commentary-comment-function-for-mode-alist))))
+    (if comment-function (funcall comment-function beg end)
+      (comment-or-uncomment-region beg end))))
+
+(evil-define-operator evil-commentary-line (beg end type)
+  "Comment or uncomment [count] lines."
+  :motion evil-line
+  :move-point nil
+  (interactive "<R>")
+  (when (evil-visual-state-p)
+    (unless (memq type '(line block))
+      (let ((range (evil-expand beg end 'line)))
+        (setq beg (evil-range-beginning range)
+              end (evil-range-end range)
+              type (evil-type range))))
+    (evil-exit-visual-state))
+  (evil-commentary beg end type))
+
+(evil-define-operator evil-commentary-yank (beg end type register yank-handler)
+  "Saves the characters in motion into the kill-ring."
+  :move-point nil
+  :repeat nil
+  (interactive "<R><x><y>")
+  (evil-yank beg end type register yank-handler)
+  (evil-commentary beg end))
+
+(evil-define-operator evil-commentary-yank-line (beg end type register)
+  "Saves whole lines into the kill-ring."
+  :motion evil-line
+  :move-point nil
+  (interactive "<R><x>")
+  (evil-yank-line beg end type register)
+  (evil-commentary-line beg end))
+
+;;;###autoload
+(define-minor-mode evil-commentary-mode
+  "Commentary mode."
+  :lighter " s-/"
+  :global t
+  :keymap (let ((map (make-sparse-keymap)))
+            (evil-define-key 'normal map "gc" 'evil-commentary)
+            (evil-define-key 'normal map "gy" 'evil-commentary-yank)
+            (define-key map (kbd "s-/") 'evil-commentary-line)
+            map))
+
+(provide 'evil-commentary)
+
+;;; evil-commentary.el ends here
diff --git a/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary.elc b/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary.elc
new file mode 100644
index 000000000000..2e6a041c56bb
--- /dev/null
+++ b/configs/shared/emacs/.emacs.d/elpa/evil-commentary-20170413.751/evil-commentary.elc
Binary files differ