[elpa] master updated (54df259 -> 9f23289)

2015-04-26 Thread Artur Malabarba
malabarba pushed a change to branch master.

  from  54df259   Merge commit 'ac93b9eef9b6ac44d187b9688d68a7a5f205b3fe' 
from js2-mode
   new  a130936   * bug-hunter.el: Fix a couple of bugs
   new  d1465c9   * bug-hunter.el: Reduce number of steps
   new  9f23289   * bug-hunter.el: Bump version number


Summary of changes:
 packages/bug-hunter/bug-hunter.el |   97 +---
 1 files changed, 46 insertions(+), 51 deletions(-)



[elpa] master d1465c9 2/3: * bug-hunter.el: Reduce number of steps

2015-04-26 Thread Artur Malabarba
branch: master
commit d1465c90dc30f878537ec95b7548aa45e8269b7b
Author: Artur Malabarba 
Commit: Artur Malabarba 

* bug-hunter.el: Reduce number of steps
---
 packages/bug-hunter/bug-hunter.el |   40 
 1 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/packages/bug-hunter/bug-hunter.el 
b/packages/bug-hunter/bug-hunter.el
index 70bae25..8dcd7a6 100644
--- a/packages/bug-hunter/bug-hunter.el
+++ b/packages/bug-hunter/bug-hunter.el
@@ -262,25 +262,29 @@ ASSERTION is received by `bug-hunter--bisect-start'.
 SAFE is a list of forms confirmed to not match the ASSERTION,
 HEAD is a list of forms to be tested now, and TAIL is a list
 which will be inspected if HEAD doesn't match ASSERTION."
-  (cond
-   ((not tail)
-(vector (length safe)
-;; Sometimes we already ran this, sometimes not. So it's
-;; easier to just run it anyway to get the return value.
-(bug-hunter--run-and-test (append safe head) assertion)))
-   ((and (message "Testing: %s/%s"
-   (cl-incf bug-hunter--i)
-   bug-hunter--estimate)
- (setq bug-hunter--current-head head)
- (bug-hunter--run-and-test (append safe head) assertion))
-(apply #'bug-hunter--bisect
-  assertion
-  safe
-  (bug-hunter--split head)))
-   (t (apply #'bug-hunter--bisect
+  (message "Testing: %s/%s" (cl-incf bug-hunter--i) bug-hunter--estimate)
+  ;; Used if the user quits.
+  (setq bug-hunter--current-head head)
+  (let ((ret-val (bug-hunter--run-and-test (append safe head) assertion)))
+(cond
+ ((not tail)
+  (cl-assert ret-val nil)
+  (vector (length safe) ret-val))
+ ;; Issue in the head.
+ ((and ret-val (< (length head) 2))
+  (vector (length safe) ret-val))
+ (ret-val
+  (apply #'bug-hunter--bisect
 assertion
-(append safe head)
-(bug-hunter--split tail)
+safe
+(bug-hunter--split head)))
+ ;; Issue in the tail.
+ (t (apply #'bug-hunter--bisect
+  assertion
+  (append safe head)
+  ;; If tail has length 1, we already know where the issue is,
+  ;; but we still do this to get the return value.
+  (bug-hunter--split tail))
 
 (defun bug-hunter--bisect-start (forms assertion)
   "Run a bisection search on list of FORMS using ASSERTION.



[elpa] master 9f23289 3/3: * bug-hunter.el: Bump version number

2015-04-26 Thread Artur Malabarba
branch: master
commit 9f2328925e5bbb5be791e200dc4e421aa9c89551
Author: Artur Malabarba 
Commit: Artur Malabarba 

* bug-hunter.el: Bump version number

Also expand documentation.
---
 packages/bug-hunter/bug-hunter.el |   51 
 1 files changed, 23 insertions(+), 28 deletions(-)

diff --git a/packages/bug-hunter/bug-hunter.el 
b/packages/bug-hunter/bug-hunter.el
index 8dcd7a6..2d0fc50 100644
--- a/packages/bug-hunter/bug-hunter.el
+++ b/packages/bug-hunter/bug-hunter.el
@@ -2,9 +2,9 @@
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
-;; Author: Artur Malabarba 
-;; URL: http://github.com/Bruce-Connor/elisp-bug-hunter
-;; Version: 0.1
+;; Author: Artur Malabarba 
+;; URL: http://github.com/Malabarba/elisp-bug-hunter
+;; Version: 0.2
 ;; Keywords: lisp
 ;; Package-Requires: ((seq "1.3") (cl-lib "0.5"))
 
@@ -22,55 +22,50 @@
 ;; along with this program.  If not, see .
 
 ;;; Commentary:
-;; `bug-hunter' is an Emacs library that finds the source of an error or
-;; unexpected behavior inside an elisp configuration file (tipically
+;;
+;; The Bug Hunter is an Emacs library that finds the source of an error or
+;; unexpected behavior inside an elisp configuration file (typically
 ;; `init.el' or `.emacs').
-;; 
-;; 
+;;
 ;; Usage Examples
 ;; ==
-;; 
+;;
 ;;   If your Emacs init file signals an error during startup, but you don’t
 ;;   know why, simply issue
 ;;   ,
 ;;   | M-x bug-hunter-init-file RET RET
 ;;   `
-;;   and `bug-hunter' will find it for you.
-;; 
+;;   and The Bug Hunter will find it for you. Note that your `init.el' (or
+;;   `.emacs') must be idempotent for this to work.
+;;
 ;;   If Emacs starts up without errors but something is not working as it
 ;;   should, invoke the same command, but give it in an assertion.
 ;;   Essentially, if you can write a snippet that detects the issue and
 ;;   returns non-nil, just provide this snippet as the assertion and the
 ;;   Bug Hunter will do a bisection search for you.
-;; 
+;;
 ;;   For example, let’s say there’s something in your init file that’s
 ;;   loading the `cl' library, and you don’t want that. You /know/ you’re
 ;;   not loading it yourself, but how can you figure out which external
 ;;   package is responsible for this outrage?
-;; 
+;;
 ;;   ,
 ;;   | M-x bug-hunter-init-file RET (featurep 'cl) RET
 ;;   `
-;; 
+;;
 ;;   *That’s it!* You’ll be given a nice buffer reporting the results:
-;; 
+;;
 ;;   - Are you getting obscure errors when trying to open /“.tex”/ files?
-;; Don’t despair! Just use `(find-file "dummy.tex")' as the assertion.
-;;   - Did `ox-html' stop working due to some arcane misconfiguration? Just
-;; write an assertion that does an export and checks the result.
+;; - Don’t despair! Just use `(find-file "dummy.tex")' as the
+;;   assertion.
+;;   - Did `ox-html' stop working due to some arcane misconfiguration?
+;; - Just write an assertion that does an export and checks the result.
 ;;   - Does some random command suddenly bind itself to `C-j' and you can’t
-;; figure out why? `(eq (key-binding "\n") 'unwanted-command)' is the
-;; assertion for you!
-;; 
+;; figure out why?
+;; - `(eq (key-binding "\n") 'unwanted-command)' is the assertion for
+;;   you!
+;;
 ;;   Finally, you can also use `bug-hunter-file' to hunt in other files.
-;; 
-
-;; Installation
-;; 
-;; 
-;;   Bug Hunter will be on Gelpa shortly. For now, do the following:
-;;   1. Open the `bug-hunter.el` file.
-;;   2. Issue `M-x package-install-from-buffer`.
 
 
 ;;; Code:



[elpa] master a130936 1/3: * bug-hunter.el: Fix a couple of bugs

2015-04-26 Thread Artur Malabarba
branch: master
commit a130936b9bc72b50bc4c112cade1c1d670c4604b
Author: Artur Malabarba 
Commit: Artur Malabarba 

* bug-hunter.el: Fix a couple of bugs
---
 packages/bug-hunter/bug-hunter.el |6 +-
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/packages/bug-hunter/bug-hunter.el 
b/packages/bug-hunter/bug-hunter.el
index bd6c06d..70bae25 100644
--- a/packages/bug-hunter/bug-hunter.el
+++ b/packages/bug-hunter/bug-hunter.el
@@ -229,8 +229,7 @@ the file."
   (with-temp-file file-name
 (print (list 'prin1 form) (current-buffer)))
   (call-process exec nil out-buf nil
-"-Q" "--batch" "-l"
-(shell-quote-argument file-name))
+"-Q" "--batch" "-l" file-name)
   (with-current-buffer out-buf
 (goto-char (point-max))
 (forward-sexp -1)
@@ -380,9 +379,6 @@ Wraps them in a progn if necessary."
(let ((minibuffer-completing-symbol t))
  (minibuffer-with-setup-hook
  (lambda ()
-   ;; FIXME: call emacs-lisp-mode?
-   (add-function :before-until (local 
'eldoc-documentation-function)
- #'elisp-eldoc-documentation-function)
(add-hook 'completion-at-point-functions
  #'elisp-completion-at-point nil t)
(run-hooks 'eval-expression-minibuffer-setup-hook))



[elpa] master bea3d53: * packages/minibuffer-line/minibuffer-line.el: New package.

2015-04-26 Thread Stefan Monnier
branch: master
commit bea3d53c6cfded82a1c574ab18068e9800e762c3
Author: Stefan Monnier 
Commit: Stefan Monnier 

* packages/minibuffer-line/minibuffer-line.el: New package.
---
 packages/minibuffer-line/minibuffer-line.el |   78 +++
 1 files changed, 78 insertions(+), 0 deletions(-)

diff --git a/packages/minibuffer-line/minibuffer-line.el 
b/packages/minibuffer-line/minibuffer-line.el
new file mode 100644
index 000..0e44318
--- /dev/null
+++ b/packages/minibuffer-line/minibuffer-line.el
@@ -0,0 +1,78 @@
+;;; minibuffer-line.el --- Display status info in the minibuffer window  -*- 
lexical-binding: t; -*-
+
+;; Copyright (C) 2015  Free Software Foundation, Inc.
+
+;; Author: Stefan Monnier 
+;; Keywords:
+;; 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 .
+
+;;; Commentary:
+
+;; This package lets you display various status information in the minibuffer
+;; window instead of the mode-line.  Of course, this is only displayed when the
+;; minibuffer window is not already used for other things (e.g. a minibuffer or
+;; an each area message).
+;;
+;; The contents and aspect is controlled by the `minibuffer-line-format'
+;; variable and the `minibuffer-line' face.  Their current default kind of
+;; sucks: suggestions for improvements welcome.
+
+;;; Code:
+
+(defgroup minibuffer-line ()
+  "Use the idle minibuffer window to display status information."
+  :group 'mode-line)
+
+(defcustom minibuffer-line-format
+  '("" (:eval system-name) " | " (:eval (format-time-string "%F %R")))
+  "Specification of the contents of the minibuffer-line.
+Uses the same format as `mode-line-format'."
+  :type 'sexp)
+
+(defface minibuffer-line
+  '((t :inherit mode-line-inactive))
+  "Face to use for the minibuffer-line.")
+
+(defcustom minibuffer-line-refresh-interval 60
+  "The frequency at which the minibuffer-line is updated, in seconds."
+  :type 'integer)
+
+(defconst minibuffer-line--buffer " *Minibuf-0*")
+
+(defvar minibuffer-line--timer nil)
+
+;;;###autoload
+(define-minor-mode minibuffer-line-mode
+  "Display status info in the minibuffer window."
+  :global t
+  (with-current-buffer minibuffer-line--buffer
+(erase-buffer))
+  (when minibuffer-line--timer
+(cancel-timer minibuffer-line--timer)
+(setq minibuffer-line--timer nil))
+  (when minibuffer-line-mode
+(setq minibuffer-line--timer
+  (run-with-timer t minibuffer-line-refresh-interval
+  #'minibuffer-line--update))
+(minibuffer-line--update)))
+
+(defun minibuffer-line--update ()
+  (with-current-buffer minibuffer-line--buffer
+(erase-buffer)
+(insert (format-mode-line minibuffer-line-format 'minibuffer-line
+
+(provide 'minibuffer-line)
+;;; minibuffer-line.el ends here



[elpa] master ecfeed1: * packages/company-statistics/company-statistics.el: Use lexical-binding.

2015-04-26 Thread Stefan Monnier
branch: master
commit ecfeed14c1847fbd9f15dfd66b39c7b8260f005a
Author: Stefan Monnier 
Commit: Stefan Monnier 

* packages/company-statistics/company-statistics.el: Use lexical-binding.
Remove redundant :group args.
---
 packages/company-statistics/company-statistics.el |   20 +++-
 1 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/packages/company-statistics/company-statistics.el 
b/packages/company-statistics/company-statistics.el
index 3346c96..bf6a50f 100644
--- a/packages/company-statistics/company-statistics.el
+++ b/packages/company-statistics/company-statistics.el
@@ -1,6 +1,6 @@
-;;; company-statistics.el --- Sort candidates using completion history
+;;; company-statistics.el --- Sort candidates using completion history  -*- 
lexical-binding:t -*-
 
-;; Copyright (C) 2014  Free Software Foundation, Inc.
+;; Copyright (C) 2014-2015  Free Software Foundation, Inc.
 
 ;; Author: Ingo Lohmar 
 ;; URL: https://github.com/company-mode/company-statistics
@@ -56,41 +56,35 @@
 (defcustom company-statistics-size 400
   "Number of completion choices that `company-statistics' keeps track of.
 As this is a global cache, making it too small defeats the purpose."
-  :group 'company-statistics
   :type 'integer
-  :initialize (lambda (option init-size) (setq company-statistics-size 
init-size))
-  :set 'company-statistics--log-resize)
+  :initialize (lambda (_option init-size) (setq company-statistics-size 
init-size))
+  :set #'company-statistics--log-resize)
 
 (defcustom company-statistics-file
   (concat user-emacs-directory "company-statistics-cache.el")
   "File to save company-statistics state."
-  :group 'company-statistics
   :type 'string)
 
 (defcustom company-statistics-auto-save t
   "Whether to save the statistics when leaving emacs."
-  :group 'company-statistics
   :type 'boolean)
 
 (defcustom company-statistics-auto-restore t
   "Whether to restore statistics when company-statistics is enabled and has
 not been used before."
-  :group 'company-statistics
   :type 'boolean)
 
-(defcustom company-statistics-score-change 
'company-statistics-score-change-default
+(defcustom company-statistics-score-change 
#'company-statistics-score-change-default
   "Function called with completion choice.  Using arbitrary other info,
 it should produce an alist, each entry labeling a context and the
 associated score update: ((ctx-a . 1) (\"str\" . 0.5) (nil . 1)).  Nil is
 the global context."
-  :group 'company-statistics
   :type 'function)
 
 (defcustom company-statistics-score-calc 'company-statistics-score-calc-default
   "Function called with completion candidate.  Using arbitrary other info,
 eg, on the current context, it should evaluate to the candidate's score (a
 number)."
-  :group 'company-statistics
   :type 'function)
 
 ;; internal vars, persistence
@@ -114,7 +108,7 @@ number)."
 (defun company-statistics--initialized-p ()
   (hash-table-p company-statistics--scores))
 
-(defun company-statistics--log-resize (option new-size)
+(defun company-statistics--log-resize (_option new-size)
   (when (company-statistics--initialized-p)
 ;; hash scoresheet auto-resizes, but log does not
 (let ((new-hist (make-vector new-size nil))
@@ -163,7 +157,7 @@ number)."
 
 ;; score calculation for insert/retrieval --- can be changed on-the-fly
 
-(defun company-statistics-score-change-default (cand)
+(defun company-statistics-score-change-default (_cand)
   "Count for global score, mode context, filename context."
   (nconc;when's nil is removed
(list (cons nil 1) (cons major-mode 1)) ;major-mode is never nil



[elpa] master 72ad9c2: * packages/ahungry-theme/ahungry-theme.el: Use lexical-binding.

2015-04-26 Thread Stefan Monnier
branch: master
commit 72ad9c216a183ffaab7e96c2dc96a9171650c65f
Author: Stefan Monnier 
Commit: Stefan Monnier 

* packages/ahungry-theme/ahungry-theme.el: Use lexical-binding.
---
 packages/ahungry-theme/ahungry-theme.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/packages/ahungry-theme/ahungry-theme.el 
b/packages/ahungry-theme/ahungry-theme.el
index 533305d..c741176 100644
--- a/packages/ahungry-theme/ahungry-theme.el
+++ b/packages/ahungry-theme/ahungry-theme.el
@@ -1,4 +1,4 @@
-;;; ahungry-theme.el --- Ahungry color theme for Emacs.  Make sure to 
(load-theme 'ahungry).
+;;; ahungry-theme.el --- Ahungry color theme for Emacs.  Make sure to 
(load-theme 'ahungry).  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 2015  Free Software Foundation, Inc.
 



[elpa] master ec97145: * aggressive-indent/aggressive-indent.el: Use lexical-binding.

2015-04-26 Thread Stefan Monnier
branch: master
commit ec9714582578e7cda4c59a7fe0b681fe5c69721e
Author: Stefan Monnier 
Commit: Stefan Monnier 

* aggressive-indent/aggressive-indent.el: Use lexical-binding.
---
 packages/aggressive-indent/aggressive-indent.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/packages/aggressive-indent/aggressive-indent.el 
b/packages/aggressive-indent/aggressive-indent.el
index 45f3323..7321fd5 100644
--- a/packages/aggressive-indent/aggressive-indent.el
+++ b/packages/aggressive-indent/aggressive-indent.el
@@ -1,4 +1,4 @@
-;;; aggressive-indent.el --- Minor mode to aggressively keep your code always 
indented
+;;; aggressive-indent.el --- Minor mode to aggressively keep your code always 
indented  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 2014, 2015 Free Software Foundation, Inc
 



[elpa] master 98304dd: * names/names.el: Use lexical-binding. Silence compiler warnings.

2015-04-26 Thread Stefan Monnier
branch: master
commit 98304dda137f153e2c5e7a0fab28acd8b0aab69c
Author: Stefan Monnier 
Commit: Stefan Monnier 

* names/names.el: Use lexical-binding.  Silence compiler warnings.
---
 packages/names/names.el |  120 ---
 1 files changed, 61 insertions(+), 59 deletions(-)

diff --git a/packages/names/names.el b/packages/names/names.el
index 5cc70e2..ee8768c 100644
--- a/packages/names/names.el
+++ b/packages/names/names.el
@@ -1,6 +1,6 @@
-;;; names.el --- Namespaces for emacs-lisp. Avoid name clobbering without 
hiding symbols.
+;;; names.el --- Namespaces for emacs-lisp. Avoid name clobbering without 
hiding symbols.  -*- lexical-binding:t -*-
 
-;; Copyright (C) 2014 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
 
 ;; Author: Artur Malabarba 
 ;; Maintainer: Artur Malabarba 
@@ -44,10 +44,12 @@
 ;; If `C-x' is not a prefix.
 (unless (consp (key-binding "\C-x"))
   ;; Disable the `C-xC-a' binds.
+  (defvar edebug-inhibit-emacs-lisp-mode-bindings)
   (setq edebug-inhibit-emacs-lisp-mode-bindings t)
   ;; And the `C-xX' binds.
+  (defvar global-edebug-prefix)
   (when (or (null (boundp 'global-edebug-prefix))
-(eq 24 (elt global-edebug-prefix 0)))
+(eq ?\C-x (elt global-edebug-prefix 0)))
 (setq global-edebug-prefix "")))
 (require 'edebug)
 (require 'bytecomp)
@@ -55,43 +57,45 @@
 
 ;;; Support
 (declare-function names--autoload-do-load "names" 2)
-(if (fboundp 'function-get)
-(defalias 'names--function-get #'function-get)
-  (defun names--function-get (f prop &rest _)
-"Return the value of property PROP of function F.
+(defalias 'names--function-get
+  (if (fboundp 'function-get) #'function-get
+
+(defun names--autoload-do-load (def name)
+  "Load autoloaded definition DEF from function named NAME."
+  (unless (load (cadr def) 'noerror)
+(error "Macro `%s' is autoloaded, but its file (%s) couldn't be loaded"
+   name (cadr def)))
+  (symbol-function name))
+
+(lambda (f prop &rest _)
+  "Return the value of property PROP of function F.
 If F is an autoloaded macro, try to autoload it in the hope that
 it will set PROP."
-(let ((val nil))
-  (while (and (symbolp f)
-  (null (setq val (get f prop)))
-  (fboundp f))
-(let ((fundef (symbol-function f)))
-  (if (and (names--autoloadp fundef)
-   (not (equal fundef (names--autoload-do-load fundef f
-  nil ;Re-try `get' on the same `f'.
-(setq f fundef
-  val))
-  (defun names--autoload-do-load (def name)
-"Load autoloaded definition DEF from function named NAME."
-(unless (load (cadr def) 'noerror)
-  (error "Macro `%s' is autoloaded, but its file (%s) couldn't be loaded"
- name (cadr def)))
-(symbol-function name)))
-
-(if (fboundp 'macrop)
-(defalias 'names--compat-macrop #'macrop)
-  (defun names--compat-macrop (object)
-"Non-nil if and only if OBJECT is a macro."
-(let ((def (indirect-function object t)))
-  (when (consp def)
-(or (eq 'macro (car def))
-(and (names--autoloadp def) (memq (nth 4 def) '(macro t
-
-(if (fboundp 'autoloadp)
-(defalias 'names--autoloadp #'autoloadp)
-  (defsubst names--autoloadp (object)
-"Non-nil if OBJECT is an autoload."
-(eq 'autoload (car-safe object
+  (let ((val nil))
+(while (and (symbolp f)
+(null (setq val (get f prop)))
+(fboundp f))
+  (let ((fundef (symbol-function f)))
+(if (and (names--autoloadp fundef)
+ (not (equal fundef (names--autoload-do-load fundef f
+nil ;Re-try `get' on the same `f'.
+  (setq f fundef
+val
+
+(defalias 'names--compat-macrop
+  (if (fboundp 'macrop) #'macrop
+(lambda (object)
+  "Non-nil if and only if OBJECT is a macro."
+  (let ((def (indirect-function object t)))
+(when (consp def)
+  (or (eq 'macro (car def))
+  (and (names--autoloadp def) (memq (nth 4 def) '(macro t)
+
+(defalias 'names--autoloadp
+  (if (fboundp 'autoloadp) #'autoloadp
+(lambda (object)
+  "Non-nil if OBJECT is an autoload."
+  (eq 'autoload (car-safe object)
 
 (unless (get-edebug-spec 'cl-defun)
   (def-edebug-spec cl-defun defun*))
@@ -291,7 +295,7 @@ behaviour.")
   `(when (boundp ',var)
  (remove
   nil
-  (mapcar (lambda (x) (when (funcall (or ,pred 'identity) (or (car-safe x) 
x))
+  (mapcar (lambda (x) (when (funcall (or ,pred #'identity) (or (car-safe 
x) x))
 (or (car-safe x) x)))
   ,var
 
@@ -305,7 +309,7 @@ Returns a list (KEYWORD . ARGUMENTLIST)."
   (keywordp kar)
   (setq n (assoc kar names--keyword-list))
   (setq n (cadr n))
-  (dotimes (it (1+ n

[elpa] master 18d4a5e: * packages/test-simple/test-simple.el: Use cl-lib

2015-04-26 Thread Stefan Monnier
branch: master
commit 18d4a5e7e202dba4fb9e8a0351ed09f415c679eb
Author: Stefan Monnier 
Commit: Stefan Monnier 

* packages/test-simple/test-simple.el: Use cl-lib

(test-simple-msg): Let-bind inhibit-read-only directly.
(test-simple--ok-msg, test-simple--not-ok-msg): Rename from ok-msg and
not-ok-msg.
* packages/test-simple/ChangeLog: Remove empty file.
---
 packages/test-simple/test-simple.el |   93 ---
 1 files changed, 42 insertions(+), 51 deletions(-)

diff --git a/packages/test-simple/ChangeLog b/packages/test-simple/ChangeLog
deleted file mode 100644
index e69de29..000
diff --git a/packages/test-simple/test-simple.el 
b/packages/test-simple/test-simple.el
index 351a60b..e7e4164 100644
--- a/packages/test-simple/test-simple.el
+++ b/packages/test-simple/test-simple.el
@@ -6,6 +6,7 @@
 ;; Author: Rocky Bernstein 
 ;; URL: http://github.com/rocky/emacs-test-simple
 ;; Keywords: unit-test
+;; Package-Requires: ((cl-lib "0"))
 ;; Version: 1.1
 
 ;; This program is free software: you can redistribute it and/or
@@ -26,7 +27,7 @@
 
 ;; test-simple.el is:
 ;;
-;; * Simple. No need for
+;; * Simple.  No need for
 ;;   - context macros,
 ;;   - enclosing specifications,
 ;;   - required test tags.
@@ -37,7 +38,7 @@
 ;;
 ;; * Accomodates both interactive and non-interactive use.
 ;;- For interactive use, one can use `eval-last-sexp', `eval-region',
-;;  and `eval-buffer'. One can `edebug' the code.
+;;  and `eval-buffer'.  One can `edebug' the code.
 ;;-  For non-interactive use, run:
 ;;emacs --batch --no-site-file --no-splash --load 
 ;;
@@ -81,21 +82,14 @@
 
 ;;; To do:
 
+;; FIXME: Namespace is all messed up!
 ;; Main issues: more expect predicates
 
 (require 'time-date)
 
 ;;; Code:
 
-(eval-when-compile
-  (byte-compile-disable-warning 'cl-functions)
-  ;; Somehow disabling cl-functions causes the erroneous message:
-  ;;   Warning: the function `reduce' might not be defined at runtime.
-  ;; FIXME: isolate, fix and/or report back to Emacs developers a bug
-  ;; (byte-compile-disable-warning 'unresolved)
-  (require 'cl)
-  )
-(require 'cl)
+(eval-when-compile (require 'cl-lib))
 
 (defvar test-simple-debug-on-error nil
   "If non-nil raise an error on the first failure.")
@@ -103,7 +97,7 @@
 (defvar test-simple-verbosity 0
   "The greater the number the more verbose output.")
 
-(defstruct test-info
+(cl-defstruct test-info
   description ;; description of last group of tests
   (assert-count 0);; total number of assertions run
   (failure-count 0)   ;; total number of failures seen
@@ -114,7 +108,7 @@
   "Variable to store testing information for a buffer.")
 
 (defun note (description &optional test-info)
-  "Adds a name to a group of tests."
+  "Add a name to a group of tests."
   (if (getenv "USE_TAP")
 (test-simple-msg (format "# %s" description) 't)
 (if (> test-simple-verbosity 0)
@@ -135,15 +129,13 @@
 
 ;;;###autoload
 (defun test-simple-clear (&optional test-info test-start-msg)
-  "Initializes and resets everything to run tests. You should run
-this before running any assertions. Running more than once clears
-out information from the previous run."
+  "Initialize and reset everything to run tests.
+You should run this before running any assertions.  Running more than once
+clears out information from the previous run."
 
   (interactive)
 
   (unless test-info
-(unless test-simple-info
-  (make-variable-buffer-local (defvar test-simple-info (make-test-info
 (setq test-info test-simple-info))
 
   (setf (test-info-description test-info) "none set")
@@ -174,9 +166,9 @@ out information from the previous run."
  (list error-condition '(assert-t t)
 
 (defun assert-op (op expected actual &optional fail-message test-info)
-  "expectation is that ACTUAL should be equal to EXPECTED."
+  "Expectation is that ACTUAL should be equal to EXPECTED."
   (unless test-info (setq test-info test-simple-info))
-  (incf (test-info-assert-count test-info))
+  (cl-incf (test-info-assert-count test-info))
   (if (not (funcall op actual expected))
   (let* ((fail-message
  (if fail-message
@@ -188,26 +180,26 @@ out information from the previous run."
  (if (boundp 'test-info)
  (test-info-description test-info)
"unset")))
-   (add-failure (format "assert-%s" op) test-info-mess
-(concat fail-message expect-message)))
-(ok-msg fail-message)))
+   (test-simple--add-failure (format "assert-%s" op) test-info-mess
+  (concat fail-message expect-message)))
+(test-simple--ok-msg fail-message)))
 
 (defun assert-equal (expected actual &optional fail-message test-info)
-  "expectation is that ACTUAL should be equal to EXPECTED."
+  "Expectation is that ACTUAL should be equal to EXPECTED."
   (assert-op 'equal expected actual fail-message test-info))

[elpa] master 246ce37: * packages/load-relative/load-relative.el (__FILE__): bytecomp-filename problem.

2015-04-26 Thread Stefan Monnier
branch: master
commit 246ce37a2c7f602ea75eea3c3dfc28ea81fa0a35
Author: Stefan Monnier 
Commit: Stefan Monnier 

* packages/load-relative/load-relative.el (__FILE__): bytecomp-filename 
problem.
Fix other details mentioned by `checkdoc-current-buffer'.
---
 packages/load-relative/ChangeLog|7 -
 packages/load-relative/load-relative.el |   42 --
 2 files changed, 28 insertions(+), 21 deletions(-)

diff --git a/packages/load-relative/ChangeLog b/packages/load-relative/ChangeLog
index 5f20404..ff5aa1a 100644
--- a/packages/load-relative/ChangeLog
+++ b/packages/load-relative/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-26  Stefan Monnier  
+
+   * load-relative.el (__FILE__): Mention the bytecomp-filename problem.
+   Fix other details mentioned by `checkdoc-current-buffer'.
+
 2010-09-30  rocky 
 
* .gitignore: git Administrivia.
@@ -9,7 +14,7 @@
 
 2010-09-30  rocky 
 
-   * .gitignore, COPYING, Makefile.am, README, configure.ac: 
+   * .gitignore, COPYING, Makefile.am, README, configure.ac:
Administrivia. Add COPYING, update README and .gitignore, bump
version number.
 
diff --git a/packages/load-relative/load-relative.el 
b/packages/load-relative/load-relative.el
index a57748a..2c96135 100644
--- a/packages/load-relative/load-relative.el
+++ b/packages/load-relative/load-relative.el
@@ -26,12 +26,12 @@
 
 ;; Here we provide functions which facilitate writing multi-file Emacs
 ;; packages and facilitate running from the source tree without having
-;; to "install" code or fiddle with evil `load-path'. See
+;; to "install" code or fiddle with evil `load-path'.  See
 ;; https://github.com/rocky/emacs-load-relative/wiki/NYC-Lisp-talk for
 ;; the the rationale behind this.
 ;;
 ;; The functions we add are relative versions of `load', `require' and
-;; `find-file-no-select' and versions which take list arguments. We also add a
+;; `find-file-no-select' and versions which take list arguments.  We also add a
 ;; `__FILE__' function and a `provide-me' macro.
 
 ;; The latest version of this code is at:
@@ -39,13 +39,13 @@
 
 ;; `__FILE__' returns the file name that that the calling program is
 ;; running.  If you are `eval''ing a buffer then the file name of that
-;; buffer is used. The name was selected to be analogous to the name
+;; buffer is used.  The name was selected to be analogous to the name
 ;; used in C, Perl, Python, and Ruby.
 
 ;; `load-relative' loads an Emacs Lisp file relative to another
-;; (presumably currently running) Emacs Lisp file. For example suppose
+;; (presumably currently running) Emacs Lisp file.  For example suppose
 ;; you have Emacs Lisp files "foo.el" and "bar.el" in the same
-;; directory. To load "bar.el" from inside Emacs lisp file "foo.el":
+;; directory.  To load "bar.el" from inside Emacs Lisp file "foo.el":
 ;;
 ;; (require 'load-relative)
 ;; (load-relative "baz")
@@ -70,7 +70,7 @@
 ;; `load_relative'.
 ;;
 ;; Use `require-relative-list' when you have a list of files you want
-;; to `require'. To `require-relative' them all in one shot:
+;; to `require'.  To `require-relative' them all in one shot:
 ;;
 ;; (require-relative-list '("dbgr-init" "dbgr-fringe"))
 ;;
@@ -83,9 +83,9 @@
 ;; the filename, but I consider that a good thing.
 ;;
 ;; The function `find-file-noselect-relative' provides a way of accessing
-;; resources which are located relative to the currently running Emacs lisp
-;; file. This is probably most useful when running Emacs as a scripting engine
-;; for batch processing or with tests cases. For example, this form will find
+;; resources which are located relative to the currently running Emacs Lisp
+;; file.  This is probably most useful when running Emacs as a scripting engine
+;; for batch processing or with tests cases.  For example, this form will find
 ;; the README file for this package.
 ;;
 ;; (find-file-noselect-relative "README.md")
@@ -110,15 +110,15 @@
   "Return the string name of file/buffer that is currently begin executed.
 
 The first approach for getting this information is perhaps the
-most pervasive and reliable. But it the most low-level and not
+most pervasive and reliable.  But it the most low-level and not
 part of a public API, so it might change in future
-implementations. This method uses the name that is recorded by
+implementations.  This method uses the name that is recorded by
 readevalloop of `lread.c' as the car of variable
 `current-load-list'.
 
 Failing that, we use `load-file-name' which should work in some
-subset of the same places that the first method works. However
-`load-file-name' will be nil for code that is eval'd. To cover
+subset of the same places that the first method works.  However
+`load-file-name' will be nil for code that is eval'd.  To cover
 those cases, we try `buffer-file-name' which is initially
 correct, for eval'd code, but will change and may be wrong if the
 code sets or switches buffers after the i