[elpa] externals/spinner updated (d15e7a7 -> bca794f)

2021-07-01 Thread Artur Malabarba
malabarba pushed a change to branch externals/spinner.

  from  d15e7a7   Merge pull request #17 from thisch/clel
   new  d526b3b   Enforce use of spaces for indentation
   new  d248c47   Fix indentation
   new  b917046   Merge pull request #24 from tarsiiformes/indentation
   new  6b8ea32   Fix typos
   new  3fa5fff   Merge pull request #20 from tarsiiformes/typos
   new  bca794f   Version 1.7.4


Summary of changes:
 spinner.el | 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)



[elpa] externals/spinner 3fa5fff 5/6: Merge pull request #20 from tarsiiformes/typos

2021-07-01 Thread Artur Malabarba
branch: externals/spinner
commit 3fa5fff758d4be482a2c1fed8a159a304be0f0d6
Merge: b917046 6b8ea32
Author: Artur Malabarba 
Commit: GitHub 

Merge pull request #20 from tarsiiformes/typos

Fix typos
---
 spinner.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/spinner.el b/spinner.el
index 9551a7b..d40563e 100644
--- a/spinner.el
+++ b/spinner.el
@@ -127,7 +127,7 @@ vector, the spinner itself.")
 (defun spinner-make-progress-bar (width  char)
   "Return a vector of strings of the given WIDTH.
 The vector is a valid spinner type and is similar to the
-`progress-bar' spinner, except without the sorrounding brackets.
+`progress-bar' spinner, except without the surrounding brackets.
 CHAR is the character to use for the moving bar (defaults to =)."
   (let ((whole-string (concat (make-string (1- width) ?\s)
   (make-string 4 (or char ?=))
@@ -136,7 +136,7 @@ CHAR is the character to use for the moving bar (defaults 
to =)."
 (number-sequence (+ width 3) 0 -1)
 
 (defvar spinner-current nil
-  "Spinner curently being displayed on the `mode-line-process'.")
+  "Spinner currently being displayed on the `mode-line-process'.")
 (make-variable-buffer-local 'spinner-current)
 
 (defconst spinner--mode-line-construct
@@ -206,7 +206,7 @@ buffer, use that instead of current buffer.
 
 When started, in order to function properly, the spinner runs a
 timer which periodically calls `force-mode-line-update' in the
-curent buffer.  If BUFFER-LOCAL was set at creation time, then
+current buffer.  If BUFFER-LOCAL was set at creation time, then
 `force-mode-line-update' is called in that buffer instead.  When
 the spinner is stopped, the timer is deactivated.
 



[elpa] externals/spinner b917046 4/6: Merge pull request #24 from tarsiiformes/indentation

2021-07-01 Thread Artur Malabarba
branch: externals/spinner
commit b9170460118330f1e58e5bee1889ec859d7ee335
Merge: d15e7a7 d248c47
Author: Artur Malabarba 
Commit: GitHub 

Merge pull request #24 from tarsiiformes/indentation

Fix indentation
---
 spinner.el | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/spinner.el b/spinner.el
index 6403dea..9551a7b 100644
--- a/spinner.el
+++ b/spinner.el
@@ -255,8 +255,9 @@ stop the SPINNER's timer."
 
 (unless (ignore-errors (> (spinner--fps spinner) 0))
   (error "A spinner's FPS must be a positive number"))
-(setf (spinner--counter spinner) (round (- (* (or (spinner--delay spinner) 
0)
-   (spinner--fps spinner)
+(setf (spinner--counter spinner)
+  (round (- (* (or (spinner--delay spinner) 0)
+   (spinner--fps spinner)
 ;; Create timer.
 (let* ((repeat (/ 1.0 (spinner--fps spinner)))
(time (timer-next-integral-multiple-of-time (current-time) repeat))
@@ -333,4 +334,7 @@ active spinner."
 
 (provide 'spinner)
 
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; End:
 ;;; spinner.el ends here



[elpa] externals/spinner bca794f 6/6: Version 1.7.4

2021-07-01 Thread Artur Malabarba
branch: externals/spinner
commit bca794fa6f6b007292cdac9b0a850a3711986db5
Author: Artur Malabarba 
Commit: Artur Malabarba 

Version 1.7.4
---
 spinner.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/spinner.el b/spinner.el
index d40563e..6be8f13 100644
--- a/spinner.el
+++ b/spinner.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
 ;; Author: Artur Malabarba 
-;; Version: 1.7.3
+;; Version: 1.7.4
 ;; Package-Requires: ((emacs "24.3"))
 ;; URL: https://github.com/Malabarba/spinner.el
 ;; Keywords: processes mode-line



[elpa] externals/spinner d526b3b 2/6: Enforce use of spaces for indentation

2021-07-01 Thread Artur Malabarba
branch: externals/spinner
commit d526b3bc7803afa6db1a55ee54ed716864990f68
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Enforce use of spaces for indentation
---
 spinner.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/spinner.el b/spinner.el
index 6403dea..0dba8be 100644
--- a/spinner.el
+++ b/spinner.el
@@ -333,4 +333,7 @@ active spinner."
 
 (provide 'spinner)
 
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; End:
 ;;; spinner.el ends here



[elpa] externals/spinner 6b8ea32 1/6: Fix typos

2021-07-01 Thread Artur Malabarba
branch: externals/spinner
commit 6b8ea3295f1845bb38342abdff704f51c634dfa1
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Fix typos
---
 spinner.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/spinner.el b/spinner.el
index 6403dea..58f0fbf 100644
--- a/spinner.el
+++ b/spinner.el
@@ -127,7 +127,7 @@ vector, the spinner itself.")
 (defun spinner-make-progress-bar (width  char)
   "Return a vector of strings of the given WIDTH.
 The vector is a valid spinner type and is similar to the
-`progress-bar' spinner, except without the sorrounding brackets.
+`progress-bar' spinner, except without the surrounding brackets.
 CHAR is the character to use for the moving bar (defaults to =)."
   (let ((whole-string (concat (make-string (1- width) ?\s)
   (make-string 4 (or char ?=))
@@ -136,7 +136,7 @@ CHAR is the character to use for the moving bar (defaults 
to =)."
 (number-sequence (+ width 3) 0 -1)
 
 (defvar spinner-current nil
-  "Spinner curently being displayed on the `mode-line-process'.")
+  "Spinner currently being displayed on the `mode-line-process'.")
 (make-variable-buffer-local 'spinner-current)
 
 (defconst spinner--mode-line-construct
@@ -206,7 +206,7 @@ buffer, use that instead of current buffer.
 
 When started, in order to function properly, the spinner runs a
 timer which periodically calls `force-mode-line-update' in the
-curent buffer.  If BUFFER-LOCAL was set at creation time, then
+current buffer.  If BUFFER-LOCAL was set at creation time, then
 `force-mode-line-update' is called in that buffer instead.  When
 the spinner is stopped, the timer is deactivated.
 



[elpa] externals/spinner d248c47 3/6: Fix indentation

2021-07-01 Thread Artur Malabarba
branch: externals/spinner
commit d248c479054f797b0e196260ab71ba587d0ea0e7
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Fix indentation

In the process also shorten a long line.
---
 spinner.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/spinner.el b/spinner.el
index 0dba8be..9551a7b 100644
--- a/spinner.el
+++ b/spinner.el
@@ -255,8 +255,9 @@ stop the SPINNER's timer."
 
 (unless (ignore-errors (> (spinner--fps spinner) 0))
   (error "A spinner's FPS must be a positive number"))
-(setf (spinner--counter spinner) (round (- (* (or (spinner--delay spinner) 
0)
-   (spinner--fps spinner)
+(setf (spinner--counter spinner)
+  (round (- (* (or (spinner--delay spinner) 0)
+   (spinner--fps spinner)
 ;; Create timer.
 (let* ((repeat (/ 1.0 (spinner--fps spinner)))
(time (timer-next-integral-multiple-of-time (current-time) repeat))



[elpa] master f1a3ff5 1/3: Add mu4e-headers to dont-blink-modes

2017-10-17 Thread Artur Malabarba
branch: master
commit f1a3ff5ea8fecf9bf250205de66aedf0bf49c35b
Author: Artur Malabarba <ar...@biva.com.br>
Commit: Artur Malabarba <ar...@biva.com.br>

Add mu4e-headers to dont-blink-modes
---
 beacon.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/beacon.el b/beacon.el
index 2c33d5e..b69cc67 100644
--- a/beacon.el
+++ b/beacon.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/beacon
 ;; Keywords: convenience
-;; Version: 1.3.2
+;; Version: 1.3.3
 ;; Package-Requires: ((seq "2.14"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -157,6 +157,7 @@ For instance, if you want to disable beacon on buffers where
 
 (defcustom beacon-dont-blink-major-modes '(t magit-status-mode magit-popup-mode
inf-ruby-mode
+   mu4e-headers-mode
gnus-summary-mode gnus-group-mode)
   "A list of major-modes where the beacon won't blink.
 Whenever the current buffer satisfies `derived-mode-p' for



[elpa] master updated (b629c75 -> 938054b)

2017-10-17 Thread Artur Malabarba
malabarba pushed a change to branch master.

  from  b629c75   * nlinum/nlinum.el: Don't assume nlinum-use-right-margin 
is fixed
   new  f1a3ff5   Add mu4e-headers to dont-blink-modes
   new  729338b   Fix off-by-1 error causing the beacon to wrap lines
   new  938054b   Merge commit '729338b02a0e331a4faf475da9f54771a3470106'


Summary of changes:
 packages/beacon/beacon.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)



[elpa] master 938054b 3/3: Merge commit '729338b02a0e331a4faf475da9f54771a3470106'

2017-10-17 Thread Artur Malabarba
branch: master
commit 938054bc6c62f72e74220493d9e23cd5ac90b2bf
Merge: b629c75 729338b
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit '729338b02a0e331a4faf475da9f54771a3470106'
---
 packages/beacon/beacon.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/packages/beacon/beacon.el b/packages/beacon/beacon.el
index 2c33d5e..f3cdea9 100644
--- a/packages/beacon/beacon.el
+++ b/packages/beacon/beacon.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/beacon
 ;; Keywords: convenience
-;; Version: 1.3.2
+;; Version: 1.3.3
 ;; Package-Requires: ((seq "2.14"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -157,6 +157,7 @@ For instance, if you want to disable beacon on buffers where
 
 (defcustom beacon-dont-blink-major-modes '(t magit-status-mode magit-popup-mode
inf-ruby-mode
+   mu4e-headers-mode
gnus-summary-mode gnus-group-mode)
   "A list of major-modes where the beacon won't blink.
 Whenever the current buffer satisfies `derived-mode-p' for
@@ -237,7 +238,7 @@ The property's value is a string of spaces with background
 COLORS applied to each one."
   ;; The after-string must not be longer than the remaining columns
   ;; from point to right window-end else it will be wrapped around.
-  (let ((colors (seq-take colors (- (window-width) (current-column)
+  (let ((colors (seq-take colors (- (window-width) (current-column) 1
 (beacon--ov-put-after-string (beacon--make-overlay 0) colors)))
 
 (defun beacon--ov-at-point ()



[elpa] master 729338b 2/3: Fix off-by-1 error causing the beacon to wrap lines

2017-10-17 Thread Artur Malabarba
branch: master
commit 729338b02a0e331a4faf475da9f54771a3470106
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Fix off-by-1 error causing the beacon to wrap lines
---
 beacon.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/beacon.el b/beacon.el
index b69cc67..f3cdea9 100644
--- a/beacon.el
+++ b/beacon.el
@@ -238,7 +238,7 @@ The property's value is a string of spaces with background
 COLORS applied to each one."
   ;; The after-string must not be longer than the remaining columns
   ;; from point to right window-end else it will be wrapped around.
-  (let ((colors (seq-take colors (- (window-width) (current-column)
+  (let ((colors (seq-take colors (- (window-width) (current-column) 1
 (beacon--ov-put-after-string (beacon--make-overlay 0) colors)))
 
 (defun beacon--ov-at-point ()



[elpa] master 2bc1a7c 1/2: Fix a false negative with list/group/vector schemas

2017-03-05 Thread Artur Malabarba
branch: master
commit 2bc1a7c5f09de5deb7f27b2b4ed731271f9f3f05
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Fix a false negative with list/group/vector schemas
---
 validate.el | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/validate.el b/validate.el
index f2dcc23..a51cd81 100644
--- a/validate.el
+++ b/validate.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; Keywords: lisp
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5") (seq "2.16"))
-;; Version: 1.0.2
+;; Version: 1.0.4
 
 ;;; Commentary:
 ;;
@@ -60,9 +60,10 @@
 
 (defun validate--check-list-contents (values schemas)
   "Check that all VALUES match all SCHEMAS."
-  (if (not (= (length values) (length schemas)))
-  "wrong number of elements"
-(seq-find #'identity (seq-mapn #'validate--check values schemas
+  (when schemas
+(if (not (= (length values) (length schemas)))
+"wrong number of elements"
+  (seq-find #'identity (seq-mapn #'validate--check values schemas)
 
 (defun validate--indent-by-2 (x)
   (replace-regexp-in-string "^" "  " x))



[elpa] master c1e148b 2/2: Merge commit '2bc1a7c5f09de5deb7f27b2b4ed731271f9f3f05'

2017-03-05 Thread Artur Malabarba
branch: master
commit c1e148b2677435d0992129df4a7aaa60ab0d046b
Merge: 7c20c24 2bc1a7c
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit '2bc1a7c5f09de5deb7f27b2b4ed731271f9f3f05'
---
 packages/validate/validate.el | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/packages/validate/validate.el b/packages/validate/validate.el
index f2dcc23..a51cd81 100644
--- a/packages/validate/validate.el
+++ b/packages/validate/validate.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; Keywords: lisp
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5") (seq "2.16"))
-;; Version: 1.0.2
+;; Version: 1.0.4
 
 ;;; Commentary:
 ;;
@@ -60,9 +60,10 @@
 
 (defun validate--check-list-contents (values schemas)
   "Check that all VALUES match all SCHEMAS."
-  (if (not (= (length values) (length schemas)))
-  "wrong number of elements"
-(seq-find #'identity (seq-mapn #'validate--check values schemas
+  (when schemas
+(if (not (= (length values) (length schemas)))
+"wrong number of elements"
+  (seq-find #'identity (seq-mapn #'validate--check values schemas)
 
 (defun validate--indent-by-2 (x)
   (replace-regexp-in-string "^" "  " x))



[elpa] master dcbbfc8 2/4: Merge pull request #4 from lunaryorn/patch-1

2016-11-17 Thread Artur Malabarba
branch: master
commit dcbbfc88d3df7095fe275c6f027b5a324f151a2e
Merge: 16e0e23 2604297
Author: Artur Malabarba <malaba...@users.noreply.github.com>
Commit: GitHub <nore...@github.com>

Merge pull request #4 from lunaryorn/patch-1

Don't use error report as format
---
 validate.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/validate.el b/validate.el
index 362d38c..398a169 100644
--- a/validate.el
+++ b/validate.el
@@ -165,7 +165,7 @@ indicate a failure."
   (let ((report (validate--check value schema)))
 (if report
 (unless noerror
-  (user-error report))
+  (user-error "%s" report))
   value)))
 
 ;;;###autoload



[elpa] master c30247e 3/4: Version 1.0.1

2016-11-17 Thread Artur Malabarba
branch: master
commit c30247ea4efbddb8efc0c21634b1e78aac4dea6a
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Version 1.0.1
---
 validate.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/validate.el b/validate.el
index 398a169..fbb3d06 100644
--- a/validate.el
+++ b/validate.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; Keywords: lisp
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
-;; Version: 1.0.0
+;; Version: 1.0.1
 
 ;;; Commentary:
 ;;



[elpa] master 2604297 1/4: Don't use error report as format

2016-11-17 Thread Artur Malabarba
branch: master
commit 26042970870ad38b1023a622e28837a4c7aac574
Author: Sebastian Wiesner 
Commit: GitHub 

Don't use error report as format

The second argument of "user-error" is a format string; we must not pass an 
arbitrary string in this place.

If a bad value contains a percentage sign, it'll end up in a "format" 
position through "report", causing a second failure about missing format 
arguments which masks the original error.

To prevent this use an explicit format and pass the "report" as format 
string argument.
---
 validate.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/validate.el b/validate.el
index 362d38c..398a169 100644
--- a/validate.el
+++ b/validate.el
@@ -165,7 +165,7 @@ indicate a failure."
   (let ((report (validate--check value schema)))
 (if report
 (unless noerror
-  (user-error report))
+  (user-error "%s" report))
   value)))
 
 ;;;###autoload



[elpa] master 35d35e3 4/4: Merge commit 'c30247ea4efbddb8efc0c21634b1e78aac4dea6a'

2016-11-17 Thread Artur Malabarba
branch: master
commit 35d35e3f954d4b3888a40d52e2832038919c
Merge: 1098790 c30247e
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit 'c30247ea4efbddb8efc0c21634b1e78aac4dea6a'
---
 packages/validate/validate.el |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/packages/validate/validate.el b/packages/validate/validate.el
index 362d38c..fbb3d06 100644
--- a/packages/validate/validate.el
+++ b/packages/validate/validate.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; Keywords: lisp
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
-;; Version: 1.0.0
+;; Version: 1.0.1
 
 ;;; Commentary:
 ;;
@@ -165,7 +165,7 @@ indicate a failure."
   (let ((report (validate--check value schema)))
 (if report
 (unless noerror
-  (user-error report))
+  (user-error "%s" report))
   value)))
 
 ;;;###autoload



[elpa] master updated (1098790 -> 35d35e3)

2016-11-17 Thread Artur Malabarba
malabarba pushed a change to branch master.

  from  1098790   Merge commit '0637791f005f747532b4439439a81c3415961377'
   new  2604297   Don't use error report as format
   new  dcbbfc8   Merge pull request #4 from lunaryorn/patch-1
   new  c30247e   Version 1.0.1
   new  35d35e3   Merge commit 'c30247ea4efbddb8efc0c21634b1e78aac4dea6a'


Summary of changes:
 packages/validate/validate.el |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



[elpa] master 607d884 7/9: Fix #130 - Remove readonly completely

2016-11-17 Thread Artur Malabarba
branch: master
commit 607d88453bd7506676cc9f102fcdeda06a64b1cc
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Fix #130 - Remove readonly completely
---
 spinner.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/spinner.el b/spinner.el
index adcdab0..7f38eea 100644
--- a/spinner.el
+++ b/spinner.el
@@ -183,7 +183,7 @@ own spinner animations."
   (frames (spinner--type-to-frames type))
   (counter 0)
   (fps (or frames-per-second spinner-frames-per-second))
-  (timer (timer-create) :read-only t)
+  (timer (timer-create))
   (active-p nil)
   (buffer (when buffer-local
 (if (bufferp buffer-local)



[elpa] master ebb5269 6/9: Fix a usage of read-only argument

2016-11-17 Thread Artur Malabarba
branch: master
commit ebb5269cff173ae9f3562e1f33f5c4dbf0f97e61
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Fix a usage of read-only argument
---
 spinner.el |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/spinner.el b/spinner.el
index a021848..adcdab0 100644
--- a/spinner.el
+++ b/spinner.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
-;; Version: 1.7.1
+;; Version: 1.7.2
 ;; URL: https://github.com/Malabarba/spinner.el
 ;; Keywords: processes mode-line
 
@@ -183,7 +183,7 @@ own spinner animations."
   (frames (spinner--type-to-frames type))
   (counter 0)
   (fps (or frames-per-second spinner-frames-per-second))
-  (timer (timer-create) :read-only)
+  (timer (timer-create) :read-only t)
   (active-p nil)
   (buffer (when buffer-local
 (if (bufferp buffer-local)



[elpa] master 7c3c029 1/9: Update the mode-line after spinner-stop

2016-11-17 Thread Artur Malabarba
branch: master
commit 7c3c0299cbdf3146fe60bba5536cdaf544244b01
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Update the mode-line after spinner-stop
---
 spinner.el |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/spinner.el b/spinner.el
index 12fafe6..ec0a64f 100644
--- a/spinner.el
+++ b/spinner.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
-;; Version: 1.4
+;; Version: 1.5
 ;; URL: https://github.com/Malabarba/spinner.el
 ;; Keywords: processes mode-line
 
@@ -312,7 +312,8 @@ this time, in which case it won't display at all."
  (timer (spinner--timer spinner)))
 (when (timerp timer)
   (cancel-timer timer))
-(setf (spinner--active-p spinner) nil)))
+(setf (spinner--active-p spinner) nil)
+(force-mode-line-update)))
 
 (provide 'spinner)
 



[elpa] master 4e04a98 4/9: Make spinner-stop never signal

2016-11-17 Thread Artur Malabarba
branch: master
commit 4e04a983b86ee698ff417eae4646756daef434ba
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Make spinner-stop never signal
---
 spinner.el |   19 +++
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/spinner.el b/spinner.el
index 0a0dd50..63ead1e 100644
--- a/spinner.el
+++ b/spinner.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
-;; Version: 1.6
+;; Version: 1.7
 ;; URL: https://github.com/Malabarba/spinner.el
 ;; Keywords: processes mode-line
 
@@ -319,13 +319,16 @@ this time, in which case it won't display at all."
   (spinner-print spinner))
 
 (defun spinner-stop ( spinner)
-  "Stop the current buffer's spinner."
-  (let* ((spinner (or spinner spinner-current))
- (timer (spinner--timer spinner)))
-(when (timerp timer)
-  (cancel-timer timer))
-(setf (spinner--active-p spinner) nil)
-(force-mode-line-update)))
+  "Stop SPINNER, defaulting to the current buffer's spinner.
+It is always safe to call this function, even if there is no
+active spinner."
+  (let ((spinner (or spinner spinner-current)))
+(when (spinner-p spinner)
+  (let ((timer (spinner--timer spinner)))
+(when (timerp timer)
+  (cancel-timer timer)))
+  (setf (spinner--active-p spinner) nil)
+  (force-mode-line-update
 
 (provide 'spinner)
 



[elpa] master updated (2d6022a -> 1098790)

2016-11-17 Thread Artur Malabarba
malabarba pushed a change to branch master.

  from  2d6022a   Do not use map.el in seq-tests.el
   new  7c3c029   Update the mode-line after spinner-stop
   new  117b823   Offer a spinner-make-progress-bar function
   new  c651ba8   Allow floating-point delays
   new  4e04a98   Make spinner-stop never signal
   new  a62dc35   Remove reference to thread-last
   new  ebb5269   Fix a usage of read-only argument
   new  607d884   Fix #130 - Remove readonly completely
   new  0637791   Version 1.7.3
   new  1098790   Merge commit '0637791f005f747532b4439439a81c3415961377'


Summary of changes:
 packages/spinner/spinner.el |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



[elpa] master 0637791 8/9: Version 1.7.3

2016-11-17 Thread Artur Malabarba
branch: master
commit 0637791f005f747532b4439439a81c3415961377
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Version 1.7.3
---
 spinner.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/spinner.el b/spinner.el
index 7f38eea..b227eba 100644
--- a/spinner.el
+++ b/spinner.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
-;; Version: 1.7.2
+;; Version: 1.7.3
 ;; URL: https://github.com/Malabarba/spinner.el
 ;; Keywords: processes mode-line
 



[elpa] master c651ba8 3/9: Allow floating-point delays

2016-11-17 Thread Artur Malabarba
branch: master
commit c651ba8711b23725052bfc6b572cbf4e83449893
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Allow floating-point delays
---
 spinner.el |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/spinner.el b/spinner.el
index df59e10..0a0dd50 100644
--- a/spinner.el
+++ b/spinner.el
@@ -255,8 +255,8 @@ stop the SPINNER's timer."
 
 (unless (ignore-errors (> (spinner--fps spinner) 0))
   (error "A spinner's FPS must be a positive number"))
-(setf (spinner--counter spinner) (- (* (or (spinner--delay spinner) 0)
-(spinner--fps spinner
+(setf (spinner--counter spinner) (round (- (* (or (spinner--delay spinner) 
0)
+   (spinner--fps spinner)
 ;; Create timer.
 (let* ((repeat (/ 1.0 (spinner--fps spinner)))
(time (timer-next-integral-multiple-of-time (current-time) repeat))



[elpa] master 117b823 2/9: Offer a spinner-make-progress-bar function

2016-11-17 Thread Artur Malabarba
branch: master
commit 117b8238bd9175f2af88347b1a516b38c9d4adce
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Offer a spinner-make-progress-bar function
---
 spinner.el |   14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/spinner.el b/spinner.el
index ec0a64f..df59e10 100644
--- a/spinner.el
+++ b/spinner.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
-;; Version: 1.5
+;; Version: 1.6
 ;; URL: https://github.com/Malabarba/spinner.el
 ;; Keywords: processes mode-line
 
@@ -123,6 +123,18 @@
 Each car is a symbol identifying the spinner, and each cdr is a
 vector, the spinner itself.")
 
+(defun spinner-make-progress-bar (width  char)
+  "Return a vector of strings of the given WIDTH.
+The vector is a valid spinner type and is similar to the
+`progress-bar' spinner, except without the sorrounding brackets.
+CHAR is the character to use for the moving bar (defaults to =)."
+  (let ((whole-string (concat (make-string (1- width) ?\s)
+  (make-string 4 (or char ?=))
+  (make-string width ?\s
+(thread-last (mapcar (lambda (n) (substring whole-string n (+ n width)))
+ (number-sequence (+ width 3) 0 -1))
+  (apply #'vector
+
 (defvar spinner-current nil
   "Spinner curently being displayed on the `mode-line-process'.")
 (make-variable-buffer-local 'spinner-current)



[elpa] master 3787f8e 1/3: Fix #2 - Use equal instead of eq to validate :const

2016-10-12 Thread Artur Malabarba
branch: master
commit 3787f8eac611703f8d20ca6a38e0bceb76aa6259
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Fix #2 - Use equal instead of eq to validate :const
---
 validate.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/validate.el b/validate.el
index 7ca4b0a..0082d8d 100644
--- a/validate.el
+++ b/validate.el
@@ -96,7 +96,7 @@ If they don't match, return an explanation."
 ((wtype 'list))
 (t (let ((subschema (car args)))
  (seq-some (lambda (v) (validate--check v 
subschema)) value)
-   ((const function-item variable-item) (unless (eq value (car 
args))
+   ((const function-item variable-item) (unless (equal value (car 
args))
   "not the expected 
value"))
(file (cond ((wtype 'string))
((file-exists-p value) nil)



[elpa] master updated (98e1de1 -> 16506d7)

2016-10-12 Thread Artur Malabarba
malabarba pushed a change to branch master.

  from  98e1de1   Merge commit 'ab1a5c589378334eafca105af1a17f73b9065423'
   new  6564e18   Whitespace
   new  34de254   [#7] Support using skeletons as expansions
   new  325c21e   Compiler warning
   new  fffe8d0   Version 1.6.2
   new  16506d7   Merge commit 'fffe8d0b42b143a2e7df0470d9049fa57b6ecac5'


Summary of changes:
 packages/sotlisp/sotlisp.el |   21 ++---
 1 file changed, 14 insertions(+), 7 deletions(-)



[elpa] master 34de254 2/5: [#7] Support using skeletons as expansions

2016-10-12 Thread Artur Malabarba
branch: master
commit 34de2548218d39b49da55d66d141c89e8ee1d85b
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

[#7] Support using skeletons as expansions
---
 sotlisp.el |   19 +--
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/sotlisp.el b/sotlisp.el
index c52fe95..8d036aa 100644
--- a/sotlisp.el
+++ b/sotlisp.el
@@ -81,6 +81,7 @@
 ;;   (with-temp-buffer (insert text))
 
 ;;; Code:
+(require 'skeleton)
 
 ;;; Predicates
 (defun sotlisp--auto-paired-p ()
@@ -203,8 +204,14 @@ See `sotlisp-define-function-abbrev'."
 (skip-chars-backward (rx alnum))
 (let* ((name (buffer-substring (point) r))
(expansion (gethash name sotlisp--function-table)))
-  (if (not expansion)
-  (progn (goto-char r) nil)
+  (cond
+   ((not expansion) (progn (goto-char r) nil))
+   ((consp expansion)
+(delete-region (point) r)
+(let ((skeleton-end-newline nil))
+  (skeleton-insert (cons "" expansion)))
+t)
+   ((stringp expansion)
 (delete-region (point) r)
 (if (sotlisp--function-quote-p)
 ;; After #' use the simple expansion.
@@ -214,7 +221,7 @@ See `sotlisp-define-function-abbrev'."
   (when (string-match "\\$" expansion)
 (setq sotlisp--needs-moving t)))
 ;; Must be last.
-(sotlisp--post-expansion-cleanup)
+(sotlisp--post-expansion-cleanup))
 
 (put 'sotlisp--expand-function 'no-self-insert t)
 
@@ -295,12 +302,12 @@ The space char is not included.  Any \"$\" are also 
removed."
 ("jos" . "just-one-space")
 ("jr" . "json-read$")
 ("jtr" . "jump-to-register ")
-("k" . "kbd \"$\"")
+("k" . ("kbd " (format "%S" (key-description (read-key-sequence-vector 
"Key: ")
 ("kb" . "kill-buffer")
 ("kn" . "kill-new ")
 ("kp" . "keywordp ")
 ("l" . "lambda ($)")
-("la" . "looking-at \"$\"")
+("la" . ("looking-at \"" - "\""))
 ("lap" . "looking-at-p \"$\"")
 ("lb" . "looking-back \"$\"")
 ("lbp" . "line-beginning-position")
@@ -658,7 +665,7 @@ With a prefix argument, defines a `defvar' instead of a 
`defcustom'."
   (skip-chars-backward "\r\n[:blank:]")
   (setq p (point-marker))
   (backward-up-list)))
-  ;; Re-comment everything before it. 
+  ;; Re-comment everything before it.
   (ignore-errors
 (comment-region beg p))
   ;; And everything after it.



[elpa] master 16506d7 5/5: Merge commit 'fffe8d0b42b143a2e7df0470d9049fa57b6ecac5'

2016-10-12 Thread Artur Malabarba
branch: master
commit 16506d762e15dffa8e33ced92d85396a9ba86b0a
Merge: 98e1de1 fffe8d0
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit 'fffe8d0b42b143a2e7df0470d9049fa57b6ecac5'
---
 packages/sotlisp/sotlisp.el |   21 ++---
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/packages/sotlisp/sotlisp.el b/packages/sotlisp/sotlisp.el
index 2ceb382..792fe1d 100644
--- a/packages/sotlisp/sotlisp.el
+++ b/packages/sotlisp/sotlisp.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/Malabarba/speed-of-thought-lisp
 ;; Keywords: convenience, lisp
 ;; Package-Requires: ((emacs "24.1"))
-;; Version: 1.5.2
+;; Version: 1.6.2
 
 ;; 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
@@ -81,6 +81,7 @@
 ;;   (with-temp-buffer (insert text))
 
 ;;; Code:
+(require 'skeleton)
 
 ;;; Predicates
 (defun sotlisp--auto-paired-p ()
@@ -101,7 +102,7 @@ Specially, avoids matching inside argument lists."
(not (sotlisp--looking-back 
"(\\(defun\\s-+.*\\|\\(lambda\\|dolist\\|dotimes\\)\\s-+\\)("))
(save-excursion
  (forward-char -1)
- (condition-case er
+ (condition-case nil
  (progn
(backward-up-list)
(forward-sexp -1)
@@ -203,8 +204,14 @@ See `sotlisp-define-function-abbrev'."
 (skip-chars-backward (rx alnum))
 (let* ((name (buffer-substring (point) r))
(expansion (gethash name sotlisp--function-table)))
-  (if (not expansion)
-  (progn (goto-char r) nil)
+  (cond
+   ((not expansion) (progn (goto-char r) nil))
+   ((consp expansion)
+(delete-region (point) r)
+(let ((skeleton-end-newline nil))
+  (skeleton-insert (cons "" expansion)))
+t)
+   ((stringp expansion)
 (delete-region (point) r)
 (if (sotlisp--function-quote-p)
 ;; After #' use the simple expansion.
@@ -214,7 +221,7 @@ See `sotlisp-define-function-abbrev'."
   (when (string-match "\\$" expansion)
 (setq sotlisp--needs-moving t)))
 ;; Must be last.
-(sotlisp--post-expansion-cleanup)
+(sotlisp--post-expansion-cleanup))
 
 (put 'sotlisp--expand-function 'no-self-insert t)
 
@@ -295,12 +302,12 @@ The space char is not included.  Any \"$\" are also 
removed."
 ("jos" . "just-one-space")
 ("jr" . "json-read$")
 ("jtr" . "jump-to-register ")
-("k" . "kbd \"$\"")
+("k" . ("kbd " (format "%S" (key-description (read-key-sequence-vector 
"Key: ")
 ("kb" . "kill-buffer")
 ("kn" . "kill-new ")
 ("kp" . "keywordp ")
 ("l" . "lambda ($)")
-("la" . "looking-at \"$\"")
+("la" . ("looking-at \"" - "\""))
 ("lap" . "looking-at-p \"$\"")
 ("lb" . "looking-back \"$\"")
 ("lbp" . "line-beginning-position")



[elpa] master 6564e18 1/5: Whitespace

2016-10-12 Thread Artur Malabarba
branch: master
commit 6564e18ba121bd1ce1527fbc49b5d4247f384e83
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Whitespace
---
 sotlisp.el |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/sotlisp.el b/sotlisp.el
index 95b626e..c52fe95 100644
--- a/sotlisp.el
+++ b/sotlisp.el
@@ -33,12 +33,12 @@
 ;;
 ;; A large number of abbrevs which expand function
 ;; initials to their name.  A few examples:
-;; 
+;;
 ;; - wcb -> with-current-buffer
 ;; - i -> insert
 ;; - r -> require '
 ;; - a -> and
-;; 
+;;
 ;; However, these are defined in a way such that they ONLY expand in a
 ;; place where you would use a function, so hitting SPC after "(r"
 ;; expands to "(require '", but hitting SPC after "(delete-region r"
@@ -52,32 +52,32 @@
 ;; thought-flow" way of writing.  The bindings are as follows, I
 ;; understand these don't fully adhere to conventions, and I'd
 ;; appreciate suggestions on better bindings.
-;; 
+;;
 ;; - M-RET :: Break line, and insert "()" with point in the middle.
 ;; - C-RET :: Do `forward-up-list', then do M-RET.
-;; 
+;;
 ;; Hitting RET followed by a `(' was one of the most common key sequences
 ;; for me while writing elisp, so giving it a quick-to-hit key was a
 ;; significant improvement.
-;; 
+;;
 ;; - C-c f :: Find function under point.  If it is not defined, create a
 ;; definition for it below the current function and leave point inside.
 ;; - C-c v :: Same, but for variable.
-;; 
+;;
 ;; With these commands, you just write your code as you think of it.  Once
 ;; you hit a "stop-point" of sorts in your tought flow, you hit `C-c f/v`
 ;; on any undefined functions/variables, write their definitions, and hit
 ;; `C-u C-SPC` to go back to the main function.
-;; 
+;;
 ;;; Small Example
 ;;
 ;; With the above (assuming you use something like paredit or
 ;; electric-pair-mode), if you write:
 ;;
 ;;   ( w t b M-RET i SPC text
-;; 
+;;
 ;; You get
-;; 
+;;
 ;;   (with-temp-buffer (insert text))
 
 ;;; Code:



[elpa] master fffe8d0 4/5: Version 1.6.2

2016-10-12 Thread Artur Malabarba
branch: master
commit fffe8d0b42b143a2e7df0470d9049fa57b6ecac5
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Version 1.6.2
---
 sotlisp.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sotlisp.el b/sotlisp.el
index 8f16cec..6f279a3 100644
--- a/sotlisp.el
+++ b/sotlisp.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/Malabarba/speed-of-thought-lisp
 ;; Keywords: convenience, lisp
 ;; Package-Requires: ((emacs "24.1"))
-;; Version: 1.5.2
+;; Version: 1.6.2
 
 ;; 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



[elpa] master 325c21e 3/5: Compiler warning

2016-10-12 Thread Artur Malabarba
branch: master
commit 325c21e0718aebf0d6929f67da2476dd53ab95bb
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Compiler warning
---
 sotlisp.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sotlisp.el b/sotlisp.el
index 8d036aa..8f16cec 100644
--- a/sotlisp.el
+++ b/sotlisp.el
@@ -102,7 +102,7 @@ Specially, avoids matching inside argument lists."
(not (sotlisp--looking-back 
"(\\(defun\\s-+.*\\|\\(lambda\\|dolist\\|dotimes\\)\\s-+\\)("))
(save-excursion
  (forward-char -1)
- (condition-case er
+ (condition-case nil
  (progn
(backward-up-list)
(forward-sexp -1)



[elpa] master e5e2f0a 1/3: Expand docstring. (#16)

2016-10-12 Thread Artur Malabarba
branch: master
commit e5e2f0a23c56cba750f93e74442104222f7f30c5
Author: Wilfred Hughes <m...@wilfred.me.uk>
Commit: Artur Malabarba <malaba...@users.noreply.github.com>

Expand docstring. (#16)

Previously, it wasn't clear how `nameless-insert-name-or-self-insert`
was different from `nameless-insert-name`, so describe when we self
insert.
---
 nameless.el |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/nameless.el b/nameless.el
index 735b4d8..0169774 100644
--- a/nameless.el
+++ b/nameless.el
@@ -229,7 +229,9 @@ configured, or if `nameless-current-name' is nil."
 (user-error "No name for current buffer, see 
`nameless-current-name'")
 
 (defun nameless-insert-name-or-self-insert ( self-insert)
-  "Insert the name of current package, with a hyphen."
+  "Insert the name of current package, with a hyphen.
+If point is in an argument list, or if we're typing an escaped
+character, insert the current character literally instead."
   (interactive "P")
   (let ((l (point)))
 (call-interactively #'self-insert-command)



[elpa] master ab1a5c5 2/3: Version 1.0.2

2016-10-12 Thread Artur Malabarba
branch: master
commit ab1a5c589378334eafca105af1a17f73b9065423
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Version 1.0.2
---
 nameless.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nameless.el b/nameless.el
index 0169774..9f34f32 100644
--- a/nameless.el
+++ b/nameless.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/nameless
 ;; Keywords: convenience, lisp
-;; Version: 1.0.1
+;; Version: 1.0.2
 ;; Package-Requires: ((emacs "24.4"))
 
 ;; This program is free software; you can redistribute it and/or modify



[elpa] master 98e1de1 3/3: Merge commit 'ab1a5c589378334eafca105af1a17f73b9065423'

2016-10-12 Thread Artur Malabarba
branch: master
commit 98e1de191a09ec16f13e59f6a1f0d6b1a51b9aa0
Merge: d0a3350 ab1a5c5
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit 'ab1a5c589378334eafca105af1a17f73b9065423'
---
 packages/nameless/nameless.el |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/packages/nameless/nameless.el b/packages/nameless/nameless.el
index 3f21756..eede973 100644
--- a/packages/nameless/nameless.el
+++ b/packages/nameless/nameless.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/nameless
 ;; Keywords: convenience, lisp
-;; Version: 1.0.1
+;; Version: 1.0.2
 ;; Package-Requires: ((emacs "24.4"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -229,7 +229,9 @@ configured, or if `nameless-current-name' is nil."
 (user-error "No name for current buffer, see 
`nameless-current-name'")
 
 (defun nameless-insert-name-or-self-insert ( self-insert)
-  "Insert the name of current package, with a hyphen."
+  "Insert the name of current package, with a hyphen.
+If point is in an argument list, or if we're typing an escaped
+character, insert the current character literally instead."
   (interactive "P")
   (let ((l (point)))
 (call-interactively #'self-insert-command)



[elpa] master updated (d0a3350 -> 98e1de1)

2016-10-12 Thread Artur Malabarba
malabarba pushed a change to branch master.

  from  d0a3350   Merge commit '3e73c363ca06b85eaa905ba0d0b17e08991e3d3e'
   new  e5e2f0a   Expand docstring. (#16)
   new  ab1a5c5   Version 1.0.2
   new  98e1de1   Merge commit 'ab1a5c589378334eafca105af1a17f73b9065423'


Summary of changes:
 packages/nameless/nameless.el |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)



[elpa] master b42d0bb 3/6: Add a few more excluded modes

2016-10-12 Thread Artur Malabarba
branch: master
commit b42d0bbb706da6c8f9c1f7f14dab92d41eeca949
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Add a few more excluded modes
---
 aggressive-indent.el |3 +++
 1 file changed, 3 insertions(+)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index 9e78ceb..bc65b92 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -124,6 +124,9 @@ Please include this in your report!"
 doc-view-mode
 dos-mode
 erc-mode
+feature-mode
+fortran-mode
+f90-mode
 jabber-chat-mode
 haml-mode
 haskell-mode



[elpa] master 6113459 4/6: Define aggressive-indent-sit-for-time

2016-10-12 Thread Artur Malabarba
branch: master
commit 61134590c5645fb5637acd6fa40d89689f9b0f34
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Define aggressive-indent-sit-for-time
---
 aggressive-indent.el |7 +++
 1 file changed, 7 insertions(+)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index bc65b92..717df2e 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -371,6 +371,12 @@ or messages."
   (setq aggressive-indent--changed-list
 (cdr aggressive-indent--changed-list)
 
+(defcustom aggressive-indent-sit-for-time 0.05
+  "Time, in seconds, to wait before indenting.
+If you feel aggressive-indent is causing Emacs to hang while
+typing, try tweaking this number."
+  :type 'float)
+
 (defun aggressive-indent--indent-if-changed ()
   "Indent any region that changed in the last command loop."
   (when aggressive-indent--changed-list
@@ -379,6 +385,7 @@ or messages."
 (unless (or (run-hook-wrapped 
'aggressive-indent--internal-dont-indent-if #'eval)
 (aggressive-indent--run-user-hooks))
   (while-no-input
+(sit-for aggressive-indent-sit-for-time t)
 (redisplay)
 (aggressive-indent--proccess-changed-list-and-indent)))
 



[elpa] master updated (2405d7a -> d0a3350)

2016-10-12 Thread Artur Malabarba
malabarba pushed a change to branch master.

  from  2405d7a   Merge commit 'c9d86457d43decf61810006752544d7f7bd5a61d'
   new  e49252f   Change aggressive-indent-dont-electric-modes to be nil by 
default
   new  6c3842e   Add scala-mode to excluded-modes (#88)
   new  b42d0bb   Add a few more excluded modes
   new  6113459   Define aggressive-indent-sit-for-time
   new  3e73c36   Version 1.8.2
   new  d0a3350   Merge commit '3e73c363ca06b85eaa905ba0d0b17e08991e3d3e'


Summary of changes:
 packages/aggressive-indent/aggressive-indent.el |   15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)



[elpa] master e49252f 1/6: Change aggressive-indent-dont-electric-modes to be nil by default

2016-10-12 Thread Artur Malabarba
branch: master
commit e49252fcb56982fd9b1d215d5477c80fc2a98ec9
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Change aggressive-indent-dont-electric-modes to be nil by default
---
 aggressive-indent.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index e6dba72..4619543 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -105,7 +105,7 @@ Please include this in your report!"
 (defvar aggressive-indent-mode)
 
 ;;; Configuring indentarion
-(defcustom aggressive-indent-dont-electric-modes '(ruby-mode)
+(defcustom aggressive-indent-dont-electric-modes nil
   "List of major-modes where `electric-indent' should be disabled."
   :type '(choice
   (const :tag "Never use `electric-indent-mode'." t)



[elpa] master 2405d7a 5/5: Merge commit 'c9d86457d43decf61810006752544d7f7bd5a61d'

2016-10-12 Thread Artur Malabarba
branch: master
commit 2405d7a15c976f1b6768660556839ac3fd78f887
Merge: 64a30e7 c9d8645
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit 'c9d86457d43decf61810006752544d7f7bd5a61d'
---
 packages/beacon/beacon.el |   15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/packages/beacon/beacon.el b/packages/beacon/beacon.el
index 9a3edac..2c33d5e 100644
--- a/packages/beacon/beacon.el
+++ b/packages/beacon/beacon.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/beacon
 ;; Keywords: convenience
-;; Version: 1.3.1
+;; Version: 1.3.2
 ;; Package-Requires: ((seq "2.14"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -147,7 +147,13 @@ For instance, if you want to disable beacon on buffers 
where
 (add-hook \\='beacon-dont-blink-predicates
   (lambda () (bound-and-true-p hl-line-mode)))")
 
+(defun beacon--compilation-mode-p ()
+  "Non-nil if this is some form of compilation mode."
+  (or (derived-mode-p 'compilation-mode)
+  (bound-and-true-p compilation-minor-mode)))
+
 (add-hook 'beacon-dont-blink-predicates #'window-minibuffer-p)
+(add-hook 'beacon-dont-blink-predicates #'beacon--compilation-mode-p)
 
 (defcustom beacon-dont-blink-major-modes '(t magit-status-mode magit-popup-mode
inf-ruby-mode
@@ -280,9 +286,10 @@ Only returns `beacon-size' elements."
(color-distance "white" bg)))
(make-list 3 (* beacon-color 65535)))
   (t (make-list 3 (* (- 1 beacon-color) 65535))
-(apply #'seq-mapn (lambda (r g b) (format "#%04x%04x%04x" r g b))
-   (mapcar (lambda (n) (butlast (beacon--int-range (elt fg n) (elt bg 
n
-   [0 1 2]
+(when bg
+  (apply #'seq-mapn (lambda (r g b) (format "#%04x%04x%04x" r g b))
+ (mapcar (lambda (n) (butlast (beacon--int-range (elt fg n) (elt 
bg n
+ [0 1 2])
 
 
 ;;; Blinking



[elpa] master c9cc62d 2/5: Merge pull request #50 from DamienCassou/fix-crash-in-emacs-daemon

2016-10-12 Thread Artur Malabarba
branch: master
commit c9cc62d42ef0c14079c97890bdd402c8efa4e52b
Merge: aaeb619 913086b
Author: Artur Malabarba <malaba...@users.noreply.github.com>
Commit: GitHub <nore...@github.com>

Merge pull request #50 from DamienCassou/fix-crash-in-emacs-daemon

Don't crash when Emacs runs as a daemon
---
 beacon.el |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/beacon.el b/beacon.el
index 9a3edac..93e6646 100644
--- a/beacon.el
+++ b/beacon.el
@@ -280,9 +280,10 @@ Only returns `beacon-size' elements."
(color-distance "white" bg)))
(make-list 3 (* beacon-color 65535)))
   (t (make-list 3 (* (- 1 beacon-color) 65535))
-(apply #'seq-mapn (lambda (r g b) (format "#%04x%04x%04x" r g b))
-   (mapcar (lambda (n) (butlast (beacon--int-range (elt fg n) (elt bg 
n
-   [0 1 2]
+(when bg
+  (apply #'seq-mapn (lambda (r g b) (format "#%04x%04x%04x" r g b))
+ (mapcar (lambda (n) (butlast (beacon--int-range (elt fg n) (elt 
bg n
+ [0 1 2])
 
 
 ;;; Blinking



[elpa] master updated (64a30e7 -> 2405d7a)

2016-10-12 Thread Artur Malabarba
malabarba pushed a change to branch master.

  from  64a30e7   debbugs-gnu.el: Add "26.1"
   new  913086b   Don't crash when Emacs runs as a daemon
   new  c9cc62d   Merge pull request #50 from 
DamienCassou/fix-crash-in-emacs-daemon
   new  31ded26   Don't blink in compilation modes
   new  c9d8645   Version 1.3.2
   new  2405d7a   Merge commit 'c9d86457d43decf61810006752544d7f7bd5a61d'


Summary of changes:
 packages/beacon/beacon.el |   15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)



[elpa] master c9d8645 4/5: Version 1.3.2

2016-10-12 Thread Artur Malabarba
branch: master
commit c9d86457d43decf61810006752544d7f7bd5a61d
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Version 1.3.2
---
 beacon.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/beacon.el b/beacon.el
index 51bb677..2c33d5e 100644
--- a/beacon.el
+++ b/beacon.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/beacon
 ;; Keywords: convenience
-;; Version: 1.3.1
+;; Version: 1.3.2
 ;; Package-Requires: ((seq "2.14"))
 
 ;; This program is free software; you can redistribute it and/or modify



[elpa] master 31ded26 3/5: Don't blink in compilation modes

2016-10-12 Thread Artur Malabarba
branch: master
commit 31ded26892f2bd2a62d14e027c27986c5a164f8f
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Don't blink in compilation modes
---
 beacon.el |6 ++
 1 file changed, 6 insertions(+)

diff --git a/beacon.el b/beacon.el
index 93e6646..51bb677 100644
--- a/beacon.el
+++ b/beacon.el
@@ -147,7 +147,13 @@ For instance, if you want to disable beacon on buffers 
where
 (add-hook \\='beacon-dont-blink-predicates
   (lambda () (bound-and-true-p hl-line-mode)))")
 
+(defun beacon--compilation-mode-p ()
+  "Non-nil if this is some form of compilation mode."
+  (or (derived-mode-p 'compilation-mode)
+  (bound-and-true-p compilation-minor-mode)))
+
 (add-hook 'beacon-dont-blink-predicates #'window-minibuffer-p)
+(add-hook 'beacon-dont-blink-predicates #'beacon--compilation-mode-p)
 
 (defcustom beacon-dont-blink-major-modes '(t magit-status-mode magit-popup-mode
inf-ruby-mode



[elpa] master b245dbe 3/3: Merge commit 'aaeb619f1ff57e666925bcef22bb3195c22d589e'

2016-05-26 Thread Artur Malabarba
branch: master
commit b245dbe9f18d38f67385c1986c255aac854ef9c8
Merge: b783daa aaeb619
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit 'aaeb619f1ff57e666925bcef22bb3195c22d589e'
---
 packages/beacon/beacon.el |   12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/packages/beacon/beacon.el b/packages/beacon/beacon.el
index 8126c43..9a3edac 100644
--- a/packages/beacon/beacon.el
+++ b/packages/beacon/beacon.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/beacon
 ;; Keywords: convenience
-;; Version: 1.3.0
+;; Version: 1.3.1
 ;; Package-Requires: ((seq "2.14"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -242,10 +242,12 @@ COLORS applied to each one."
 
 (defun beacon--vanish ( _)
   "Turn off the beacon."
-  (when (timerp beacon--timer)
-(cancel-timer beacon--timer))
-  (mapc #'delete-overlay beacon--ovs)
-  (setq beacon--ovs nil))
+  (unless (string-match "\\` \\*\\(temp-buffer\\|Echo Area.*\\)\\*"
+(buffer-name))
+(when (timerp beacon--timer)
+  (cancel-timer beacon--timer))
+(mapc #'delete-overlay beacon--ovs)
+(setq beacon--ovs nil)))
 
 
 ;;; Colors



[elpa] master e3df6b5 1/3: Fix #49 - Don't vanish the beacon due to changes in the Echo Area

2016-05-26 Thread Artur Malabarba
branch: master
commit e3df6b5cf259a38bb2c0188cc70c7ca0f8e957eb
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Fix #49 - Don't vanish the beacon due to changes in the Echo Area
---
 beacon.el |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/beacon.el b/beacon.el
index 8126c43..6b71ee0 100644
--- a/beacon.el
+++ b/beacon.el
@@ -242,10 +242,12 @@ COLORS applied to each one."
 
 (defun beacon--vanish ( _)
   "Turn off the beacon."
-  (when (timerp beacon--timer)
-(cancel-timer beacon--timer))
-  (mapc #'delete-overlay beacon--ovs)
-  (setq beacon--ovs nil))
+  (unless (string-match "\\` \\*\\(temp-buffer\\|Echo Area.*\\)\\*"
+(buffer-name))
+(when (timerp beacon--timer)
+  (cancel-timer beacon--timer))
+(mapc #'delete-overlay beacon--ovs)
+(setq beacon--ovs nil)))
 
 
 ;;; Colors



[elpa] master updated (b783daa -> b245dbe)

2016-05-26 Thread Artur Malabarba
malabarba pushed a change to branch master.

  from  b783daa   smart-yank version 0.1.1
   new  e3df6b5   Fix #49 - Don't vanish the beacon due to changes in the 
Echo Area
   new  aaeb619   Version 1.3.1
   new  b245dbe   Merge commit 'aaeb619f1ff57e666925bcef22bb3195c22d589e'


Summary of changes:
 packages/beacon/beacon.el |   12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)



[elpa] master 8438ff5 2/3: Add inf-ruby mode to dont-indent-modes

2016-05-18 Thread Artur Malabarba
branch: master
commit 8438ff5e71ca040e7a1e325d608a3f5ea050503f
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Add inf-ruby mode to dont-indent-modes
---
 aggressive-indent.el |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index 7894de6..e6dba72 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/aggressive-indent-mode
-;; Version: 1.7
+;; Version: 1.8.1
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: indent lisp maint tools
 ;; Prefix: aggressive-indent
@@ -129,6 +129,7 @@ Please include this in your report!"
 haskell-mode
 haskell-interactive-mode
 image-mode
+inf-ruby-mode
 makefile-mode
 makefile-gmake-mode
 minibuffer-inactive-mode



[elpa] master updated (a49bd1c -> 283f470)

2016-05-18 Thread Artur Malabarba
malabarba pushed a change to branch master.

  from  a49bd1c   Remove async-pkg.el file added by error during merge.
   new  f2dc80a   Remove remaining reference to 
aggressive-indent--check-parens
   new  8438ff5   Add inf-ruby mode to dont-indent-modes
   new  283f470   Merge commit '8438ff5e71ca040e7a1e325d608a3f5ea050503f'


Summary of changes:
 packages/aggressive-indent/aggressive-indent.el |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



[elpa] master f2dc80a 1/3: Remove remaining reference to aggressive-indent--check-parens

2016-05-18 Thread Artur Malabarba
branch: master
commit f2dc80a95fc7645a3d860d0c730886cb3d64536b
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Remove remaining reference to aggressive-indent--check-parens
---
 aggressive-indent.el |1 -
 1 file changed, 1 deletion(-)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index f116129..7894de6 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -407,7 +407,6 @@ or messages."
 (cl-member-if #'derived-mode-p 
aggressive-indent-dont-electric-modes))
 (aggressive-indent--local-electric nil)
   (aggressive-indent--local-electric t))
-(aggressive-indent--check-parens)
 (add-hook 'after-change-functions 
#'aggressive-indent--keep-track-of-changes nil 'local)
 (add-hook 'before-save-hook 
#'aggressive-indent--proccess-changed-list-and-indent nil 'local)
 (add-hook 'post-command-hook #'aggressive-indent--indent-if-changed 
nil 'local))



[elpa] master 4c77f20 2/2: Merge commit 'eaab57092284028b1567622c96d9b332de3c7a4d'

2016-05-18 Thread Artur Malabarba
branch: master
commit 4c77f20e144dc409e3c59abdb7105fb0db41ee54
Merge: 6ad010c eaab570
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit 'eaab57092284028b1567622c96d9b332de3c7a4d'
---
 packages/aggressive-indent/aggressive-indent.el |   17 ++---
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/packages/aggressive-indent/aggressive-indent.el 
b/packages/aggressive-indent/aggressive-indent.el
index ac3ff96..9c1f7d7 100644
--- a/packages/aggressive-indent/aggressive-indent.el
+++ b/packages/aggressive-indent/aggressive-indent.el
@@ -348,10 +348,6 @@ or messages."
   "List of (left right) limit of regions changed in the last command loop.")
 (make-variable-buffer-local 'aggressive-indent--changed-list)
 
-(defvar aggressive-indent--balanced-parens t
-  "Non-nil if the current-buffer has balanced parens.")
-(make-variable-buffer-local 'aggressive-indent--balanced-parens)
-
 (defun aggressive-indent--proccess-changed-list-and-indent ()
   "Indent the regions in `aggressive-indent--changed-list'."
   (let ((inhibit-modification-hooks t)
@@ -371,7 +367,7 @@ or messages."
 
 (defun aggressive-indent--indent-if-changed ()
   "Indent any region that changed in the last command loop."
-  (when (and aggressive-indent--changed-list 
aggressive-indent--balanced-parens)
+  (when aggressive-indent--changed-list
 (save-excursion
   (save-selected-window
 (unless (or (run-hook-wrapped 
'aggressive-indent--internal-dont-indent-if #'eval)
@@ -380,19 +376,10 @@ or messages."
 (redisplay)
 (aggressive-indent--proccess-changed-list-and-indent)))
 
-(defun aggressive-indent--check-parens ()
-  "Check if parens are balanced in the current buffer.
-Store result in `aggressive-indent--balanced-parens'."
-  (setq aggressive-indent--balanced-parens
-(save-excursion
-  (ignore-errors
-(zerop (car (syntax-ppss (point-max
-
 (defun aggressive-indent--keep-track-of-changes (l r  _)
   "Store the limits (L and R) of each change in the buffer."
   (when aggressive-indent-mode
-(push (list l r) aggressive-indent--changed-list)
-(aggressive-indent--check-parens)))
+(push (list l r) aggressive-indent--changed-list)))
 
 ;;; Minor modes
 ;;;###autoload



[elpa] master eaab570 1/2: Ditch the check-parens functionality

2016-05-18 Thread Artur Malabarba
branch: master
commit eaab57092284028b1567622c96d9b332de3c7a4d
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Ditch the check-parens functionality

For some unknown reason, it interacts poorly with query-replace.
---
 aggressive-indent.el |   17 ++---
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index 9530bf2..f116129 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -349,10 +349,6 @@ or messages."
   "List of (left right) limit of regions changed in the last command loop.")
 (make-variable-buffer-local 'aggressive-indent--changed-list)
 
-(defvar aggressive-indent--balanced-parens t
-  "Non-nil if the current-buffer has balanced parens.")
-(make-variable-buffer-local 'aggressive-indent--balanced-parens)
-
 (defun aggressive-indent--proccess-changed-list-and-indent ()
   "Indent the regions in `aggressive-indent--changed-list'."
   (let ((inhibit-modification-hooks t)
@@ -372,7 +368,7 @@ or messages."
 
 (defun aggressive-indent--indent-if-changed ()
   "Indent any region that changed in the last command loop."
-  (when (and aggressive-indent--changed-list 
aggressive-indent--balanced-parens)
+  (when aggressive-indent--changed-list
 (save-excursion
   (save-selected-window
 (unless (or (run-hook-wrapped 
'aggressive-indent--internal-dont-indent-if #'eval)
@@ -381,19 +377,10 @@ or messages."
 (redisplay)
 (aggressive-indent--proccess-changed-list-and-indent)))
 
-(defun aggressive-indent--check-parens ()
-  "Check if parens are balanced in the current buffer.
-Store result in `aggressive-indent--balanced-parens'."
-  (setq aggressive-indent--balanced-parens
-(save-excursion
-  (ignore-errors
-(zerop (car (syntax-ppss (point-max
-
 (defun aggressive-indent--keep-track-of-changes (l r  _)
   "Store the limits (L and R) of each change in the buffer."
   (when aggressive-indent-mode
-(push (list l r) aggressive-indent--changed-list)
-(aggressive-indent--check-parens)))
+(push (list l r) aggressive-indent--changed-list)))
 
 ;;; Minor modes
 ;;;###autoload



[elpa] master 06e8bd7 1/2: validate-setq takes any even number of args

2016-05-12 Thread Artur Malabarba
branch: master
commit 06e8bd7d4c31ba5b10cf5c18a13c5370045cea71
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

validate-setq takes any even number of args
---
 validate.el |   24 +---
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/validate.el b/validate.el
index 286835e..7ca4b0a 100644
--- a/validate.el
+++ b/validate.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; Keywords: lisp
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
-;; Version: 0.4
+;; Version: 0.5
 
 ;;; Commentary:
 ;;
@@ -188,13 +188,23 @@ with `validate-value'. NOERROR is passed to 
`validate-value'."
(lambda (val)
  (validate-value val (custom-variable-type symbol) 'noerror
 
-(defmacro validate-setq (symbol value)
+(defmacro validate-setq ( svs)
   "Like `setq', but throw an error if validation fails.
-VALUE is validated against SYMBOL's custom type."
-  `(if (boundp ',symbol)
-   (setq ,symbol (validate-value ,value (custom-variable-type ',symbol)))
- (user-error "Trying to validate a variable that's not defined yet: 
`%s'.\nYou need to require the package before validating"
- ',symbol)))
+VALUE is validated against SYMBOL's custom type.
+
+\(fn [SYM VAL] ...)"
+  (let ((out))
+(while svs
+  (let ((symbol (pop svs))
+(value (if (not svs)
+   (error "`validate-setq' takes an even number of 
arguments")
+ (pop svs
+(push `(if (boundp ',symbol)
+   (setq ,symbol (validate-value ,value (custom-variable-type 
',symbol)))
+ (user-error "Trying to validate a variable that's not defined 
yet: `%s'.\nYou need to require the package before validating"
+ ',symbol))
+  out)))
+`(progn ,@(reverse out
 
 (provide 'validate)
 ;;; validate.el ends here



[elpa] master 423a6b2 2/2: Merge commit '06e8bd7d4c31ba5b10cf5c18a13c5370045cea71'

2016-05-12 Thread Artur Malabarba
branch: master
commit 423a6b218804a210486fdb06af44bcc700b1bca4
Merge: 40fd76b 06e8bd7
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit '06e8bd7d4c31ba5b10cf5c18a13c5370045cea71'
---
 packages/validate/validate.el |   24 +---
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/packages/validate/validate.el b/packages/validate/validate.el
index 286835e..7ca4b0a 100644
--- a/packages/validate/validate.el
+++ b/packages/validate/validate.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; Keywords: lisp
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
-;; Version: 0.4
+;; Version: 0.5
 
 ;;; Commentary:
 ;;
@@ -188,13 +188,23 @@ with `validate-value'. NOERROR is passed to 
`validate-value'."
(lambda (val)
  (validate-value val (custom-variable-type symbol) 'noerror
 
-(defmacro validate-setq (symbol value)
+(defmacro validate-setq ( svs)
   "Like `setq', but throw an error if validation fails.
-VALUE is validated against SYMBOL's custom type."
-  `(if (boundp ',symbol)
-   (setq ,symbol (validate-value ,value (custom-variable-type ',symbol)))
- (user-error "Trying to validate a variable that's not defined yet: 
`%s'.\nYou need to require the package before validating"
- ',symbol)))
+VALUE is validated against SYMBOL's custom type.
+
+\(fn [SYM VAL] ...)"
+  (let ((out))
+(while svs
+  (let ((symbol (pop svs))
+(value (if (not svs)
+   (error "`validate-setq' takes an even number of 
arguments")
+ (pop svs
+(push `(if (boundp ',symbol)
+   (setq ,symbol (validate-value ,value (custom-variable-type 
',symbol)))
+ (user-error "Trying to validate a variable that's not defined 
yet: `%s'.\nYou need to require the package before validating"
+ ',symbol))
+  out)))
+`(progn ,@(reverse out
 
 (provide 'validate)
 ;;; validate.el ends here



[elpa] master 12e857a 1/3: Improve readability of the error message

2016-05-10 Thread Artur Malabarba
branch: master
commit 12e857ab9562320806fd0f7fe5fa19a1a395556a
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Improve readability of the error message
---
 validate.el |   12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/validate.el b/validate.el
index 7dfe45b..2d66a27 100644
--- a/validate.el
+++ b/validate.el
@@ -64,6 +64,9 @@
   "wrong number of elements"
 (seq-find #'identity (seq-mapn #'validate--check values schemas
 
+(defun validate--indent-by-2 (x)
+  (replace-regexp-in-string "^" "  " x))
+
 (defun validate--check (value schema)
   "Return nil if VALUE matches SCHEMA.
 If they don't match, return an explanation."
@@ -127,8 +130,8 @@ If they don't match, return an explanation."
(error "`choice' needs at least one 
argument")
  (let ((gather (mapcar (lambda (x) 
(validate--check value x)) args)))
(when (seq-every-p #'identity gather)
- (concat "all of the options failed\n  "
- (mapconcat #'identity gather "\n  
"))
+ (concat "all of the options failed\n"
+ (mapconcat 
#'validate--indent-by-2 gather "\n"))
;; TODO: `restricted-sexp'
(set (or (wtype 'list)
 (let ((failed (list t)))
@@ -145,7 +148,10 @@ If they don't match, return an explanation."
 (let ((print-length 4)
   (print-level 2))
   (format "Looking for `%S' in `%S' failed because:\n%s"
-  schema value r))
+  schema value
+  (if (string-match "\\`Looking" r)
+  r
+(validate--indent-by-2 r
 
 
 ;;; Exposed API



[elpa] master 7371d05 2/3: Don't try to validate undefined vars

2016-05-10 Thread Artur Malabarba
branch: master
commit 7371d05adf4e86f8c6c507d6a8177abac1680d06
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Don't try to validate undefined vars
---
 validate.el |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/validate.el b/validate.el
index 2d66a27..286835e 100644
--- a/validate.el
+++ b/validate.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; Keywords: lisp
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
-;; Version: 0.3
+;; Version: 0.4
 
 ;;; Commentary:
 ;;
@@ -191,7 +191,10 @@ with `validate-value'. NOERROR is passed to 
`validate-value'."
 (defmacro validate-setq (symbol value)
   "Like `setq', but throw an error if validation fails.
 VALUE is validated against SYMBOL's custom type."
-  `(setq ,symbol (validate-value ,value (custom-variable-type ',symbol
+  `(if (boundp ',symbol)
+   (setq ,symbol (validate-value ,value (custom-variable-type ',symbol)))
+ (user-error "Trying to validate a variable that's not defined yet: 
`%s'.\nYou need to require the package before validating"
+ ',symbol)))
 
 (provide 'validate)
 ;;; validate.el ends here



[elpa] master cb2d5b2 2/2: Merge commit '3659f0267f1a70a7141b7d53d8a0696d40247c08'

2016-05-04 Thread Artur Malabarba
branch: master
commit cb2d5b29dbdf0aab7f4804438e53bfa1a4dcd82d
Merge: f94daca 3659f02
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit '3659f0267f1a70a7141b7d53d8a0696d40247c08'
---
 packages/validate/validate.el |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/packages/validate/validate.el b/packages/validate/validate.el
index 8408b63..7dfe45b 100644
--- a/packages/validate/validate.el
+++ b/packages/validate/validate.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; Keywords: lisp
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
-;; Version: 0.2
+;; Version: 0.3
 
 ;;; Commentary:
 ;;
@@ -182,5 +182,10 @@ with `validate-value'. NOERROR is passed to 
`validate-value'."
(lambda (val)
  (validate-value val (custom-variable-type symbol) 'noerror
 
+(defmacro validate-setq (symbol value)
+  "Like `setq', but throw an error if validation fails.
+VALUE is validated against SYMBOL's custom type."
+  `(setq ,symbol (validate-value ,value (custom-variable-type ',symbol
+
 (provide 'validate)
 ;;; validate.el ends here



[elpa] master 3659f02 1/2: Add validate-setq

2016-05-04 Thread Artur Malabarba
branch: master
commit 3659f0267f1a70a7141b7d53d8a0696d40247c08
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Add validate-setq
---
 validate.el |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/validate.el b/validate.el
index 8408b63..7dfe45b 100644
--- a/validate.el
+++ b/validate.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; Keywords: lisp
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
-;; Version: 0.2
+;; Version: 0.3
 
 ;;; Commentary:
 ;;
@@ -182,5 +182,10 @@ with `validate-value'. NOERROR is passed to 
`validate-value'."
(lambda (val)
  (validate-value val (custom-variable-type symbol) 'noerror
 
+(defmacro validate-setq (symbol value)
+  "Like `setq', but throw an error if validation fails.
+VALUE is validated against SYMBOL's custom type."
+  `(setq ,symbol (validate-value ,value (custom-variable-type ',symbol
+
 (provide 'validate)
 ;;; validate.el ends here



[elpa] master de55883 4/7: Fix license

2016-05-04 Thread Artur Malabarba
branch: master
commit de55883970f631196ae8c8f7b0531bd92151b74e
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Fix license
---
 validate.el |   33 ++---
 1 file changed, 18 insertions(+), 15 deletions(-)

diff --git a/validate.el b/validate.el
index 0482be3..1ded67b 100644
--- a/validate.el
+++ b/validate.el
@@ -7,19 +7,6 @@
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Version: 0.1
 
-;; 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 library offers two functions that perform schema validation.
@@ -45,10 +32,26 @@
 ;; matches.  The function `validate-variable' verifies whether the value of a
 ;; custom variable matches its custom-type, while `validate-value' checks an
 ;; arbitrary value against an arbitrary schema.
+;;
+;; Missing features: `:inline', `plist', `coding-system', `color',
+;; `hook', `restricted-sexp'.
 
-;;; Todo:
+;;; License:
 ;;
-;; :inline, `plist',`coding-system',`color',`hook',`restricted-sexp'.
+;; This file is part of GNU Emacs.
+;;
+;; GNU Emacs 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.
+;;
+;; GNU Emacs 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 GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Code:
 (require 'cl-lib)



[elpa] master f94daca 7/7: Add 'packages/validate/' from commit '95865f28b0f0b6386b8dcdf2b084f1cd79ffab0d'

2016-05-04 Thread Artur Malabarba
branch: master
commit f94daca2487f73330315b06debd2cefe9fce7cae
Merge: 76b6d32 95865f2
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Add 'packages/validate/' from commit 
'95865f28b0f0b6386b8dcdf2b084f1cd79ffab0d'

git-subtree-dir: packages/validate
git-subtree-mainline: 76b6d32e155b55a79d23c15f37cc5d6a647e8f83
git-subtree-split: 95865f28b0f0b6386b8dcdf2b084f1cd79ffab0d
---
 packages/validate/validate.el |  186 +
 1 file changed, 186 insertions(+)

diff --git a/packages/validate/validate.el b/packages/validate/validate.el
new file mode 100644
index 000..8408b63
--- /dev/null
+++ b/packages/validate/validate.el
@@ -0,0 +1,186 @@
+;;; validate.el --- Schema validation for Emacs-lisp  -*- lexical-binding: t; 
-*-
+
+;; Copyright (C) 2016  Free Software Foundation, Inc.
+
+;; Author: Artur Malabarba <em...@endlessparentheses.com>
+;; Keywords: lisp
+;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
+;; Version: 0.2
+
+;;; Commentary:
+;;
+;; This library offers two functions that perform schema validation.
+;; Use this is your Elisp packages to provide very informative error
+;; messages when your users accidentally misconfigure a variable.
+;; For instance, if everything is fine, these do the same thing:
+;;
+;;   1.  (validate-variable 'cider-known-endpoints)
+;;   2.  cider-known-endpoints
+;;
+;; However, if the user has misconfigured this variable, option
+;; 1. will immediately give them an informative error message, while
+;; option 2. won't say anything and will lead to confusing errors down
+;; the line.
+;;
+;; The format and language of the schemas is the same one used in the
+;; `:type' property of a `defcustom'.
+;;
+;; See: (info "(elisp) Customization Types")
+;;
+;; Both functions throw a `user-error' if the value in question
+;; doesn't match the schema, and return the value itself if it
+;; matches.  The function `validate-variable' verifies whether the value of a
+;; custom variable matches its custom-type, while `validate-value' checks an
+;; arbitrary value against an arbitrary schema.
+;;
+;; Missing features: `:inline', `plist', `coding-system', `color',
+;; `hook', `restricted-sexp'.
+
+;;; License:
+;;
+;; This file is part of GNU Emacs.
+;;
+;; GNU Emacs 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.
+;;
+;; GNU Emacs 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 GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Code:
+(require 'cl-lib)
+(require 'seq)
+(require 'cus-edit)
+
+(defun validate--check-list-contents (values schemas)
+  "Check that all VALUES match all SCHEMAS."
+  (if (not (= (length values) (length schemas)))
+  "wrong number of elements"
+(seq-find #'identity (seq-mapn #'validate--check values schemas
+
+(defun validate--check (value schema)
+  "Return nil if VALUE matches SCHEMA.
+If they don't match, return an explanation."
+  (let ((args (cdr-safe schema))
+(expected-type (or (car-safe schema) schema))
+(props nil))
+(while (and (keywordp (car args)) (cdr args))
+  (setq props `(,(pop args) ,(pop args) ,@props)))
+(setq args (or (plist-get props :args)
+   args))
+(let ((r
+   (cl-labels ((wtype   ;wrong-type
+(tt) (unless (funcall (intern (format "%sp" tt)) value)
+   (format "not a %s" tt
+ ;; TODO: hook (top-level only).
+ (cl-case expected-type
+   ((sexp other) nil)
+   (variable (cond ((wtype 'symbol))
+   ((not (boundp value)) "this symbol has no 
variable binding")))
+   ((integer number float string character symbol function boolean 
face)
+(wtype expected-type))
+   (regexp (cond ((ignore-errors (string-match value "") t) nil)
+ ((wtype 'string))
+ (t "not a valid regexp")))
+   (repeat (cond
+((or (not args) (cdr args)) (error "`repeat' needs 
exactly one argument"))
+((wtype 'list))
+(t (let ((subschema (car args)))
+ (seq-some (lambda (v) (validate--check v 
subschema)) value)
+   ((c

[elpa] master dfae733 3/7: Add TODO

2016-05-04 Thread Artur Malabarba
branch: master
commit dfae733bf0cea4988a23ab18f5b0c2a8d16682ca
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Add TODO
---
 validate.el |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/validate.el b/validate.el
index ef628e9..0482be3 100644
--- a/validate.el
+++ b/validate.el
@@ -21,7 +21,7 @@
 ;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
-
+;;
 ;; This library offers two functions that perform schema validation.
 ;; Use this is your Elisp packages to provide very informative error
 ;; messages when your users accidentally misconfigure a variable.
@@ -46,6 +46,10 @@
 ;; custom variable matches its custom-type, while `validate-value' checks an
 ;; arbitrary value against an arbitrary schema.
 
+;;; Todo:
+;;
+;; :inline, `plist',`coding-system',`color',`hook',`restricted-sexp'.
+
 ;;; Code:
 (require 'cl-lib)
 (require 'seq)
@@ -68,7 +72,7 @@ If they don't match, return an explanation."
 (setq args (or (plist-get props :args)
args))
 (let ((r
-   (cl-labels ((wtype ;wrong-type
+   (cl-labels ((wtype   ;wrong-type
 (tt) (unless (funcall (intern (format "%sp" tt)) value)
(format "not a %s" tt
  ;; TODO: hook (top-level only).



[elpa] master updated (76b6d32 -> f94daca)

2016-05-04 Thread Artur Malabarba
malabarba pushed a change to branch master.

  from  76b6d32   packages/arbitools.el: Removed unused variables
   new  ae969be   First commit
   new  2407815   First release
   new  dfae733   Add TODO
   new  de55883   Fix license
   new  dbafdb9   Add validate-mark-safe-local
   new  95865f2   Fix copyright
   new  f94daca   Add 'packages/validate/' from commit 
'95865f28b0f0b6386b8dcdf2b084f1cd79ffab0d'


Summary of changes:
 packages/validate/validate.el |  186 +
 1 file changed, 186 insertions(+)
 create mode 100644 packages/validate/validate.el



[elpa] master 95865f2 6/7: Fix copyright

2016-05-04 Thread Artur Malabarba
branch: master
commit 95865f28b0f0b6386b8dcdf2b084f1cd79ffab0d
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Fix copyright
---
 validate.el |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/validate.el b/validate.el
index 9eebe9a..8408b63 100644
--- a/validate.el
+++ b/validate.el
@@ -1,11 +1,11 @@
 ;;; validate.el --- Schema validation for Emacs-lisp  -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2016  Artur Malabarba
+;; Copyright (C) 2016  Free Software Foundation, Inc.
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; Keywords: lisp
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
-;; Version: 0.1
+;; Version: 0.2
 
 ;;; Commentary:
 ;;



[elpa] master 2407815 2/7: First release

2016-05-04 Thread Artur Malabarba
branch: master
commit 24078157b6a5b0b7dbb830e4242dd715dcf89e32
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

First release
---
 validate.el |   38 --
 1 file changed, 32 insertions(+), 6 deletions(-)

diff --git a/validate.el b/validate.el
index 3afe7b7..ef628e9 100644
--- a/validate.el
+++ b/validate.el
@@ -4,6 +4,8 @@
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; Keywords: lisp
+;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
+;; Version: 0.1
 
 ;; 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
@@ -20,9 +22,34 @@
 
 ;;; Commentary:
 
+;; This library offers two functions that perform schema validation.
+;; Use this is your Elisp packages to provide very informative error
+;; messages when your users accidentally misconfigure a variable.
+;; For instance, if everything is fine, these do the same thing:
 ;;
+;;   1.  (validate-variable 'cider-known-endpoints)
+;;   2.  cider-known-endpoints
+;;
+;; However, if the user has misconfigured this variable, option
+;; 1. will immediately give them an informative error message, while
+;; option 2. won't say anything and will lead to confusing errors down
+;; the line.
+;;
+;; The format and language of the schemas is the same one used in the
+;; `:type' property of a `defcustom'.
+;;
+;; See: (info "(elisp) Customization Types")
+;;
+;; Both functions throw a `user-error' if the value in question
+;; doesn't match the schema, and return the value itself if it
+;; matches.  The function `validate-variable' verifies whether the value of a
+;; custom variable matches its custom-type, while `validate-value' checks an
+;; arbitrary value against an arbitrary schema.
 
 ;;; Code:
+(require 'cl-lib)
+(require 'seq)
+(require 'cus-edit)
 
 (defun validate--check-list-contents (values schemas)
   "Check that all VALUES match all SCHEMAS."
@@ -33,8 +60,7 @@
 (defun validate--check (value schema)
   "Return nil if VALUE matches SCHEMA.
 If they don't match, return an explanation."
-  (let ((fail (list schema value))
-(args (cdr-safe schema))
+  (let ((args (cdr-safe schema))
 (expected-type (or (car-safe schema) schema))
 (props nil))
 (while (and (keywordp (car args)) (cdr args))
@@ -43,8 +69,8 @@ If they don't match, return an explanation."
args))
 (let ((r
(cl-labels ((wtype ;wrong-type
-(t) (unless (funcall (intern (format "%sp" t)) value)
-  (format "not a %s" t
+(tt) (unless (funcall (intern (format "%sp" tt)) value)
+   (format "not a %s" tt
  ;; TODO: hook (top-level only).
  (cl-case expected-type
((sexp other) nil)
@@ -52,7 +78,7 @@ If they don't match, return an explanation."
((not (boundp value)) "this symbol has no 
variable binding")))
((integer number float string character symbol function boolean 
face)
 (wtype expected-type))
-   (regexp (cond ((ignore-errors (string-match re "") t) nil)
+   (regexp (cond ((ignore-errors (string-match value "") t) nil)
  ((wtype 'string))
  (t "not a valid regexp")))
(repeat (cond
@@ -90,7 +116,7 @@ If they don't match, return an explanation."
   (t (validate--check value
   `(repeat (cons ,key-type 
,value-type)))
;; TODO: `plist'
-   ((choice radio) (if (not (cdr choice))
+   ((choice radio) (if (not (cdr args))
(error "`choice' needs at least one 
argument")
  (let ((gather (mapcar (lambda (x) 
(validate--check value x)) args)))
(when (seq-every-p #'identity gather)



[elpa] master dbafdb9 5/7: Add validate-mark-safe-local

2016-05-04 Thread Artur Malabarba
branch: master
commit dbafdb904b48e72620f066a5c7cb0a123fc64baa
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Add validate-mark-safe-local
---
 validate.el |7 +++
 1 file changed, 7 insertions(+)

diff --git a/validate.el b/validate.el
index 1ded67b..9eebe9a 100644
--- a/validate.el
+++ b/validate.el
@@ -175,5 +175,12 @@ with `validate-value'. NOERROR is passed to 
`validate-value'."
   (if noerror val
 (error "Variable `%s' has no custom-type." symbol)
 
+;;;###autoload
+(defun validate-mark-safe-local (symbol)
+  "Mark SYMBOL as a safe local if its custom type is obeyed."
+  (put symbol 'safe-local-variable
+   (lambda (val)
+ (validate-value val (custom-variable-type symbol) 'noerror
+
 (provide 'validate)
 ;;; validate.el ends here



[elpa] master ae969be 1/7: First commit

2016-05-04 Thread Artur Malabarba
branch: master
commit ae969bee7965e5c4d05ef05394d1d663c274c631
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

First commit
---
 validate.el |  146 +++
 1 file changed, 146 insertions(+)

diff --git a/validate.el b/validate.el
new file mode 100644
index 000..3afe7b7
--- /dev/null
+++ b/validate.el
@@ -0,0 +1,146 @@
+;;; validate.el --- Schema validation for Emacs-lisp  -*- lexical-binding: t; 
-*-
+
+;; Copyright (C) 2016  Artur Malabarba
+
+;; Author: Artur Malabarba <em...@endlessparentheses.com>
+;; Keywords: lisp
+
+;; 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:
+
+;;
+
+;;; Code:
+
+(defun validate--check-list-contents (values schemas)
+  "Check that all VALUES match all SCHEMAS."
+  (if (not (= (length values) (length schemas)))
+  "wrong number of elements"
+(seq-find #'identity (seq-mapn #'validate--check values schemas
+
+(defun validate--check (value schema)
+  "Return nil if VALUE matches SCHEMA.
+If they don't match, return an explanation."
+  (let ((fail (list schema value))
+(args (cdr-safe schema))
+(expected-type (or (car-safe schema) schema))
+(props nil))
+(while (and (keywordp (car args)) (cdr args))
+  (setq props `(,(pop args) ,(pop args) ,@props)))
+(setq args (or (plist-get props :args)
+   args))
+(let ((r
+   (cl-labels ((wtype ;wrong-type
+(t) (unless (funcall (intern (format "%sp" t)) value)
+  (format "not a %s" t
+ ;; TODO: hook (top-level only).
+ (cl-case expected-type
+   ((sexp other) nil)
+   (variable (cond ((wtype 'symbol))
+   ((not (boundp value)) "this symbol has no 
variable binding")))
+   ((integer number float string character symbol function boolean 
face)
+(wtype expected-type))
+   (regexp (cond ((ignore-errors (string-match re "") t) nil)
+ ((wtype 'string))
+ (t "not a valid regexp")))
+   (repeat (cond
+((or (not args) (cdr args)) (error "`repeat' needs 
exactly one argument"))
+((wtype 'list))
+(t (let ((subschema (car args)))
+ (seq-some (lambda (v) (validate--check v 
subschema)) value)
+   ((const function-item variable-item) (unless (eq value (car 
args))
+  "not the expected 
value"))
+   (file (cond ((wtype 'string))
+   ((file-exists-p value) nil)
+   ((plist-get props :must-match) "file does not 
exist")
+   ((not (file-writable-p value)) "file is not 
accessible")))
+   (directory (cond ((wtype 'string))
+((file-directory-p value) nil)
+((file-exists-p value) "path is not a 
directory")
+((not (file-writable-p value)) "directory is 
not accessible")))
+   (key-sequence (and (wtype 'string)
+  (wtype 'vector)))
+   ;; TODO: `coding-system', `color'
+   (coding-system (wtype 'symbol))
+   (color (wtype 'string))
+   (cons (or (wtype 'cons)
+ (validate--check (car value) (car args))
+ (validate--check (cdr value) (cadr args
+   ((list group) (or (wtype 'list)
+ (validate--check-list-contents value args)))
+   (vector (or (wtype 'vector)
+   (validate--check-list-contents value args)))
+   (alist (let ((value-type (plist-get props :value-type))
+(key-type (plist-get props :key-type)))
+(cond ((not value-type) (error "`alist' needs a 
:value-type"))
+ 

[elpa] master 516a8c7 5/5: Merge commit 'c0a1e24ef39e2b0f388135c2ed8f8b419346337c'

2016-05-01 Thread Artur Malabarba
branch: master
commit 516a8c79fdb5e833ce740eed6b1d5d7cca4a8992
Merge: e2fb73d c0a1e24
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit 'c0a1e24ef39e2b0f388135c2ed8f8b419346337c'
---
 packages/aggressive-indent/aggressive-indent.el |   37 +++
 1 file changed, 24 insertions(+), 13 deletions(-)

diff --git a/packages/aggressive-indent/aggressive-indent.el 
b/packages/aggressive-indent/aggressive-indent.el
index 22647d1..481e7ef 100644
--- a/packages/aggressive-indent/aggressive-indent.el
+++ b/packages/aggressive-indent/aggressive-indent.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/aggressive-indent-mode
-;; Version: 1.6
+;; Version: 1.7
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: indent lisp maint tools
 ;; Prefix: aggressive-indent
@@ -349,8 +349,26 @@ or messages."
   "List of (left right) limit of regions changed in the last command loop.")
 (make-variable-buffer-local 'aggressive-indent--changed-list)
 
-(defvar-local aggressive-indent--balanced-parens t
+(defvar aggressive-indent--balanced-parens t
   "Non-nil if the current-buffer has balanced parens.")
+(make-variable-buffer-local 'aggressive-indent--balanced-parens)
+
+(defun aggressive-indent--proccess-changed-list-and-indent ()
+  "Indent the regions in `aggressive-indent--changed-list'."
+  (let ((inhibit-modification-hooks t)
+(inhibit-point-motion-hooks t)
+(indent-function
+ (if (cl-member-if #'derived-mode-p 
aggressive-indent-modes-to-prefer-defun)
+ #'aggressive-indent--softly-indent-defun 
#'aggressive-indent--softly-indent-region-and-on)))
+;; Take the 10 most recent changes.
+(let ((cell (nthcdr 10 aggressive-indent--changed-list)))
+  (when cell (setcdr cell nil)))
+;; (message "--")
+(while aggressive-indent--changed-list
+  ;; (message "%S" (car aggressive-indent--changed-list))
+  (apply indent-function (car aggressive-indent--changed-list))
+  (setq aggressive-indent--changed-list
+(cdr aggressive-indent--changed-list)
 
 (defun aggressive-indent--indent-if-changed ()
   "Indent any region that changed in the last command loop."
@@ -361,15 +379,7 @@ or messages."
 (aggressive-indent--run-user-hooks))
   (while-no-input
 (redisplay)
-(let ((inhibit-modification-hooks t)
-  (inhibit-point-motion-hooks t)
-  (indent-function
-   (if (cl-member-if #'derived-mode-p 
aggressive-indent-modes-to-prefer-defun)
-   #'aggressive-indent--softly-indent-defun 
#'aggressive-indent--softly-indent-region-and-on)))
-  (while aggressive-indent--changed-list
-(apply indent-function (car aggressive-indent--changed-list))
-(setq aggressive-indent--changed-list
-  (cdr aggressive-indent--changed-list))
+(aggressive-indent--proccess-changed-list-and-indent)))
 
 (defun aggressive-indent--check-parens ()
   "Check if parens are balanced in the current buffer.
@@ -377,8 +387,7 @@ Store result in `aggressive-indent--balanced-parens'."
   (setq aggressive-indent--balanced-parens
 (save-excursion
   (ignore-errors
-(check-parens)
-t
+(zerop (car (syntax-ppss (point-max
 
 (defun aggressive-indent--keep-track-of-changes (l r  _)
   "Store the limits (L and R) of each change in the buffer."
@@ -413,9 +422,11 @@ Store result in `aggressive-indent--balanced-parens'."
   (aggressive-indent--local-electric t))
 (aggressive-indent--check-parens)
 (add-hook 'after-change-functions 
#'aggressive-indent--keep-track-of-changes nil 'local)
+(add-hook 'before-save-hook 
#'aggressive-indent--proccess-changed-list-and-indent nil 'local)
 (add-hook 'post-command-hook #'aggressive-indent--indent-if-changed 
nil 'local))
 ;; Clean the hooks
 (remove-hook 'after-change-functions 
#'aggressive-indent--keep-track-of-changes 'local)
+(remove-hook 'before-save-hook 
#'aggressive-indent--proccess-changed-list-and-indent 'local)
 (remove-hook 'post-command-hook #'aggressive-indent--indent-if-changed 
'local)
 (remove-hook 'post-command-hook #'aggressive-indent--softly-indent-defun 
'local)))
 



[elpa] master c0a1e24 4/5: Version 1.7

2016-05-01 Thread Artur Malabarba
branch: master
commit c0a1e24ef39e2b0f388135c2ed8f8b419346337c
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Version 1.7
---
 aggressive-indent.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index 5c2f7b8..9530bf2 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/aggressive-indent-mode
-;; Version: 1.6
+;; Version: 1.7
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: indent lisp maint tools
 ;; Prefix: aggressive-indent



[elpa] master 64ae275 1/5: Fully reindent before saving

2016-05-01 Thread Artur Malabarba
branch: master
commit 64ae275d9bb200f199d2d5d9785001249e2def15
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Fully reindent before saving
---
 aggressive-indent.el |   29 -
 1 file changed, 20 insertions(+), 9 deletions(-)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index 685f2af..5ee9e35 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -352,6 +352,23 @@ or messages."
 (defvar-local aggressive-indent--balanced-parens t
   "Non-nil if the current-buffer has balanced parens.")
 
+(defun aggressive-indent--proccess-changed-list-and-indent ()
+  "Indent the regions in `aggressive-indent--changed-list'."
+  (let ((inhibit-modification-hooks t)
+(inhibit-point-motion-hooks t)
+(indent-function
+ (if (cl-member-if #'derived-mode-p 
aggressive-indent-modes-to-prefer-defun)
+ #'aggressive-indent--softly-indent-defun 
#'aggressive-indent--softly-indent-region-and-on)))
+;; Take the 10 most recent changes.
+(let ((cell (last aggressive-indent--changed-list 10)))
+  (when cell (setcdr cell nil)))
+;; (message "--")
+(while aggressive-indent--changed-list
+  ;; (message "%S" (car aggressive-indent--changed-list))
+  (apply indent-function (car aggressive-indent--changed-list))
+  (setq aggressive-indent--changed-list
+(cdr aggressive-indent--changed-list)
+
 (defun aggressive-indent--indent-if-changed ()
   "Indent any region that changed in the last command loop."
   (when (and aggressive-indent--changed-list 
aggressive-indent--balanced-parens)
@@ -361,15 +378,7 @@ or messages."
 (aggressive-indent--run-user-hooks))
   (while-no-input
 (redisplay)
-(let ((inhibit-modification-hooks t)
-  (inhibit-point-motion-hooks t)
-  (indent-function
-   (if (cl-member-if #'derived-mode-p 
aggressive-indent-modes-to-prefer-defun)
-   #'aggressive-indent--softly-indent-defun 
#'aggressive-indent--softly-indent-region-and-on)))
-  (while aggressive-indent--changed-list
-(apply indent-function (car aggressive-indent--changed-list))
-(setq aggressive-indent--changed-list
-  (cdr aggressive-indent--changed-list))
+(aggressive-indent--proccess-changed-list-and-indent)))
 
 (defun aggressive-indent--check-parens ()
   "Check if parens are balanced in the current buffer.
@@ -413,9 +422,11 @@ Store result in `aggressive-indent--balanced-parens'."
   (aggressive-indent--local-electric t))
 (aggressive-indent--check-parens)
 (add-hook 'after-change-functions 
#'aggressive-indent--keep-track-of-changes nil 'local)
+(add-hook 'before-save-hook 
#'aggressive-indent--proccess-changed-list-and-indent nil 'local)
 (add-hook 'post-command-hook #'aggressive-indent--indent-if-changed 
nil 'local))
 ;; Clean the hooks
 (remove-hook 'after-change-functions 
#'aggressive-indent--keep-track-of-changes 'local)
+(remove-hook 'before-save-hook 
#'aggressive-indent--proccess-changed-list-and-indent 'local)
 (remove-hook 'post-command-hook #'aggressive-indent--indent-if-changed 
'local)
 (remove-hook 'post-command-hook #'aggressive-indent--softly-indent-defun 
'local)))
 



[elpa] master updated (e2fb73d -> 516a8c7)

2016-05-01 Thread Artur Malabarba
malabarba pushed a change to branch master.

  from  e2fb73d   Merge commit '16be7a12d0dbbbd0e59fc2ccf9a7c7085eb9cf5a'
   new  64ae275   Fully reindent before saving
   new  b23e962   Use syntax-ppss instead of check-parens
   new  a5000eb   Fix a bug in the take-10 logic
   new  c0a1e24   Version 1.7
   new  516a8c7   Merge commit 'c0a1e24ef39e2b0f388135c2ed8f8b419346337c'


Summary of changes:
 packages/aggressive-indent/aggressive-indent.el |   37 +++
 1 file changed, 24 insertions(+), 13 deletions(-)



[elpa] master a5000eb 3/5: Fix a bug in the take-10 logic

2016-05-01 Thread Artur Malabarba
branch: master
commit a5000ebf787eaeab41a7ab1889a91be84e8c1c90
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Fix a bug in the take-10 logic
---
 aggressive-indent.el |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index 241d0de..5c2f7b8 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -349,8 +349,9 @@ or messages."
   "List of (left right) limit of regions changed in the last command loop.")
 (make-variable-buffer-local 'aggressive-indent--changed-list)
 
-(defvar-local aggressive-indent--balanced-parens t
+(defvar aggressive-indent--balanced-parens t
   "Non-nil if the current-buffer has balanced parens.")
+(make-variable-buffer-local 'aggressive-indent--balanced-parens)
 
 (defun aggressive-indent--proccess-changed-list-and-indent ()
   "Indent the regions in `aggressive-indent--changed-list'."
@@ -360,7 +361,7 @@ or messages."
  (if (cl-member-if #'derived-mode-p 
aggressive-indent-modes-to-prefer-defun)
  #'aggressive-indent--softly-indent-defun 
#'aggressive-indent--softly-indent-region-and-on)))
 ;; Take the 10 most recent changes.
-(let ((cell (last aggressive-indent--changed-list 10)))
+(let ((cell (nthcdr 10 aggressive-indent--changed-list)))
   (when cell (setcdr cell nil)))
 ;; (message "--")
 (while aggressive-indent--changed-list



[elpa] master ec752bc 1/3: [Fix #47] Add beacon-before-blink-hook

2016-04-30 Thread Artur Malabarba
branch: master
commit ec752bc75dd14b5339256e4845632e7fa09f3b44
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

[Fix #47] Add beacon-before-blink-hook
---
 beacon.el |5 +
 1 file changed, 5 insertions(+)

diff --git a/beacon.el b/beacon.el
index 6c35e2b..54c9cde 100644
--- a/beacon.el
+++ b/beacon.el
@@ -166,6 +166,10 @@ predictable ways, when the blink would be more distracting
 than helpful.."
   :type '(repeat symbol))
 
+(defcustom beacon-before-blink-hook nil
+  "Hook run immediately before blinking the beacon."
+  :type 'hook)
+
 
 ;;; Internal variables
 (defvar beacon--window-scrolled nil)
@@ -321,6 +325,7 @@ unconditionally (even if `beacon-mode' is disabled), and 
this can
 be invoked as a user command or called from lisp code."
   (interactive)
   (beacon--vanish)
+  (run-hooks 'beacon-before-blink-hook)
   (beacon--shine)
   (setq beacon--timer
 (run-at-time beacon-blink-delay



[elpa] master 16be7a1 2/3: Version 1.3.0

2016-04-30 Thread Artur Malabarba
branch: master
commit 16be7a12d0dbbbd0e59fc2ccf9a7c7085eb9cf5a
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Version 1.3.0
---
 beacon.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/beacon.el b/beacon.el
index 54c9cde..8126c43 100644
--- a/beacon.el
+++ b/beacon.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/beacon
 ;; Keywords: convenience
-;; Version: 1.2.1
+;; Version: 1.3.0
 ;; Package-Requires: ((seq "2.14"))
 
 ;; This program is free software; you can redistribute it and/or modify



[elpa] master 1134e93: bug-hunter: Improve the error message when emacs -Q fails

2016-04-18 Thread Artur Malabarba
branch: master
commit 1134e93bec383448e38f2d0453a5abb998506c62
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

bug-hunter: Improve the error message when emacs -Q fails
---
 packages/bug-hunter/bug-hunter.el |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/packages/bug-hunter/bug-hunter.el 
b/packages/bug-hunter/bug-hunter.el
index d6de15d..9a29f2f 100644
--- a/packages/bug-hunter/bug-hunter.el
+++ b/packages/bug-hunter/bug-hunter.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/elisp-bug-hunter
-;; Version: 1.2
+;; Version: 1.3
 ;; Keywords: lisp
 ;; Package-Requires: ((seq "1.3") (cl-lib "0.5"))
 
@@ -431,9 +431,11 @@ link for some examples:
 (if assertion
 (concat "Assertion returned non-nil even on emacs -Q:"
 bug-hunter--assertion-reminder)
-  "Detected a signaled error even on emacs -Q. I'm sorry, but there
-is something seriously wrong with your Emacs installation.
-There's nothing more I can do here.")
+  "Detected a signaled error even on emacs -Q. This could mean three
+things things:
+1. The problem happens inside `package-initialize'.
+2. You wrote the assertion wrong.
+3. There's something seriously wrong with your Emacs installation.")
 (or assertion "")))
 
  (t



[elpa] master 8595ff7: Fix a typo in the readme

2016-04-18 Thread Artur Malabarba
branch: master
commit 8595ff71382aac37919db1208e495600ccd56ce9
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Fix a typo in the readme
---
 README |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/README b/README
index 7c5cd36..57d9ca9 100644
--- a/README
+++ b/README
@@ -37,7 +37,7 @@ release the new code.
 ** To add a package: (submission, submit)
 
 Adding a basic package is very simple. There are thorough
-instructional, but the gist is that you:
+instructions below, but the gist of it is that you:
 
 1. Notify emacs-de...@gnu.org.
 2. Place all files inside `packages//'.



[elpa] master a7801e1 4/4: Merge commit '97eaa5778ce0cd596a0807ef2e676d2681aabf84'

2016-04-16 Thread Artur Malabarba
branch: master
commit a7801e14187f4116ce3cd0c78247cd30270a32bf
Merge: 3e02274 97eaa57
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit '97eaa5778ce0cd596a0807ef2e676d2681aabf84'
---
 packages/aggressive-indent/aggressive-indent.el |   16 +++-
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/packages/aggressive-indent/aggressive-indent.el 
b/packages/aggressive-indent/aggressive-indent.el
index 006114b..22647d1 100644
--- a/packages/aggressive-indent/aggressive-indent.el
+++ b/packages/aggressive-indent/aggressive-indent.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/aggressive-indent-mode
-;; Version: 1.5.3
+;; Version: 1.6
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: indent lisp maint tools
 ;; Prefix: aggressive-indent
@@ -349,9 +349,12 @@ or messages."
   "List of (left right) limit of regions changed in the last command loop.")
 (make-variable-buffer-local 'aggressive-indent--changed-list)
 
+(defvar-local aggressive-indent--balanced-parens t
+  "Non-nil if the current-buffer has balanced parens.")
+
 (defun aggressive-indent--indent-if-changed ()
   "Indent any region that changed in the last command loop."
-  (when aggressive-indent--changed-list
+  (when (and aggressive-indent--changed-list 
aggressive-indent--balanced-parens)
 (save-excursion
   (save-selected-window
 (unless (or (run-hook-wrapped 
'aggressive-indent--internal-dont-indent-if #'eval)
@@ -368,19 +371,14 @@ or messages."
 (setq aggressive-indent--changed-list
   (cdr aggressive-indent--changed-list))
 
-(defvar-local aggressive-indent--balanced-parens t
-  "Non-nil if the current-buffer has balanced parens.")
-
 (defun aggressive-indent--check-parens ()
   "Check if parens are balanced in the current buffer.
 Store result in `aggressive-indent--balanced-parens'."
   (setq aggressive-indent--balanced-parens
 (save-excursion
   (ignore-errors
-(save-restriction
-  (narrow-to-defun)
-  (check-parens)
-  t)
+(check-parens)
+t
 
 (defun aggressive-indent--keep-track-of-changes (l r  _)
   "Store the limits (L and R) of each change in the buffer."



[elpa] master 46d9ede 2/4: Don't narrow-to-defun when checking parens

2016-04-16 Thread Artur Malabarba
branch: master
commit 46d9edef157a6df7f26aa692b2ab9f7bf82317ec
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Don't narrow-to-defun when checking parens
---
 aggressive-indent.el |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index 36a7f42..7055f9c 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -378,7 +378,6 @@ Store result in `aggressive-indent--balanced-parens'."
 (save-excursion
   (ignore-errors
 (save-restriction
-  (narrow-to-defun)
   (check-parens)
   t)
 



[elpa] master updated (3e02274 -> a7801e1)

2016-04-16 Thread Artur Malabarba
malabarba pushed a change to branch master.

  from  3e02274   packages/javaimp: cosmetic fixes
   new  3e96124   [#77] Actually use aggressive-indent--balanced-parens
   new  46d9ede   Don't narrow-to-defun when checking parens
   new  97eaa57   Version 1.6
   new  a7801e1   Merge commit '97eaa5778ce0cd596a0807ef2e676d2681aabf84'


Summary of changes:
 packages/aggressive-indent/aggressive-indent.el |   16 +++-
 1 files changed, 7 insertions(+), 9 deletions(-)



[elpa] master 3e96124 1/4: [#77] Actually use aggressive-indent--balanced-parens

2016-04-16 Thread Artur Malabarba
branch: master
commit 3e9612418f87236fb5a1aec0525610ea88508bc6
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

[#77] Actually use aggressive-indent--balanced-parens
---
 aggressive-indent.el |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index 31cee72..36a7f42 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -349,9 +349,12 @@ or messages."
   "List of (left right) limit of regions changed in the last command loop.")
 (make-variable-buffer-local 'aggressive-indent--changed-list)
 
+(defvar-local aggressive-indent--balanced-parens t
+  "Non-nil if the current-buffer has balanced parens.")
+
 (defun aggressive-indent--indent-if-changed ()
   "Indent any region that changed in the last command loop."
-  (when aggressive-indent--changed-list
+  (when (and aggressive-indent--changed-list 
aggressive-indent--balanced-parens)
 (save-excursion
   (save-selected-window
 (unless (or (run-hook-wrapped 
'aggressive-indent--internal-dont-indent-if #'eval)
@@ -368,9 +371,6 @@ or messages."
 (setq aggressive-indent--changed-list
   (cdr aggressive-indent--changed-list))
 
-(defvar-local aggressive-indent--balanced-parens t
-  "Non-nil if the current-buffer has balanced parens.")
-
 (defun aggressive-indent--check-parens ()
   "Check if parens are balanced in the current buffer.
 Store result in `aggressive-indent--balanced-parens'."



[elpa] master 97eaa57 3/4: Version 1.6

2016-04-16 Thread Artur Malabarba
branch: master
commit 97eaa5778ce0cd596a0807ef2e676d2681aabf84
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Version 1.6
---
 aggressive-indent.el |7 +++
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index 7055f9c..685f2af 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/aggressive-indent-mode
-;; Version: 1.5.3
+;; Version: 1.6
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: indent lisp maint tools
 ;; Prefix: aggressive-indent
@@ -377,9 +377,8 @@ Store result in `aggressive-indent--balanced-parens'."
   (setq aggressive-indent--balanced-parens
 (save-excursion
   (ignore-errors
-(save-restriction
-  (check-parens)
-  t)
+(check-parens)
+t
 
 (defun aggressive-indent--keep-track-of-changes (l r  _)
   "Store the limits (L and R) of each change in the buffer."



[elpa] master 67fa7e1 1/2: [Fix #78] save-excursion in check-parens

2016-04-04 Thread Artur Malabarba
branch: master
commit 67fa7e1a60966e49eccf21b02110af12afa995e0
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

[Fix #78] save-excursion in check-parens
---
 aggressive-indent.el |   13 +++--
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index 9aa8226..31cee72 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/aggressive-indent-mode
-;; Version: 1.5.2
+;; Version: 1.5.3
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: indent lisp maint tools
 ;; Prefix: aggressive-indent
@@ -375,11 +375,12 @@ or messages."
   "Check if parens are balanced in the current buffer.
 Store result in `aggressive-indent--balanced-parens'."
   (setq aggressive-indent--balanced-parens
-(ignore-errors
-  (save-restriction
-(narrow-to-defun)
-(check-parens)
-t
+(save-excursion
+  (ignore-errors
+(save-restriction
+  (narrow-to-defun)
+  (check-parens)
+  t)
 
 (defun aggressive-indent--keep-track-of-changes (l r  _)
   "Store the limits (L and R) of each change in the buffer."



[elpa] master e5e12c2 2/2: Merge commit '67fa7e1a60966e49eccf21b02110af12afa995e0'

2016-04-04 Thread Artur Malabarba
branch: master
commit e5e12c25622872d9fb382cdc11135a90b8e5066b
Merge: efb01e6 67fa7e1
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit '67fa7e1a60966e49eccf21b02110af12afa995e0'
---
 packages/aggressive-indent/aggressive-indent.el |   13 +++--
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/packages/aggressive-indent/aggressive-indent.el 
b/packages/aggressive-indent/aggressive-indent.el
index a0c8c70..006114b 100644
--- a/packages/aggressive-indent/aggressive-indent.el
+++ b/packages/aggressive-indent/aggressive-indent.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/aggressive-indent-mode
-;; Version: 1.5.2
+;; Version: 1.5.3
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: indent lisp maint tools
 ;; Prefix: aggressive-indent
@@ -375,11 +375,12 @@ or messages."
   "Check if parens are balanced in the current buffer.
 Store result in `aggressive-indent--balanced-parens'."
   (setq aggressive-indent--balanced-parens
-(ignore-errors
-  (save-restriction
-(narrow-to-defun)
-(check-parens)
-t
+(save-excursion
+  (ignore-errors
+(save-restriction
+  (narrow-to-defun)
+  (check-parens)
+  t)
 
 (defun aggressive-indent--keep-track-of-changes (l r  _)
   "Store the limits (L and R) of each change in the buffer."



[elpa] master efb01e6 3/3: Merge commit '456c40803432b34842e43ceda66cdd105fbf8866'

2016-04-04 Thread Artur Malabarba
branch: master
commit efb01e66f7ea5688ec572d243b5378440093c00f
Merge: 7a2da55 456c408
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit '456c40803432b34842e43ceda66cdd105fbf8866'
---
 packages/aggressive-indent/aggressive-indent.el |   21 ++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/packages/aggressive-indent/aggressive-indent.el 
b/packages/aggressive-indent/aggressive-indent.el
index a744324..a0c8c70 100644
--- a/packages/aggressive-indent/aggressive-indent.el
+++ b/packages/aggressive-indent/aggressive-indent.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/aggressive-indent-mode
-;; Version: 1.5.1
+;; Version: 1.5.2
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: indent lisp maint tools
 ;; Prefix: aggressive-indent
@@ -368,10 +368,24 @@ or messages."
 (setq aggressive-indent--changed-list
   (cdr aggressive-indent--changed-list))
 
+(defvar-local aggressive-indent--balanced-parens t
+  "Non-nil if the current-buffer has balanced parens.")
+
+(defun aggressive-indent--check-parens ()
+  "Check if parens are balanced in the current buffer.
+Store result in `aggressive-indent--balanced-parens'."
+  (setq aggressive-indent--balanced-parens
+(ignore-errors
+  (save-restriction
+(narrow-to-defun)
+(check-parens)
+t
+
 (defun aggressive-indent--keep-track-of-changes (l r  _)
   "Store the limits (L and R) of each change in the buffer."
   (when aggressive-indent-mode
-(push (list l r) aggressive-indent--changed-list)))
+(push (list l r) aggressive-indent--changed-list)
+(aggressive-indent--check-parens)))
 
 ;;; Minor modes
 ;;;###autoload
@@ -393,11 +407,12 @@ or messages."
(memq major-mode '(text-mode fundamental-mode))
buffer-read-only))
   (aggressive-indent-mode -1)
-;; Should electric indent be ON or OFF?
+;; Should electric indent be ON or OFF?
 (if (or (eq aggressive-indent-dont-electric-modes t)
 (cl-member-if #'derived-mode-p 
aggressive-indent-dont-electric-modes))
 (aggressive-indent--local-electric nil)
   (aggressive-indent--local-electric t))
+(aggressive-indent--check-parens)
 (add-hook 'after-change-functions 
#'aggressive-indent--keep-track-of-changes nil 'local)
 (add-hook 'post-command-hook #'aggressive-indent--indent-if-changed 
nil 'local))
 ;; Clean the hooks



[elpa] master 7a2da55 2/2: Merge commit 'd666642d7ad905997d0ac5ecd4b27353506ce79e'

2016-04-04 Thread Artur Malabarba
branch: master
commit 7a2da55973bd00f7d39c4095f7e6353430e3
Merge: 782ca5e d42
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit 'd42d7ad905997d0ac5ecd4b27353506ce79e'
---
 packages/beacon/beacon.el |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/packages/beacon/beacon.el b/packages/beacon/beacon.el
index a4024a0..6c35e2b 100644
--- a/packages/beacon/beacon.el
+++ b/packages/beacon/beacon.el
@@ -5,8 +5,8 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/beacon
 ;; Keywords: convenience
-;; Version: 1.2
-;; Package-Requires: ((seq "1.11"))
+;; Version: 1.2.1
+;; Package-Requires: ((seq "2.14"))
 
 ;; 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



[elpa] master d666642 1/2: [#45] Bump seq dependency to the new version

2016-04-04 Thread Artur Malabarba
branch: master
commit d42d7ad905997d0ac5ecd4b27353506ce79e
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

[#45] Bump seq dependency to the new version
---
 beacon.el |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/beacon.el b/beacon.el
index a4024a0..6c35e2b 100644
--- a/beacon.el
+++ b/beacon.el
@@ -5,8 +5,8 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/beacon
 ;; Keywords: convenience
-;; Version: 1.2
-;; Package-Requires: ((seq "1.11"))
+;; Version: 1.2.1
+;; Package-Requires: ((seq "2.14"))
 
 ;; 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



[elpa] master 782ca5e 2/2: Merge commit '49225f379efedf228636985a92ca6fb84cfdea5a'

2016-04-03 Thread Artur Malabarba
branch: master
commit 782ca5ed9ca706e0f742fd43c486a5da974abad9
Merge: 62c6c01 49225f3
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit '49225f379efedf228636985a92ca6fb84cfdea5a'
---
 packages/nameless/nameless.el |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/packages/nameless/nameless.el b/packages/nameless/nameless.el
index cf463cd..735b4d8 100644
--- a/packages/nameless/nameless.el
+++ b/packages/nameless/nameless.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/nameless
 ;; Keywords: convenience, lisp
-;; Version: 1.0.0
+;; Version: 1.0.1
 ;; Package-Requires: ((emacs "24.4"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -285,7 +285,6 @@ Return S."
   nil 'local))
 (remove-function (local 'filter-buffer-substring-function)
  #'nameless--filter-string)
-(setq nameless-current-name nil)
 (remove-hook 'hack-local-variables-hook
  #'nameless--after-hack-local-variables
  'local)



[elpa] master 49225f3 1/2: [Fix #12] Don't reset nameless-current-name when disabling the mode

2016-04-03 Thread Artur Malabarba
branch: master
commit 49225f379efedf228636985a92ca6fb84cfdea5a
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

[Fix #12] Don't reset nameless-current-name when disabling the mode
---
 nameless.el |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/nameless.el b/nameless.el
index cf463cd..735b4d8 100644
--- a/nameless.el
+++ b/nameless.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/nameless
 ;; Keywords: convenience, lisp
-;; Version: 1.0.0
+;; Version: 1.0.1
 ;; Package-Requires: ((emacs "24.4"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -285,7 +285,6 @@ Return S."
   nil 'local))
 (remove-function (local 'filter-buffer-substring-function)
  #'nameless--filter-string)
-(setq nameless-current-name nil)
 (remove-hook 'hack-local-variables-hook
  #'nameless--after-hack-local-variables
  'local)



[elpa] master 9300306: bug-hunter: Don't offer interactive bisection in the terminal

2016-04-01 Thread Artur Malabarba
branch: master
commit 930030657f3ff08192bf47cf110a39f45860152a
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

bug-hunter: Don't offer interactive bisection in the terminal
---
 packages/bug-hunter/bug-hunter.el |   13 ++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/packages/bug-hunter/bug-hunter.el 
b/packages/bug-hunter/bug-hunter.el
index 6875470..d6de15d 100644
--- a/packages/bug-hunter/bug-hunter.el
+++ b/packages/bug-hunter/bug-hunter.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/elisp-bug-hunter
-;; Version: 1.1
+;; Version: 1.2
 ;; Keywords: lisp
 ;; Package-Requires: ((seq "1.3") (cl-lib "0.5"))
 
@@ -468,8 +468,15 @@ form.
 The user may decide to not provide input, in which case
 'interactive is returned.  Note, this is different from the user
 typing `RET' at an empty prompt, in which case nil is returned."
-  (pcase (read-char-choice bug-hunter--hunt-type-prompt '(?i ?e ?a))
-(`?i 'interactive)
+  (pcase (read-char-choice (if (display-graphic-p)
+   bug-hunter--hunt-type-prompt
+ (replace-regexp-in-string "To bisect 
interactively,.*\n" ""
+   
bug-hunter--hunt-type-prompt))
+   '(?i ?e ?a))
+(`?i
+ (unless (display-graphic-p)
+   (user-error "Sorry, but `interactive' bisection needs a graphical 
frame"))
+ 'interactive)
 (`?e nil)
 (_
  (require 'simple)



[elpa] master 76da666 2/2: Merge commit 'ef509502cdd228c8ce0a562bbf411e5f98beaaf1'

2016-04-01 Thread Artur Malabarba
branch: master
commit 76da6667542e8756076fe1e80982d63910371199
Merge: d9deb89 ef50950
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit 'ef509502cdd228c8ce0a562bbf411e5f98beaaf1'
---
 packages/aggressive-indent/aggressive-indent.el |   17 -
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/packages/aggressive-indent/aggressive-indent.el 
b/packages/aggressive-indent/aggressive-indent.el
index 67c3af8..a744324 100644
--- a/packages/aggressive-indent/aggressive-indent.el
+++ b/packages/aggressive-indent/aggressive-indent.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/aggressive-indent-mode
-;; Version: 1.5
+;; Version: 1.5.1
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: indent lisp maint tools
 ;; Prefix: aggressive-indent
@@ -190,14 +190,13 @@ change."
 (null (buffer-modified-p))
 (and (boundp 'smerge-mode) smerge-mode)
 (let ((line (thing-at-point 'line)))
-  (when (stringp line)
-(or (string-match "\\`[[:blank:]]*\n?\\'" line)
-;; If the user is starting to type a comment.
-(and (stringp comment-start)
- (string-match (concat "\\`[[:blank:]]*"
-   (substring comment-start 0 1)
-   "[[:blank:]]*$")
-   line)
+  (and (stringp line)
+   ;; If the user is starting to type a comment.
+   (stringp comment-start)
+   (string-match (concat "\\`[[:blank:]]*"
+ (substring comment-start 0 1)
+ "[[:blank:]]*$")
+ line)))
 (let ((sp (syntax-ppss)))
   ;; Comments.
   (or (and (not aggressive-indent-comments-too) (elt sp 4))



[elpa] master c0de8a8 1/2: [Fix #12] Hack-local-variables

2016-04-01 Thread Artur Malabarba
branch: master
commit c0de8a8ad0f0abbc12bce35fc4a0feebc8892f48
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

[Fix #12] Hack-local-variables
---
 README.org  |2 +-
 nameless.el |   31 +++
 2 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/README.org b/README.org
index 9d8b7eb..46b861b 100644
--- a/README.org
+++ b/README.org
@@ -14,7 +14,7 @@ the *right* has ~nameless-mode~ turned on.\\
 To use this package add the following configuration to your Emacs init file.
 
 #+BEGIN_SRC emacs-lisp
-(add-hook 'emacs-lisp-mode-hook #'nameless-mode-from-hook)
+(add-hook 'emacs-lisp-mode-hook #'nameless-mode)
 #+END_SRC
 
 You can configure a string to use instead of ~:~ by setting the
diff --git a/nameless.el b/nameless.el
index 183b46d..cf463cd 100644
--- a/nameless.el
+++ b/nameless.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/nameless
 ;; Keywords: convenience, lisp
-;; Version: 0.5.1
+;; Version: 1.0.0
 ;; Package-Requires: ((emacs "24.4"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -256,6 +256,15 @@ Return S."
 (remove-text-properties 0 length '(composition nil display nil) s)
 s))
 
+(defun nameless--after-hack-local-variables ()
+  "Set font-lock-keywords after `hack-local-variables-hook'."
+  (nameless--remove-keywords)
+  (apply #'nameless--add-keywords
+ `(,@(when nameless-current-name
+   `((nil . ,nameless-current-name)))
+   ,@nameless-global-aliases
+   ,@nameless-aliases)))
+
 
 ;;; Minor mode
 ;;;###autoload
@@ -267,25 +276,23 @@ Return S."
nameless-discover-current-name
(ignore-errors (string-match "\\.el\\'" 
(lm-get-package-name
   (setq nameless-current-name
-(replace-regexp-in-string "\\(-mode\\)?\\.[^.]*\\'" "" 
(lm-get-package-name
+(replace-regexp-in-string 
"\\(-mode\\)?\\(-tests?\\)?\\.[^.]*\\'" "" (lm-get-package-name
 (add-function :filter-return (local 'filter-buffer-substring-function)
   #'nameless--filter-string)
-(apply #'nameless--add-keywords
-   `(,@(when nameless-current-name
- `((nil . ,nameless-current-name)))
- ,@nameless-global-aliases
- ,@nameless-aliases)))
+(nameless--after-hack-local-variables)
+(add-hook 'hack-local-variables-hook
+  #'nameless--after-hack-local-variables
+  nil 'local))
 (remove-function (local 'filter-buffer-substring-function)
  #'nameless--filter-string)
 (setq nameless-current-name nil)
+(remove-hook 'hack-local-variables-hook
+ #'nameless--after-hack-local-variables
+ 'local)
 (nameless--remove-keywords)))
 
 ;;;###autoload
-(defun nameless-mode-from-hook ()
-  "Turn on `nameless-mode'.
-Designed to be added to `emacs-lisp-mode-hook'.
-Interactively, just invoke `nameless-mode' directly."
-  (add-hook 'find-file-hook #'nameless-mode nil 'local))
+(define-obsolete-function-alias 'nameless-mode-from-hook 'nameless-mode 
"1.0.0")
 
 (provide 'nameless)
 ;;; nameless.el ends here



[elpa] master 1f04665 3/3: Merge commit '98f32631ffdaa9daf735799734ad9d3565146898'

2016-04-01 Thread Artur Malabarba
branch: master
commit 1f0466581f3bb628c9ab8f64e4480a43b2367175
Merge: b4d20db 98f3263
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit '98f32631ffdaa9daf735799734ad9d3565146898'
---
 packages/beacon/beacon.el |   11 +--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/packages/beacon/beacon.el b/packages/beacon/beacon.el
index 4226149..a4024a0 100644
--- a/packages/beacon/beacon.el
+++ b/packages/beacon/beacon.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/beacon
 ;; Keywords: convenience
-;; Version: 1.0
+;; Version: 1.2
 ;; Package-Requires: ((seq "1.11"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -236,7 +236,7 @@ COLORS applied to each one."
(seq-filter (lambda (o) (overlay-get o 'beacon))
(overlays-at (point))
 
-(defun beacon--vanish ()
+(defun beacon--vanish ( _)
   "Turn off the beacon."
   (when (timerp beacon--timer)
 (cancel-timer beacon--timer))
@@ -387,6 +387,11 @@ The same is true for DELTA-X and horizonta movement."
   (cond
;; Sanity check.
((not (markerp beacon--previous-place)))
+   ;; Blink for switching buffers.
+   ((and beacon-blink-when-buffer-changes
+ (not (eq (marker-buffer beacon--previous-place)
+  (current-buffer
+(beacon-blink-automated))
;; Blink for switching windows.
((and beacon-blink-when-window-changes
  (not (eq beacon--previous-window (selected-window
@@ -443,11 +448,13 @@ unreliable, so just blink immediately."
 (add-hook 'window-scroll-functions #'beacon--window-scroll-function)
 (add-hook 'focus-in-hook #'beacon--blink-on-focus)
 (add-hook 'post-command-hook #'beacon--post-command)
+(add-hook 'before-change-functions #'beacon--vanish)
 (add-hook 'pre-command-hook #'beacon--record-vars)
 (add-hook 'pre-command-hook #'beacon--vanish))
 (remove-hook 'focus-in-hook #'beacon--blink-on-focus)
 (remove-hook 'window-scroll-functions #'beacon--window-scroll-function)
 (remove-hook 'post-command-hook #'beacon--post-command)
+(remove-hook 'before-change-functions #'beacon--vanish)
 (remove-hook 'pre-command-hook #'beacon--record-vars)
 (remove-hook 'pre-command-hook #'beacon--vanish)))
 



[elpa] master 98f3263 2/3: [Fix #44] Vanish the beacon if anything in the buffer changes

2016-04-01 Thread Artur Malabarba
branch: master
commit 98f32631ffdaa9daf735799734ad9d3565146898
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

[Fix #44] Vanish the beacon if anything in the buffer changes
---
 beacon.el |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/beacon.el b/beacon.el
index e978a7c..a4024a0 100644
--- a/beacon.el
+++ b/beacon.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/beacon
 ;; Keywords: convenience
-;; Version: 1.1
+;; Version: 1.2
 ;; Package-Requires: ((seq "1.11"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -236,7 +236,7 @@ COLORS applied to each one."
(seq-filter (lambda (o) (overlay-get o 'beacon))
(overlays-at (point))
 
-(defun beacon--vanish ()
+(defun beacon--vanish ( _)
   "Turn off the beacon."
   (when (timerp beacon--timer)
 (cancel-timer beacon--timer))
@@ -448,11 +448,13 @@ unreliable, so just blink immediately."
 (add-hook 'window-scroll-functions #'beacon--window-scroll-function)
 (add-hook 'focus-in-hook #'beacon--blink-on-focus)
 (add-hook 'post-command-hook #'beacon--post-command)
+(add-hook 'before-change-functions #'beacon--vanish)
 (add-hook 'pre-command-hook #'beacon--record-vars)
 (add-hook 'pre-command-hook #'beacon--vanish))
 (remove-hook 'focus-in-hook #'beacon--blink-on-focus)
 (remove-hook 'window-scroll-functions #'beacon--window-scroll-function)
 (remove-hook 'post-command-hook #'beacon--post-command)
+(remove-hook 'before-change-functions #'beacon--vanish)
 (remove-hook 'pre-command-hook #'beacon--record-vars)
 (remove-hook 'pre-command-hook #'beacon--vanish)))
 



[elpa] master 6490628 1/3: Fix #43 - Actually use beacon-blink-when-buffer-changes

2016-04-01 Thread Artur Malabarba
branch: master
commit 6490628efd046db0751847c5286fff822723b75a
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Fix #43 - Actually use beacon-blink-when-buffer-changes
---
 beacon.el |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/beacon.el b/beacon.el
index 4226149..e978a7c 100644
--- a/beacon.el
+++ b/beacon.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/beacon
 ;; Keywords: convenience
-;; Version: 1.0
+;; Version: 1.1
 ;; Package-Requires: ((seq "1.11"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -387,6 +387,11 @@ The same is true for DELTA-X and horizonta movement."
   (cond
;; Sanity check.
((not (markerp beacon--previous-place)))
+   ;; Blink for switching buffers.
+   ((and beacon-blink-when-buffer-changes
+ (not (eq (marker-buffer beacon--previous-place)
+  (current-buffer
+(beacon-blink-automated))
;; Blink for switching windows.
((and beacon-blink-when-window-changes
  (not (eq beacon--previous-window (selected-window



[elpa] master updated (b4d20db -> 1f04665)

2016-04-01 Thread Artur Malabarba
malabarba pushed a change to branch master.

  from  b4d20db   Remove reference to thread-last
   new  6490628   Fix #43 - Actually use beacon-blink-when-buffer-changes
   new  98f3263   [Fix #44] Vanish the beacon if anything in the buffer 
changes
   new  1f04665   Merge commit '98f32631ffdaa9daf735799734ad9d3565146898'


Summary of changes:
 packages/beacon/beacon.el |   11 +--
 1 files changed, 9 insertions(+), 2 deletions(-)



[elpa] master b4d20db: Remove reference to thread-last

2016-04-01 Thread Artur Malabarba
branch: master
commit b4d20db28d2bc3766f8700a09ddcbe5e19390218
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Remove reference to thread-last
---
 packages/spinner/spinner.el |7 +++
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/packages/spinner/spinner.el b/packages/spinner/spinner.el
index 63ead1e..a021848 100644
--- a/packages/spinner/spinner.el
+++ b/packages/spinner/spinner.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
-;; Version: 1.7
+;; Version: 1.7.1
 ;; URL: https://github.com/Malabarba/spinner.el
 ;; Keywords: processes mode-line
 
@@ -131,9 +131,8 @@ CHAR is the character to use for the moving bar (defaults 
to =)."
   (let ((whole-string (concat (make-string (1- width) ?\s)
   (make-string 4 (or char ?=))
   (make-string width ?\s
-(thread-last (mapcar (lambda (n) (substring whole-string n (+ n width)))
- (number-sequence (+ width 3) 0 -1))
-  (apply #'vector
+(apply #'vector (mapcar (lambda (n) (substring whole-string n (+ n width)))
+(number-sequence (+ width 3) 0 -1)
 
 (defvar spinner-current nil
   "Spinner curently being displayed on the `mode-line-process'.")



[elpa] master bf876d6 2/2: Merge commit 'b67364d4825a9bf0a22261809ee9e9060b268198'

2016-04-01 Thread Artur Malabarba
branch: master
commit bf876d66f640ad720cc9afc44e399cd7a25ace1c
Merge: 76da666 b67364d
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Merge commit 'b67364d4825a9bf0a22261809ee9e9060b268198'
---
 packages/sotlisp/sotlisp.el |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/packages/sotlisp/sotlisp.el b/packages/sotlisp/sotlisp.el
index a4cd9dc..ee5f6f82 100644
--- a/packages/sotlisp/sotlisp.el
+++ b/packages/sotlisp/sotlisp.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/Malabarba/speed-of-thought-lisp
 ;; Keywords: convenience, lisp
 ;; Package-Requires: ((emacs "24.1"))
-;; Version: 1.5.1
+;; Version: 1.5.2
 
 ;; 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
@@ -469,7 +469,10 @@ If `speed-of-thought-mode' is already on, call ON."
#'comment-or-uncomment-sexp
  #'sotlisp-comment-or-uncomment-sexp))
 ("\C-cf". sotlisp-find-or-define-function)
-("\C-cv". sotlisp-find-or-define-variable)))
+("\C-cv". sotlisp-find-or-define-variable))
+  (if sotlisp-mode
+  (abbrev-mode 1)
+(kill-local-variable 'abbrev-mode)))
 
 (defun sotlisp-turn-on-everywhere ()
   "Call-once function to turn on sotlisp everywhere.



[elpa] master b67364d 1/2: Fix #5 - Turn on abbrev-mode

2016-04-01 Thread Artur Malabarba
branch: master
commit b67364d4825a9bf0a22261809ee9e9060b268198
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Fix #5 - Turn on abbrev-mode
---
 sotlisp.el |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/sotlisp.el b/sotlisp.el
index 9aca06a..95b626e 100644
--- a/sotlisp.el
+++ b/sotlisp.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/Malabarba/speed-of-thought-lisp
 ;; Keywords: convenience, lisp
 ;; Package-Requires: ((emacs "24.1"))
-;; Version: 1.5.1
+;; Version: 1.5.2
 
 ;; 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
@@ -469,7 +469,10 @@ If `speed-of-thought-mode' is already on, call ON."
#'comment-or-uncomment-sexp
  #'sotlisp-comment-or-uncomment-sexp))
 ("\C-cf". sotlisp-find-or-define-function)
-("\C-cv". sotlisp-find-or-define-variable)))
+("\C-cv". sotlisp-find-or-define-variable))
+  (if sotlisp-mode
+  (abbrev-mode 1)
+(kill-local-variable 'abbrev-mode)))
 
 (defun sotlisp-turn-on-everywhere ()
   "Call-once function to turn on sotlisp everywhere.



[elpa] master ef50950 1/2: Fix #70 - Do indent on empty line

2016-04-01 Thread Artur Malabarba
branch: master
commit ef509502cdd228c8ce0a562bbf411e5f98beaaf1
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

Fix #70 - Do indent on empty line

I have no idea why this was disabled in the first place, but now we have
a reason to re-enable it.
---
 aggressive-indent.el |   17 -
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index 187b76d..764a332 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/aggressive-indent-mode
-;; Version: 1.5
+;; Version: 1.5.1
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: indent lisp maint tools
 ;; Prefix: aggressive-indent
@@ -190,14 +190,13 @@ change."
 (null (buffer-modified-p))
 (and (boundp 'smerge-mode) smerge-mode)
 (let ((line (thing-at-point 'line)))
-  (when (stringp line)
-(or (string-match "\\`[[:blank:]]*\n?\\'" line)
-;; If the user is starting to type a comment.
-(and (stringp comment-start)
- (string-match (concat "\\`[[:blank:]]*"
-   (substring comment-start 0 1)
-   "[[:blank:]]*$")
-   line)
+  (and (stringp line)
+   ;; If the user is starting to type a comment.
+   (stringp comment-start)
+   (string-match (concat "\\`[[:blank:]]*"
+ (substring comment-start 0 1)
+ "[[:blank:]]*$")
+ line)))
 (let ((sp (syntax-ppss)))
   ;; Comments.
   (or (and (not aggressive-indent-comments-too) (elt sp 4))



  1   2   3   4   5   6   >