[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 50cfc74 27/36: Fixup the last commit and add contribution
From: |
Oleh Krehel |
Subject: |
[elpa] master 50cfc74 27/36: Fixup the last commit and add contribution guidelines |
Date: |
Tue, 19 May 2015 12:38:17 +0000 |
branch: master
commit 50cfc74ed0cf2bd4bc361c716d11b2af6d639ce1
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Fixup the last commit and add contribution guidelines
* avy.el (avy-goto-char):
(avy-goto-char-2):
(avy-goto-word-1):
(avy-goto-subword-1):
(avy-goto-word-or-subword-1): Update argument list and docstring.
* README.md: Add a "Contributing" section.
Re #44
---
README.md | 16 ++++++++++++++++
avy.el | 61 +++++++++++++++++++++++++++++--------------------------------
2 files changed, 45 insertions(+), 32 deletions(-)
diff --git a/README.md b/README.md
index dbd8ec5..a7d2d2e 100644
--- a/README.md
+++ b/README.md
@@ -100,3 +100,19 @@ The styles to choose from:
- post: the full path will be displayed after target, leaving all original text
At first it seems that `pre` and `post` are advantageous over `at` and
`at-full`, since you can still see the original text with them. However, they
make the text shift a bit. If you don't like that, use either `at` or `at-full`.
+
+## Contributing
+
+### Copyright Assignment
+
+Avy is subject to the same [copyright
assignment](http://www.gnu.org/prep/maintain/html_node/Copyright-Papers.html)
policy as Emacs itself, org-mode, CEDET and other packages in [GNU
ELPA](http://elpa.gnu.org/packages/). Any [legally
significant](http://www.gnu.org/prep/maintain/html_node/Legally-Significant.html#Legally-Significant)
contributions can only be accepted after the author has completed their
paperwork. Please see [the request
form](http://git.savannah.gnu.org/cgit/gnulib.git [...]
+
+The copyright assignment isn't a big deal, it just says that the copyright for
your submitted changes to Emacs belongs to the FSF. This assignment works for
all projects related to Emacs. To obtain it, you need to send one email, then
send one letter (if you live in the US, it's digital), and wait for some time
(in my case, I had to wait for one month).
+
+### Style
+
+The basic code style guide is to use `(setq indent-tabs-mode nil)`. It is
provided for you in
[.dir-locals.el](https://github.com/abo-abo/avy/blob/master/.dir-locals.el),
please obey it.
+
+Before submitting the change, run `make compile` and `make test` to make sure
that it doesn't introduce new compile warnings or test failures. Also run
<kbd>M-x</kbd> `checkdoc` to see that your changes obey the documentation
guidelines.
+
+Use your own judgment for the commit messages, I recommend a verbose style
using `magit-commit-add-log`.
diff --git a/avy.el b/avy.el
index 860aea8..ebf558e 100644
--- a/avy.el
+++ b/avy.el
@@ -26,12 +26,12 @@
;;; Commentary:
;;
;; This package provides a generic completion method based on building
-;; a balanced decision tree with each candidate being a leaf. To
+;; a balanced decision tree with each candidate being a leaf. To
;; traverse the tree from the root to a desired leaf, typically a
;; sequence of `read-char' can be used.
;;
;; In order for `read-char' to make sense, the tree needs to be
-;; visualized appropriately, with a character at each branch node. So
+;; visualized appropriately, with a character at each branch node. So
;; this completion method works only for things that you can see on
;; your screen, all at once:
;;
@@ -516,31 +516,29 @@ STYLE determines the leading char overlay style."
;;* Commands
;;;###autoload
-(defun avy-goto-char (arg char)
- "Read one char and jump to it.
+(defun avy-goto-char (char &optional arg)
+ "Jump to the currently visible CHAR.
The window scope is determined by `avy-all-windows' (ARG negates it)."
- (interactive (list current-prefix-arg
- (read-char "char: ")))
+ (interactive (list (read-char "char: ")
+ current-prefix-arg))
(avy--with-avy-keys avy-goto-char
(avy--generic-jump
(if (= 13 char)
- "\n"
- (regexp-quote (string char)))
+ "\n"
+ (regexp-quote (string char)))
arg
avy-style)))
;;;###autoload
-(defun avy-goto-char-2 (arg char1 char2)
- "Read two consecutive chars and jump to the first one.
+(defun avy-goto-char-2 (char1 char2 &optional arg)
+ "Jump to the currently visible CHAR1 followed by CHAR2.
The window scope is determined by `avy-all-windows' (ARG negates it)."
- (interactive (list current-prefix-arg
- (read-char "char 1: ")
- (read-char "char 2: ")))
+ (interactive (list (read-char "char 1: ")
+ (read-char "char 2: ")
+ current-prefix-arg))
(avy--with-avy-keys avy-goto-char-2
(avy--generic-jump
- (regexp-quote (string
- char1
- char2))
+ (regexp-quote (string char1 char2))
arg
avy-style)))
@@ -566,11 +564,11 @@ The window scope is determined by `avy-all-windows' (ARG
negates it)."
(avy--generic-jump "\\b\\sw" arg avy-style)))
;;;###autoload
-(defun avy-goto-word-1 (arg char)
- "Read one char at word start and jump there.
+(defun avy-goto-word-1 (char &optional arg)
+ "Jump to the currently visible CHAR at a word start.
The window scope is determined by `avy-all-windows' (ARG negates it)."
- (interactive (list current-prefix-arg
- (read-char "char: ")))
+ (interactive (list (read-char "char: ")
+ current-prefix-arg))
(avy--with-avy-keys avy-goto-word-1
(let* ((str (string char))
(regex (cond ((string= str ".")
@@ -615,25 +613,24 @@ should return true."
(avy--process candidates (avy--style-fn avy-style))))))
;;;###autoload
-(defun avy-goto-subword-1 (arg char)
- "Prompt for a subword start char and jump there.
+(defun avy-goto-subword-1 (char arg)
+ "Jump to the currently visible CHAR at a subword start.
The window scope is determined by `avy-all-windows' (ARG negates it).
-The case is ignored."
- (interactive (list current-prefix-arg
- (read-char "char: ")))
+The case of CHAR is ignored."
+ (interactive (list (read-char "char: ")
+ current-prefix-arg))
(avy--with-avy-keys avy-goto-subword-1
(let ((char (downcase char)))
(avy-goto-subword-0
arg (lambda () (eq (downcase (char-after)) char))))))
-(defun avy-goto-word-or-subword-1 (&optional arg)
- "Jump to a word or subword start, depending on `subword-mode'.
-The window scope is determined by `avy-all-windows' (ARG negates it).
-The case is ignored."
- (interactive "P")
+(defun avy-goto-word-or-subword-1 ()
+ "Forward to `avy-goto-subword-1' or `avy-goto-word-1'.
+Which one depends on variable `subword-mode'."
+ (interactive)
(if (bound-and-true-p subword-mode)
- (avy-goto-subword-1 arg)
- (avy-goto-word-1 arg)))
+ (call-interactively #'avy-goto-subword-1)
+ (call-interactively #'avy-goto-word-1)))
(defun avy--line (&optional arg)
"Select a line.
- [elpa] master e35f1ed 19/36: Use `avy-lead-face-0' for 'pre and 'post, (continued)
- [elpa] master e35f1ed 19/36: Use `avy-lead-face-0' for 'pre and 'post, Oleh Krehel, 2015/05/19
- [elpa] master a39f689 22/36: Allow all kinds of styles for `avy-goto-line', Oleh Krehel, 2015/05/19
- [elpa] master 92a7884 32/36: avy.el (avy-window-list): Fixup last commit, Oleh Krehel, 2015/05/19
- [elpa] master a4f4015 33/36: avy.el (avy--overlay-at-full): Check overlay window, Oleh Krehel, 2015/05/19
- [elpa] master dc06220 29/36: Fix the at-full style interaction with tabs, Oleh Krehel, 2015/05/19
- [elpa] master b288c69 31/36: make compile should run checkdoc, Oleh Krehel, 2015/05/19
- [elpa] master 199c526 35/36: Bump version, Oleh Krehel, 2015/05/19
- [elpa] master 4b4b7b4 28/36: README.md: Add a link to the wiki for defcustoms, Oleh Krehel, 2015/05/19
- [elpa] master be74714 34/36: avy.el (avy--overlay-at-full): Work-around 20607, Oleh Krehel, 2015/05/19
- [elpa] master d6b741b 30/36: Allow for all operations to work across frames, Oleh Krehel, 2015/05/19
- [elpa] master 50cfc74 27/36: Fixup the last commit and add contribution guidelines,
Oleh Krehel <=
- [elpa] master 59c6b9d 26/36: Expose chars to be read as args., Oleh Krehel, 2015/05/19
- [elpa] master e559638 36/36: Merge commit '199c52606dcd614cb856bbcaca13b5fada0772b6' from avy, Oleh Krehel, 2015/05/19