Add licences to all el-files.

This commit is contained in:
Magnar Sveen 2012-07-25 23:00:19 +02:00
parent 8bc7916841
commit b1ea7f2230
7 changed files with 186 additions and 0 deletions

View File

@ -61,6 +61,10 @@ the buffer.
BTW, I highly recommend adding `mc/mark-next-like-this` to a key binding that's BTW, I highly recommend adding `mc/mark-next-like-this` to a key binding that's
right next to the key for `er/expand-region`. right next to the key for `er/expand-region`.
## Scrolling
Sometimes you end up with cursors outside of your view. You can scroll the
screen to center on each cursor with `C-v` and `M-v`.
## Unknown commands ## Unknown commands

View File

@ -1,3 +1,31 @@
;;; mc-cycle-cursors.el
;; Copyright (C) 2012 Magnar Sveen
;; Author: Magnar Sveen <magnars@gmail.com>
;; Keywords: editing cursors
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This scrolls the buffer to center each cursor in turn.
;; Scroll down with C-v, scroll up with M-v
;; This is nice when you have cursors that's outside of your view.
;;; Code:
(eval-when-compile (require 'cl)) (eval-when-compile (require 'cl))
(defun mc/next-cursor-after-point () (defun mc/next-cursor-after-point ()
@ -46,3 +74,5 @@
(define-key mc/keymap (kbd "M-v") 'mc/cycle-backward) (define-key mc/keymap (kbd "M-v") 'mc/cycle-backward)
(provide 'mc-cycle-cursors) (provide 'mc-cycle-cursors)
;;; mc-cycle-cursors.el ends here

View File

@ -1,3 +1,32 @@
;;; mc-edit-lines.el
;; Copyright (C) 2012 Magnar Sveen
;; Author: Magnar Sveen <magnars@gmail.com>
;; Keywords: editing cursors
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file contains functions to add multiple cursors to consecutive lines
;; given an active region.
;; Please see multiple-cursors.el for more commentary.
;;; Code:
(defun mc/edit-lines () (defun mc/edit-lines ()
"Add one cursor to each line of the active region. "Add one cursor to each line of the active region.
Starts from mark and moves in straight down or up towards the Starts from mark and moves in straight down or up towards the
@ -33,3 +62,5 @@ mark-multiple if point and mark is on different columns."
(beginning-of-line)) (beginning-of-line))
(provide 'mc-edit-lines) (provide 'mc-edit-lines)
;;; mc-edit-lines.el ends here

View File

@ -1,3 +1,32 @@
;;; mc-mark-more.el
;; Copyright (C) 2012 Magnar Sveen
;; Author: Magnar Sveen <magnars@gmail.com>
;; Keywords: editing cursors
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file contains functions to mark more parts of the buffer.
;; See ./features/mark-more.feature for examples.
;; Please see multiple-cursors.el for more commentary.
;;; Code:
(defun mc/cursor-end (cursor) (defun mc/cursor-end (cursor)
(if (overlay-get cursor 'mark-active) (if (overlay-get cursor 'mark-active)
(max (overlay-get cursor 'point) (max (overlay-get cursor 'point)
@ -196,3 +225,5 @@ is one of the above."
(push ev unread-command-events))) (push ev unread-command-events)))
(provide 'mc-mark-more) (provide 'mc-mark-more)
;;; mc-mark-more.el ends here

View File

@ -1,3 +1,30 @@
;;; mc-mark-multiple-integration.el
;; Copyright (C) 2012 Magnar Sveen
;; Author: Magnar Sveen <magnars@gmail.com>
;; Keywords: editing cursors
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; When using mark-multiple, you can now use C-g to switch to multiple-cursors
;;; Code:
(require 'mark-multiple) (require 'mark-multiple)
(defun mc/switch-from-mark-multiple-to-cursors () (defun mc/switch-from-mark-multiple-to-cursors ()
@ -15,3 +42,5 @@
(define-key mm/keymap (kbd "C-g") 'mc/switch-from-mark-multiple-to-cursors) (define-key mm/keymap (kbd "C-g") 'mc/switch-from-mark-multiple-to-cursors)
(provide 'mc-mark-multiple-integration) (provide 'mc-mark-multiple-integration)
;;; mc-mark-multiple-integration.el ends here

View File

@ -1,3 +1,30 @@
;;; multiple-cursors-core.el --- An experiment in multiple cursors for emacs.
;; Copyright (C) 2012 Magnar Sveen
;; Author: Magnar Sveen <magnars@gmail.com>
;; Keywords: editing cursors
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file contains the core functionality of multiple-cursors.
;; Please see multiple-cursors.el for more commentary.
;;; Code:
(eval-when-compile (require 'cl)) (eval-when-compile (require 'cl))
(defface mc/cursor-face (defface mc/cursor-face
@ -439,3 +466,5 @@ for running commands with multiple cursors.")
(load mc/list-file t) ;; load, but no errors if it does not exist yet please (load mc/list-file t) ;; load, but no errors if it does not exist yet please
(provide 'multiple-cursors-core) (provide 'multiple-cursors-core)
;;; multiple-cursors-core.el ends here

View File

@ -1,3 +1,33 @@
;;; rectangular-region-mode.el
;; Copyright (C) 2012 Magnar Sveen
;; Author: Magnar Sveen <magnars@gmail.com>
;; Keywords: editing cursors
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; (global-set-key (kbd "H-SPC") 'set-rectangular-region-anchor)
;; Think of this one as `set-mark` except you're marking a rectangular region. It is
;; an exceedingly quick way of adding multiple cursors to multiple lines.
;;; Code:
(require 'multiple-cursors-core) (require 'multiple-cursors-core)
(defvar rrm/anchor (make-marker) (defvar rrm/anchor (make-marker)
@ -77,3 +107,5 @@
(set-marker rrm/anchor nil))) (set-marker rrm/anchor nil)))
(provide 'rectangular-region-mode) (provide 'rectangular-region-mode)
;;; rectangular-region-mode.el ends here