[elpa] master 752310e 2/2: * math-symbol-lists: Fix trailer; provide email address

2015-08-31 Thread Stefan Monnier
branch: master
commit 752310ec01183a0d408fb249ad5482554f367262
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* math-symbol-lists: Fix trailer; provide email address
---
 packages/math-symbol-lists/math-symbol-lists.el |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/packages/math-symbol-lists/math-symbol-lists.el 
b/packages/math-symbol-lists/math-symbol-lists.el
index 3f05cf4..414742a 100644
--- a/packages/math-symbol-lists/math-symbol-lists.el
+++ b/packages/math-symbol-lists/math-symbol-lists.el
@@ -1,7 +1,7 @@
 ;;; math-symbol-lists.el --- Lists of Unicode math symbols and latex commands
 ;;
-;; Copyright (C) 2014 Free Software Foundation, Inc.
-;; Author: Vitalie Spinu
+;; Copyright (C) 2014, 2015 Free Software Foundation, Inc.
+;; Author: Vitalie Spinu <spinu...@gmail.com>
 ;; URL: https://github.com/vspinu/math-symbol-lists
 ;; Keywords: Unicode, symbols, mathematics
 ;; Version: 1.0
@@ -3001,7 +3001,7 @@
 ("ord" "\\mttseven"#X1D7FD)
 ("ord" "\\mtteight"#X1D7FE)
 ("ord" "\\mttnine" #X1D7FF))
-  "Extended list of mathematical symbols")
+  "Extended list of mathematical symbols.")
 
 
 (defconst math-symbol-list-latex-commands
@@ -3021,7 +3021,7 @@
 "flushbottom" "fnsymbol" "fontencoding" "fontfamily" "fontseries"
 "fontshape" "fontsize" "footnote" "footnotemark" "footnoterule"
 "footnotesep" "footnotesize" "footnotetext" "footskip" "frame" "framebox"
-"fussy" "gets" "glossary" "glossaryentry" 
+"fussy" "gets" "glossary" "glossaryentry"
 "headheight" "headsep" "height" "hfill" "hline" "hrulefill" "hspace"
 "Huge" "huge" "hyphenation" "iff" "include" "includeonly"
 "indent" "index" "indexentry" "input" "intextsep"
@@ -3064,3 +3064,4 @@
   "List of the latex commands.")
 
 (provide 'math-symbol-lists)
+;;; math-symbol-lists.el ends here



[elpa] master updated (2b26546 -> 752310e)

2015-08-31 Thread Stefan Monnier
monnier pushed a change to branch master.

  from  2b26546   * copyright_exceptions: Add math-symbol exeption
   new  53d0aa3   * company-math: Provide email address
   new  752310e   * math-symbol-lists: Fix trailer; provide email address


Summary of changes:
 packages/company-math/company-math.el   |6 --
 packages/math-symbol-lists/math-symbol-lists.el |9 +
 2 files changed, 9 insertions(+), 6 deletions(-)



[elpa] master 53d0aa3 1/2: * company-math: Provide email address

2015-08-31 Thread Stefan Monnier
branch: master
commit 53d0aa372f1470bfdfd834801bf5d0346bab0ae4
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* company-math: Provide email address
---
 packages/company-math/company-math.el |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/packages/company-math/company-math.el 
b/packages/company-math/company-math.el
index 7d8efab..dc8151f 100644
--- a/packages/company-math/company-math.el
+++ b/packages/company-math/company-math.el
@@ -1,7 +1,7 @@
 ;;; company-math.el --- Completion backends for unicode math symbols and latex 
tags
 ;;
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
-;; Author: Vitalie Spinu
+;; Author: Vitalie Spinu <spinu...@gmail.com>
 ;; URL: https://github.com/vspinu/company-math
 ;; Keywords:  Unicode, symbols, completion
 ;; Version: 1.0.1
@@ -28,6 +28,8 @@
 ;;
 ;;
 ;;
+;;; Commentary:
+
 ;;; Code:
 
 (require 'math-symbol-lists)
@@ -77,7 +79,7 @@ When set to special value t, allow on all faces except those 
in
 
 (defun company-math--make-candidates (alist)
   "Build a list of math symbols ready to be used in ac source.
-ALIST is one of the defined alist in package `symbols'. Return a
+ALIST is one of the defined alist in package `symbols'.  Return a
 list of LaTeX symbols with text property :symbol being the
 corresponding unicode symbol."
   (delq nil



[elpa] master 4de2352: * other-frame-window.el: Use new prefix-command features

2015-09-01 Thread Stefan Monnier
branch: master
commit 4de23529e28c8c1ba5b970bda87463f3923ad362
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* other-frame-window.el: Use new prefix-command features

(ofw--set-prefix): Use prefix-command-preserve-state is available.
Remove left-over prefix state.
(ofw--echo-keystrokes, ofw--preserve-state): New functions.
(prefix-command-echo-keystrokes-functions)
(prefix-command-preserve-state-hook): Use them.
(other-frame-window-mode): Autoload.
---
 packages/other-frame-window/other-frame-window.el |   36 +++-
 1 files changed, 27 insertions(+), 9 deletions(-)

diff --git a/packages/other-frame-window/other-frame-window.el 
b/packages/other-frame-window/other-frame-window.el
index 4b7f6b6..6fc718f 100755
--- a/packages/other-frame-window/other-frame-window.el
+++ b/packages/other-frame-window/other-frame-window.el
@@ -54,9 +54,10 @@
 
  Todo:
 
-;; - Make the `C-x 7' prefix appear in the echo area.
-;; - `C-x 7 C-h' should display the transient map.
-;; - `C-x 7 C-u foo' should pass both prefixes to `foo'.
+;; - Pay attention to bindings added to ctl-x-4-map and ctl-x-5-map
+;; - Should `C-x 7 C-h' display the transient map?
+;; - `C-x 7 C-h k f' should show `find-file' rather than `self-insert-command'.
+;;   This should probably be fixed in set-transient-map.
 
 ;;; Code:
 
@@ -88,20 +89,36 @@
 
 (defun ofw--set-prefix (func)
   "Add ofw prefix function FUNC."
+  (ofw-delete-from-overriding)
   (let ((functions (car display-buffer-overriding-action))
(attrs (cdr display-buffer-overriding-action)))
 (push func functions)
 (setq display-buffer-overriding-action (cons functions attrs))
-;; Make sure the next pre-command-hook doesn't immediately set
-;; display-buffer-overriding-action back to nil.
-(setq ofw--just-set t)
 ;; C-u C-x 7 foo should pass C-u to foo, not to C-x 7, so
 ;; pass the normal prefix to the next command.
-;; FIXME: This should be done by all prefix commands and for all kinds of
-;; prefixes, so that C-x 7 C-u foo works as well!
-(setq prefix-arg current-prefix-arg)
+(if (fboundp 'prefix-command-preserve-state)
+(prefix-command-preserve-state)
+  ;; Make sure the next pre-command-hook doesn't immediately set
+  ;; display-buffer-overriding-action back to nil.
+  (setq ofw--just-set t)
+  (setq prefix-arg current-prefix-arg))
 (set-transient-map ofw-transient-map)))
 
+(defun ofw--echo-keystrokes ()
+  (let ((funs (car display-buffer-overriding-action)))
+(cond
+ ((memq #'ofw-display-buffer-other-frame funs) "[other-frame]")
+ ((memq #'ofw-display-buffer-other-window funs) "[other-window]"
+
+(when (boundp 'prefix-command-echo-keystrokes-functions)
+  (add-hook 'prefix-command-echo-keystrokes-functions
+#'ofw--echo-keystrokes))
+
+(defun ofw--preserve-state () (setq ofw--just-set t))
+(when (boundp 'prefix-command-preserve-state-hook)
+  (add-hook 'prefix-command-preserve-state-hook
+#'ofw--preserve-state))
+
 (defun ofw-delete-from-overriding ()
   "Remove ourselves from 'display-buffer-overriding-action' action list, if 
present."
   (let ((functions (car display-buffer-overriding-action))
@@ -211,6 +228,7 @@ Point stays in moved buffer."
   (setq ofw--just-set nil)
 (ofw-delete-from-overriding)))
 
+;;;###autoload
 (define-minor-mode other-frame-window-mode
   "Minor mode for other frame/window buffer placement.
 Enable mode if ARG is positive."



[elpa] master e169c7f: Skip uninteresting elements

2015-09-16 Thread Stefan Monnier
branch: master
commit e169c7fb941db8b519926dae22539fabf46b6f6e
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

Skip uninteresting elements

(batch-html-make-index): Skip .sig files.
(archive--cleanup-packages): Skip non-plain directories.
(archive--core-package-sync): Don't use pcase pattern `t'.
---
 admin/archive-contents.el |8 ++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index acfe34d..5ead837 100755
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -1,6 +1,6 @@
 ;;; archive-contents.el --- Auto-generate an Emacs Lisp package archive.  -*- 
lexical-binding:t -*-
 
-;; Copyright (C) 2011-2014  Free Software Foundation, Inc
+;; Copyright (C) 2011-2015  Free Software Foundation, Inc
 
 ;; Author: Stefan Monnier <monn...@iro.umontreal.ca>
 
@@ -531,6 +531,7 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
   (cond
((member file '("." ".." "elpa.rss" "index.html" "archive-contents")))
((string-match "\\.html\\'" file))
+   ((string-match "\\.sig\\'" file))
((string-match "-readme\\.txt\\'" file)
 (let ((name (substring file 0 (match-beginning 0
   (puthash name (gethash name packages) packages)))
@@ -592,6 +593,9 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
   (let ((default-directory (expand-file-name "packages/")))
 (dolist (dir (directory-files "."))
   (cond
+   ((or (not (file-directory-p dir)) (file-symlink-p dir))
+;; We only add/remove plain directories in elpa/packages (not 
symlinks).
+nil)
((member dir '("." "..")) nil)
((assoc dir externals-list) nil)
((file-directory-p (expand-file-name (format "%s/.git" dir)))
@@ -698,7 +702,7 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
(pcase file-pattern
  ((pred (stringp)) (cons file-pattern ""))
  (`(,file ,dest . ,_) (cons file dest))
- (t (error "Unrecognized file format for package %s: %S"
+ (_ (error "Unrecognized file format for package %s: %S"
name file-pattern
  (if (stringp file-patterns)
  ;; Files may be just a string, normalize.



[elpa] externals/xelb 2038901: Add copyright line to generated files; Add elpa files to gitignore

2015-09-18 Thread Stefan Monnier
branch: externals/xelb
commit 20389014db4097fe3da8c8becad02bd613f3a762
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

Add copyright line to generated files; Add elpa files to gitignore
---
 .gitignore |2 ++
 xcb-bigreq.el  |1 +
 xcb-composite.el   |1 +
 xcb-damage.el  |1 +
 xcb-dpms.el|1 +
 xcb-dri2.el|1 +
 xcb-dri3.el|1 +
 xcb-ge.el  |1 +
 xcb-glx.el |1 +
 xcb-present.el |1 +
 xcb-randr.el   |1 +
 xcb-record.el  |1 +
 xcb-render.el  |1 +
 xcb-res.el |1 +
 xcb-screensaver.el |1 +
 xcb-shape.el   |1 +
 xcb-shm.el |1 +
 xcb-sync.el|1 +
 xcb-xc_misc.el |1 +
 xcb-xevie.el   |1 +
 xcb-xf86dri.el |1 +
 xcb-xf86vidmode.el |1 +
 xcb-xfixes.el  |1 +
 xcb-xinerama.el|1 +
 xcb-xinput.el  |1 +
 xcb-xkb.el |1 +
 xcb-xprint.el  |1 +
 xcb-xproto.el  |1 +
 xcb-xselinux.el|1 +
 xcb-xtest.el   |1 +
 xcb-xv.el  |1 +
 xcb-xvmc.el|1 +
 32 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore
index c531d98..9e4b0ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
 *.elc
+*-pkg.el
+*-autoloads.el
diff --git a/xcb-bigreq.el b/xcb-bigreq.el
index 4f24dfc..685dc45 100644
--- a/xcb-bigreq.el
+++ b/xcb-bigreq.el
@@ -1,4 +1,5 @@
 ;;; -*- lexical-binding: t -*-
+;; Copyright (C) 2015 Free Software Foundation, Inc.
 ;; This file was generated from `bigreq.xml' by `el_client.el'.
 
 (require 'xcb-types)
diff --git a/xcb-composite.el b/xcb-composite.el
index 77c1807..dea81eb 100644
--- a/xcb-composite.el
+++ b/xcb-composite.el
@@ -1,4 +1,5 @@
 ;;; -*- lexical-binding: t -*-
+;; Copyright (C) 2015 Free Software Foundation, Inc.
 ;; This file was generated from `composite.xml' by `el_client.el'.
 
 (require 'xcb-types)
diff --git a/xcb-damage.el b/xcb-damage.el
index 9cf4362..a603906 100644
--- a/xcb-damage.el
+++ b/xcb-damage.el
@@ -1,4 +1,5 @@
 ;;; -*- lexical-binding: t -*-
+;; Copyright (C) 2015 Free Software Foundation, Inc.
 ;; This file was generated from `damage.xml' by `el_client.el'.
 
 (require 'xcb-types)
diff --git a/xcb-dpms.el b/xcb-dpms.el
index bd6411d..5b2f02c 100644
--- a/xcb-dpms.el
+++ b/xcb-dpms.el
@@ -1,4 +1,5 @@
 ;;; -*- lexical-binding: t -*-
+;; Copyright (C) 2015 Free Software Foundation, Inc.
 ;; This file was generated from `dpms.xml' by `el_client.el'.
 
 (require 'xcb-types)
diff --git a/xcb-dri2.el b/xcb-dri2.el
index 40196d9..ba2443c 100644
--- a/xcb-dri2.el
+++ b/xcb-dri2.el
@@ -1,4 +1,5 @@
 ;;; -*- lexical-binding: t -*-
+;; Copyright (C) 2015 Free Software Foundation, Inc.
 ;; This file was generated from `dri2.xml' by `el_client.el'.
 
 (require 'xcb-types)
diff --git a/xcb-dri3.el b/xcb-dri3.el
index 7c11eb0..7f2c8b9 100644
--- a/xcb-dri3.el
+++ b/xcb-dri3.el
@@ -1,4 +1,5 @@
 ;;; -*- lexical-binding: t -*-
+;; Copyright (C) 2015 Free Software Foundation, Inc.
 ;; This file was generated from `dri3.xml' by `el_client.el'.
 
 (require 'xcb-types)
diff --git a/xcb-ge.el b/xcb-ge.el
index 34d0293..82c7257 100644
--- a/xcb-ge.el
+++ b/xcb-ge.el
@@ -1,4 +1,5 @@
 ;;; -*- lexical-binding: t -*-
+;; Copyright (C) 2015 Free Software Foundation, Inc.
 ;; This file was generated from `ge.xml' by `el_client.el'.
 
 (require 'xcb-types)
diff --git a/xcb-glx.el b/xcb-glx.el
index 882bc37..423035d 100644
--- a/xcb-glx.el
+++ b/xcb-glx.el
@@ -1,4 +1,5 @@
 ;;; -*- lexical-binding: t -*-
+;; Copyright (C) 2015 Free Software Foundation, Inc.
 ;; This file was generated from `glx.xml' by `el_client.el'.
 
 (require 'xcb-types)
diff --git a/xcb-present.el b/xcb-present.el
index 137b4d9..dba8764 100644
--- a/xcb-present.el
+++ b/xcb-present.el
@@ -1,4 +1,5 @@
 ;;; -*- lexical-binding: t -*-
+;; Copyright (C) 2015 Free Software Foundation, Inc.
 ;; This file was generated from `present.xml' by `el_client.el'.
 
 (require 'xcb-types)
diff --git a/xcb-randr.el b/xcb-randr.el
index e9aa0f8..e0d9296 100644
--- a/xcb-randr.el
+++ b/xcb-randr.el
@@ -1,4 +1,5 @@
 ;;; -*- lexical-binding: t -*-
+;; Copyright (C) 2015 Free Software Foundation, Inc.
 ;; This file was generated from `randr.xml' by `el_client.el'.
 
 (require 'xcb-types)
diff --git a/xcb-record.el b/xcb-record.el
index ce71daa..b458c59 100644
--- a/xcb-record.el
+++ b/xcb-record.el
@@ -1,4 +1,5 @@
 ;;; -*- lexical-binding: t -*-
+;; Copyright (C) 2015 Free Software Foundation, Inc.
 ;; This file was generated from `record.xml' by `el_client.el'.
 
 (require 'xcb-types)
diff --git a/xcb-render.el b/xcb-render.el
index 0ec1ce7..ebffb05 100644
--- a/xcb-render.el
+++ b/xcb-render.el
@@ -1,4 +1,5 @@
 ;;; -*- lexical-binding: t -*-
+;; Copyright (C) 2015 Free Software Foundation, Inc.
 ;; This file was generated from `render.xml' by `el_client.el'.
 
 (require 'xcb-types)
diff --git 

[elpa] externals/dash cf70af3: Fix check_copyright; Silence compiler-warnings

2015-10-05 Thread Stefan Monnier
branch: externals/dash
commit cf70af31f3390e38b23f007394545fb99a6fa2de
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

Fix check_copyright; Silence compiler-warnings

* .gitignore: Add files generated by "make" in elpa.git.

* dash.el (--map-first, --map-last): Silence compile warning when
`rep' does not make use of `it'.
(---partition-all-in-steps-reversed): Remove unused var `len'.
(dash--table-carry): Fix docstring and use DeMorgan.
(-find-indices): Remove unused var `i'.
(-compare-fn): Move before first use.

* dev/examples-to-tests.el:
* dev/examples-to-info.el:
* dev/examples-to-docs.el:
* dev/examples.el: Add copyright boilerplate.
---
 .gitignore   |3 +++
 dash.el  |   31 ++-
 dev/examples-to-docs.el  |   27 ++-
 dev/examples-to-info.el  |   27 ++-
 dev/examples-to-tests.el |   26 +-
 dev/examples.el  |   23 ++-
 6 files changed, 116 insertions(+), 21 deletions(-)

diff --git a/.gitignore b/.gitignore
index 900d012..4ec8ea2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,4 @@
 /dash.elc
+/dash-functional.elc
+/dash-autoloads.el
+/dash-pkg.el
diff --git a/dash.el b/dash.el
index e0ba65d..76e66c4 100644
--- a/dash.el
+++ b/dash.el
@@ -347,7 +347,7 @@ See also: `-map-when', `-replace-first'"
 
 (defmacro --map-first (pred rep list)
   "Anaphoric form of `-map-first'."
-  `(-map-first (lambda (it) ,pred) (lambda (it) ,rep) ,list))
+  `(-map-first (lambda (it) ,pred) (lambda (it) (ignore it) ,rep) ,list))
 
 (defun -map-last (pred rep list)
   "Replace first item in LIST satisfying PRED with result of REP called on 
this item.
@@ -357,7 +357,7 @@ See also: `-map-when', `-replace-last'"
 
 (defmacro --map-last (pred rep list)
   "Anaphoric form of `-map-last'."
-  `(-map-last (lambda (it) ,pred) (lambda (it) ,rep) ,list))
+  `(-map-last (lambda (it) ,pred) (lambda (it) (ignore it) ,rep) ,list))
 
 (defun -replace (old new list)
   "Replace all OLD items in LIST with NEW.
@@ -828,8 +828,7 @@ This function can be thought of as a generalization of
   "Private: Used by -partition-all-in-steps and -partition-in-steps."
   (when (< step 1)
 (error "Step must be a positive number, or you're looking at some juicy 
infinite loops."))
-  (let ((result nil)
-(len 0))
+  (let ((result nil))
 (while list
   (!cons (-take n list) result)
   (setq list (-drop step list)))
@@ -1054,11 +1053,9 @@ element of LIST paired with the unmodified element of 
LIST."
 (defun dash--table-carry (lists restore-lists  re)
   "Helper for `-table' and `-table-flat'.
 
-If a list overflows, carry to the right and reset the list.
-
-Return how many lists were re-seted."
-  (while (and (not (car lists))
-  (not (equal lists '(nil
+If a list overflows, carry to the right and reset the list."
+  (while (not (or (car lists)
+  (equal lists '(nil
 (setcar lists (car restore-lists))
 (pop (cadr lists))
 (!cdr lists)
@@ -1081,6 +1078,7 @@ order.  The dimension of the result is (length lists).
 See also: `-table-flat'"
   (let ((restore-lists (copy-sequence lists))
 (last-list (last lists))
+;; FIXME: Why not just use (make-list (length lists) nil)?
 (re (--map nil (number-sequence 1 (length lists)
 (while (car last-list)
   (let ((item (apply fn (-map 'car lists
@@ -1135,8 +1133,7 @@ element ELEM, in ascending order."
 (defun -find-indices (pred list)
   "Return the indices of all elements in LIST satisfying the
 predicate PRED, in ascending order."
-  (let ((i 0))
-(apply 'append (--map-indexed (when (funcall pred it) (list it-index)) 
list
+  (apply 'append (--map-indexed (when (funcall pred it) (list it-index)) 
list)))
 
 (defmacro --find-indices (form list)
   "Anaphoric version of `-find-indices'."
@@ -1767,6 +1764,12 @@ body."
(indent 1))
   `(--if-let ,val (progn ,@body)))
 
+(defvar -compare-fn nil
+  "Tests for equality use this function or `equal' if this is nil.
+It should only be set using dynamic scope with a let, like:
+
+  (let ((-compare-fn #'=)) (-union numbers1 numbers2 numbers3)")
+
 (defun -distinct (list)
   "Return a new list with all duplicates removed.
 The test for equality is done with `equal',
@@ -1810,12 +1813,6 @@ The test for equality is done with `equal',
 or with `-compare-fn' if that's non-nil."
   (--filter (not (-contains? list2 it)) list))
 
-(defvar -compare-fn nil
-  "Tests for equality use this function or `equal' if this is nil.
-It should only be set using dynamic scope with a let, like:
-
-  (let ((-compare-fn =)) (-union numbers1 numbers

[elpa] master 2baa926: * transcribe.el: Add `provide' statement

2015-11-29 Thread Stefan Monnier
branch: master
commit 2baa92672aa7f2c42a12d36f4184de1c5b3eb734
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* transcribe.el: Add `provide' statement
---
 packages/transcribe/transcribe.el |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/packages/transcribe/transcribe.el 
b/packages/transcribe/transcribe.el
index ff2f725..30d7d42 100644
--- a/packages/transcribe/transcribe.el
+++ b/packages/transcribe/transcribe.el
@@ -140,4 +140,6 @@
 (global-unset-key (kbd "C-x C-n"))
 (global-set-key (kbd "C-x C-n") 'NewEpisode)
 
+(provide 'transcribe)
+
 ;;; transcribe.el ends here



[elpa] master de8cb23: * transcribe.el: Fix up formatting and copyright

2015-11-29 Thread Stefan Monnier
branch: master
commit de8cb2370642a6fbee4de14a43b985bb9c07a51c
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* transcribe.el: Fix up formatting and copyright
---
 packages/transcribe/transcribe.el |   35 +--
 1 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/packages/transcribe/transcribe.el 
b/packages/transcribe/transcribe.el
index dd4a333..ff2f725 100644
--- a/packages/transcribe/transcribe.el
+++ b/packages/transcribe/transcribe.el
@@ -1,25 +1,24 @@
-;;;transcribe.el --- package for audio transcriptions
+;;; transcribe.el --- package for audio transcriptions
 
-;;Copyright 2014 David González Gándara
+;; Copyright 2014-2015  Free Software Foundation, Inc.
 
-;;Author: David Gonzalez Gandara <dggand...@member.fsf.org>
-;;version: 0.0.1
+;; Author: David Gonzalez Gandara <dggand...@member.fsf.org>
+;; Version: 0.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 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.
+;; 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/>.
+;; 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:
+;;; Commentary:
 
 ;; INSTALLATION
 ;;---
@@ -59,7 +58,7 @@
 ;;  -> Break tag. This command "breaks" a tag in two, that is 
it inserts an ending tag and then a starting tag. Edit the function to suit 
your needs. It is useful if you are segmenting discourse into tags and then you 
decide the segmentation was not correct.
 ;;  -> Insert atributes. This function insert custom xml 
attributes. Edit the function to suit you needs.
 
-;;;Code:
+;;; Code:
 
 (require 'emms-setup)
 ;(require 'emms-player-mpd)
@@ -141,4 +140,4 @@
 (global-unset-key (kbd "C-x C-n"))
 (global-set-key (kbd "C-x C-n") 'NewEpisode)
 
-;;;transcribe.el ends here
\ No newline at end of file
+;;; transcribe.el ends here



[elpa] master 5d79ce4: * sm-c-mode: Improve indentation of struct; plus bug fixes

2015-11-24 Thread Stefan Monnier
branch: master
commit 5d79ce42f323cd10aed073aac50104a2d7920ec3
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* sm-c-mode: Improve indentation of struct; plus bug fixes

* packages/sm-c-mode/GNUmakefile: New file.

* packages/sm-c-mode/sm-c-mode-test.c: Add some "struct" tests.
Plus a #include.

* packages/sm-c-mode/sm-c-mode.el (sm-c-syntax-propertize): Mark the <...>
of #include as a string.
(sm-c-smie--*-token): Try not to look too far back.
(sm-c-smie-rules): Indent the {...} of struct and enum definitions.
(sm-c--bs-realign-1): Fix behavior at EOB.
(sm-c--cpp-is-not-really-a-comment): New function.
(comment-only-p): Use it.
---
 packages/sm-c-mode/GNUmakefile  |   21 +++
 packages/sm-c-mode/sm-c-mode-test.c |   16 -
 packages/sm-c-mode/sm-c-mode.el |   63 --
 3 files changed, 88 insertions(+), 12 deletions(-)

diff --git a/packages/sm-c-mode/GNUmakefile b/packages/sm-c-mode/GNUmakefile
new file mode 100644
index 000..2c6da32
--- /dev/null
+++ b/packages/sm-c-mode/GNUmakefile
@@ -0,0 +1,21 @@
+
+EMACS=emacs
+DIFF=diff
+
+test: sm-c-mode-test.c.test
+
+.PHONY: refresh
+refresh:
+
+%.elc : %.el
+   $(EMACS) --batch -L . --no-init-file -f batch-byte-compile $<
+
+%.test: % sm-c-mode.elc refresh
+   $(EMACS) --batch -l sm-c-mode-autoloads.el   \
+   sm-c-mode-test.c \
+   --eval '(setq indent-tabs-mode nil)' \
+   --eval '(setq create-lockfiles nil)' \
+   --eval '(indent-region (point-min) (point-max) nil)' \
+   --eval '(indent-region (point-min) (point-max) nil)' \
+   --eval '(write-region (point-min) (point-max) "$@")'
+   $(DIFF) $< $@ || true; $(RM) $@
diff --git a/packages/sm-c-mode/sm-c-mode-test.c 
b/packages/sm-c-mode/sm-c-mode-test.c
index 94cf476..4690105 100644
--- a/packages/sm-c-mode/sm-c-mode-test.c
+++ b/packages/sm-c-mode/sm-c-mode-test.c
@@ -1,5 +1,7 @@
 /* -*- sm-c -*- */
 
+#include 
+
 #define toto(arg) /* bla
  bla */ \
   if (a) {  /* toto
@@ -11,7 +13,19 @@
 #define test(arg) \
   (hello + arg)
 
-struct foo;
+struct foo
+  {
+int field;
+  };
+
+struct foo {
+  int field;
+};
+
+struct foo *getfoo (void)
+{
+  return NULL;
+}
 
 #define titi(arg) { \
 if (a) {\
diff --git a/packages/sm-c-mode/sm-c-mode.el b/packages/sm-c-mode/sm-c-mode.el
index 7616616..1ac263e 100644
--- a/packages/sm-c-mode/sm-c-mode.el
+++ b/packages/sm-c-mode/sm-c-mode.el
@@ -35,9 +35,8 @@
 ;; it'd be nice to hook the sm-c--while-to-do, sm-c--else-to-if, and sm-c--boi
 ;; functions into SMIE at some level.
 
-;; FIXME:
-;; - M-; mistakes # for a comment in CPP directives!
-;; Ha!  As if this was the only/main problem!
+;; Note that this mode makes no attempt to try and handle sanely K style
+;; function definitions.
 
 ;;; Code:
 
@@ -233,7 +232,15 @@ Typically 2 for GNU style and `tab-width' for Linux style."
   (sm-c--cpp-syntax-propertize end)
   (funcall
(syntax-propertize-rules
-(sm-c--cpp-regexp (2 (prog1 "< c" (sm-c--cpp-syntax-propertize end)
+(sm-c--cpp-regexp
+ (2 (prog1 "< c"
+  (when (and (equal (match-string 3) "include")
+ (looking-at "[ \t]*\\(<\\)[^>\n]*\\(>\\)"))
+(put-text-property (match-beginning 1) (match-end 1)
+   'syntax-table (string-to-syntax "|"))
+(put-text-property (match-beginning 2) (match-end 2)
+   'syntax-table (string-to-syntax "|")))
+  (sm-c--cpp-syntax-propertize end)
(point) end))
 
 (defun sm-c-syntactic-face-function (ppss)
@@ -495,9 +502,19 @@ if INNER is non-nil, it stops at the innermost one."
 ((or "(" "[" "{" "}") "* deref")
 (`nil
  (goto-char pos)
- (pcase (smie-backward-sexp "* mult")
-   (`(,_ ,_ ,(or ";" "{")) "* deref")
-   (_ "* mult")))
+ (let ((res nil))
+   (while (not res)
+ (pcase (smie-backward-sexp)
+   (`(,_ ,_ ,(or ";" "{")) (setq res "* deref"))
+   ((and `nil (guard (looking-at "{"))) (setq res "* deref"))
+   (`(,left ,_ ,op)
+(if (and (numberp left)
+ (numberp (nth 2 (assoc op smie-grammar)))
+ (< (nth 2 (assoc op smie-grammar))
+(nth 1 (assoc "* mult" smie-grammar
+(smie-backward-sexp 'halfsexp)
+  (setq res "* mult")
+ 

[elpa] master 7e76d09: * sm-c-mode.el: Improve "Commentary:" and docstrings

2015-11-25 Thread Stefan Monnier
branch: master
commit 7e76d0968317ff83b6310e9fed4d10de0fd05403
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* sm-c-mode.el: Improve "Commentary:" and docstrings

* sm-c-mode.el: Improve "Commentary:" and docstrings.
(sm-c-smie--*-token): Fix inf-loop at BOB.

* GNUmakefile (%.reindent): New rule.
(HIJACK): New var.
(%.test): Use $<.
---
 packages/sm-c-mode/GNUmakefile  |9 +-
 packages/sm-c-mode/sm-c-mode.el |   60 +-
 2 files changed, 60 insertions(+), 9 deletions(-)

diff --git a/packages/sm-c-mode/GNUmakefile b/packages/sm-c-mode/GNUmakefile
index 2c6da32..c9d648a 100644
--- a/packages/sm-c-mode/GNUmakefile
+++ b/packages/sm-c-mode/GNUmakefile
@@ -1,6 +1,7 @@
 
 EMACS=emacs
 DIFF=diff
+HIJACK=--eval "(defalias 'c-mode 'sm-c-mode)"
 
 test: sm-c-mode-test.c.test
 
@@ -12,10 +13,16 @@ refresh:
 
 %.test: % sm-c-mode.elc refresh
$(EMACS) --batch -l sm-c-mode-autoloads.el   \
-   sm-c-mode-test.c \
+   $<   \
--eval '(setq indent-tabs-mode nil)' \
--eval '(setq create-lockfiles nil)' \
--eval '(indent-region (point-min) (point-max) nil)' \
--eval '(indent-region (point-min) (point-max) nil)' \
--eval '(write-region (point-min) (point-max) "$@")'
$(DIFF) $< $@ || true; $(RM) $@
+
+%.reindent: % sm-c-mode.elc refresh
+   $(EMACS) --batch -l sm-c-mode-autoloads.el $(HIJACK) \
+   $<   \
+   --eval '(indent-region (point-min) (point-max) nil)' \
+   --eval '(save-buffer)'
diff --git a/packages/sm-c-mode/sm-c-mode.el b/packages/sm-c-mode/sm-c-mode.el
index 1ac263e..72cd75e 100644
--- a/packages/sm-c-mode/sm-c-mode.el
+++ b/packages/sm-c-mode/sm-c-mode.el
@@ -29,15 +29,53 @@
 ;; might even do it OK for simple cases, but it really doesn't benefit much
 ;; from SMIE:
 ;; - it does a lot of its own parsing by hand.
-;; - its smie-ruled-function also does a lot of indentation by hand.
+;; - its smie-rules-function also does a lot of indentation by hand.
 ;; Hopefully at some point, someone will find a way to extend SMIE such that
 ;; it can handle C without having to constantly work around SMIE, e.g.
-;; it'd be nice to hook the sm-c--while-to-do, sm-c--else-to-if, and sm-c--boi
-;; functions into SMIE at some level.
+;; it'd be nice to hook sm-c--while-to-do, sm-c--else-to-if, sm-c--boi,
+;; sm-c--boe, ... into SMIE at some level.
 
 ;; Note that this mode makes no attempt to try and handle sanely K style
 ;; function definitions.
 
+ Benchmarks
+
+;; This code can't be compared to CC-mode since its scope is much more limited
+;; (only tries to handle the kind of code found in Emacs's source code, for
+;; example; does not intend to be extensible to handle C++ or ObjC; does not
+;; offer the same kind of customizability of indentation style, ...).
+;; But in order to make sure it's doing a good enough job on the code for which
+;; it was tuned, I did run some quick benchmarks against CC-mode:
+;;
+;; Benchmarks: reindent emacs/src/*.[ch] (skipping macuvs.h and globals.h
+;; because CC-mode gets pathologically slow on them).
+;;(cd src/emacs/work/; git reset --hard; mv src/macuvs.h src/globals.h ./);
+;;files=($(echo ~/src/emacs/work/src/*.[ch]));
+;;(cd src/emacs/work/; mv macuvs.h globals.h src/);
+;;time make -j4 ${^${files}}.reindent EMACS="emacs24 -Q";
+;;(cd src/emacs/work/; git diff|wc)
+;; - Default settings:
+;;   diff|wc =>  86800  379362 2879534
+;;   make -j4  191.57s user 1.77s system 334% cpu   57.78 total
+;; - With (setq sm-c-indent-cpp-basic 0)
+;;   diff|wc =>  59909  275415 2034045
+;;   make -j4  177.88s user 1.70s system 340% cpu   52.80 total
+;; - For reference, CC-mode gets:
+;;   diff|wc =>  79164  490894 3428542
+;;   make -j4  804.83s user 2.79s system 277% cpu 4:51.08 total
+;;
+;; Again: take this with a large grain of salt, since this is testing sm-c-mode
+;; in the most favorable light (IOW it's a very strongly biased benchmark).
+;; All this says, is that sm-c-mode's indentation might actually be usable if
+;; you use it on C code that is sufficiently similar to Emacs's.
+
+ FIXME:
+
+;; - We "use but don't use" SMIE.
+;; - CPP directives are treated as comments.  To some extent this is OK, but in
+;;   many other cases it isn't.  See for instance the comment-only-p advice.
+;; - M-q in a comment doesn't do the right thing.
+
 ;;; Code:
 
 (require 'cl-lib)
@@ -53,7 +91,10 @@ Typically 2 for GNU style and `tab-width' for Linux style."
   :type 'integer)
 
 (defcustom sm-c-indent-braces t
-  "If non-nil, braces in if/while/... are 

[elpa] master 22549ec: * transcribe/transcribe.el: Allow compilation without emms

2015-11-29 Thread Stefan Monnier
branch: master
commit 22549ecaa0cc5cc485b325ca95673dcf6cd402fc
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* transcribe/transcribe.el: Allow compilation without emms
---
 packages/transcribe/transcribe.el |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/packages/transcribe/transcribe.el 
b/packages/transcribe/transcribe.el
index 30d7d42..4ab00a3 100644
--- a/packages/transcribe/transcribe.el
+++ b/packages/transcribe/transcribe.el
@@ -60,19 +60,20 @@
 
 ;;; Code:
 
-(require 'emms-setup)
+(if t (require 'emms-setup));Only require it at run-time.
 ;(require 'emms-player-mpd)
 ;(setq emms-player-mpd-server-name "localhost")
 ;(setq emms-player-mpd-server-port "6600")
 
 (emms-standard)
 (emms-default-players)
-(require 'emms-player-mpg321-remote)
+(if t (require 'emms-player-mpg321-remote))
+(defvar emms-player-list)
 (push 'emms-player-mpg321-remote emms-player-list)
 
-(require 'emms-mode-line)
+(if t (require 'emms-mode-line))
 (emms-mode-line 1)
-(require 'emms-playing-time)
+(if t (require 'emms-playing-time))
 (emms-playing-time 1)
 
 (global-set-key (kbd "C-x C-p") 'emms-play-file)



[elpa] master 1f4cdd7: * packages/sm-c-mode: Add imenu/which-func/add-log support

2015-11-30 Thread Stefan Monnier
branch: master
commit 1f4cdd74ca21559bb318a262e11ba98d9f7822bc
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* packages/sm-c-mode: Add imenu/which-func/add-log support

(sm-c--comment-regexp): New var.
(sm-c--defun-regexp): New var, extracted from sm-c-font-lock-keywords.
Also recognize macro definitions.
(sm-c-font-lock-keywords): Use it.
(sm-c--def-regexp): New var.
(sm-c-mode): Use it for add-log and imenu.
---
 packages/sm-c-mode/sm-c-mode-test.c |4 +++
 packages/sm-c-mode/sm-c-mode.el |   45 ---
 2 files changed, 35 insertions(+), 14 deletions(-)

diff --git a/packages/sm-c-mode/sm-c-mode-test.c 
b/packages/sm-c-mode/sm-c-mode-test.c
index 4690105..4756064 100644
--- a/packages/sm-c-mode/sm-c-mode-test.c
+++ b/packages/sm-c-mode/sm-c-mode-test.c
@@ -22,6 +22,10 @@ struct foo {
   int field;
 };
 
+typedef struct bar {
+  int field;
+} *BarPtr;
+
 struct foo *getfoo (void)
 {
   return NULL;
diff --git a/packages/sm-c-mode/sm-c-mode.el b/packages/sm-c-mode/sm-c-mode.el
index 72cd75e..a643829 100644
--- a/packages/sm-c-mode/sm-c-mode.el
+++ b/packages/sm-c-mode/sm-c-mode.el
@@ -801,6 +801,27 @@ if INNER is non-nil, it stops at the innermost one."
 
 ;;; Font-lock support
 
+(defconst sm-c--comment-regexp
+  "/\\(?:/.*\n\\|\\*\\(?:[^*]+\\(?:\\*+[^/*]\\)*\\)*\\*/\\)")
+
+(defconst sm-c--defun-regexp
+  (let* ((spc0 (concat "\\(?:\n?[ \t]\\|" sm-c--comment-regexp "\\)*"))
+ (spc1 (concat "\n?[ \t]" spc0))
+ (id "\\(?:\\sw\\|\\s_\\)+"))
+(cl-flet ((repeat (repetition  res)
+  (concat "\\(?:" (apply #'concat res) "\\)"
+  (pcase repetition
+((pred symbolp) (symbol-name repetition))
+(1 "")
+  (concat
+   "^\\(?:"
+   (repeat '* "\\*" spc0)
+   (repeat '* id (repeat 1 spc1 "\\|" spc0 "\\*" spc0))
+   "\\(" id "\\)[ \t\n]*("
+   "\\|"
+   "[ \t]*#[ \t]*define[ \t]+\\(?1:" id "\\)("
+   "\\)"
+
 (defconst sm-c-font-lock-keywords
   `((,sm-c--cpp-regexp (1 font-lock-preprocessor-face))
 ("\\_<\\(?:true\\|false\\)\\_>" (0 font-lock-constant-face))
@@ -828,25 +849,19 @@ if INNER is non-nil, it stops at the innermost one."
  (delete "case" kws)))
 "\\_>"))
  (0 font-lock-keyword-face))
-(,(let* ((spc0 "\\(?:\n?[ \t]\\|/\\*.*?\\*/\\)*")
- (spc1 (concat "\n?[ \t]" spc0))
- (id "\\(?:\\sw\\|\\s_\\)+"))
-(cl-flet ((repeat (repetition  res)
-  (concat "\\(?:" (apply #'concat res) "\\)"
-  (pcase repetition
-((pred symbolp) (symbol-name repetition))
-(1 "")
-  (concat
-   "^"
-   (repeat '* "\\*" spc0)
-   (repeat '* id (repeat 1 spc1 "\\|" spc0 "\\*" spc0))
-   "\\(" id "\\)[ \t\n]*(")))
+(,sm-c--defun-regexp
  (1
   (prog1 font-lock-function-name-face
 (if (< (match-beginning 0) (line-beginning-position))
 (put-text-property (match-beginning 0) (match-end 0)
'font-lock-multiline t)))
 
+(defconst sm-c--def-regexp
+  (let ((spc0 (concat "\\(?:[ \t\n]\\|" sm-c--comment-regexp "\\)*"))
+(id "\\(?:\\sw\\|\\s_\\)+"))
+(concat sm-c--defun-regexp
+"\\|"
+"\\_<\\(?1:\\(?:struct\\|enum\\)[ \t]+" id "\\)" spc0 "{")))
 
 ;;;###autoload
 (define-derived-mode sm-c-mode prog-mode "smC"
@@ -872,7 +887,9 @@ if INNER is non-nil, it stops at the innermost one."
   (setq-local smie--hanging-eolp-function #'sm-c-smie-hanging-eolp)
   ;; Backslash auto-realign.
   (add-hook 'after-change-functions #'sm-c--bs-after-change nil t)
-  (add-hook 'post-command-hook #'sm-c--bs-realign nil t))
+  (add-hook 'post-command-hook #'sm-c--bs-realign nil t)
+  (setq-local add-log-current-defun-header-regexp sm-c--def-regexp)
+  (setq-local imenu-generic-expression `((nil ,sm-c--def-regexp 1
 
 (defun sm-c--cpp-is-not-really-a-comment ( args)
   ;; Without this, placing the region around a CPP directive and hitting



[elpa] master b84acaf: * packages/seq: Don't define it as a :core package

2015-11-30 Thread Stefan Monnier
branch: master
commit b84acafb79dfd74b42addaf6e43e11ded907aa9d
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* packages/seq: Don't define it as a :core package

Revert the removal of packages/seq/seq.el since it's different from
the one in lisp/emacs-lisp.
* .gitignore: Remove packages/seq.
* externals-list: Remove "seq" entry.
---
 .gitignore  |1 -
 externals-list  |1 -
 packages/seq/seq.el |  483 +++
 packages/seq/tests/seq-tests.el |  326 ++
 4 files changed, 809 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 4c17086..238f211 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,7 +20,6 @@ packages/omn-mode/
 packages/pabbrev
 packages/python
 packages/rudel
-packages/seq
 packages/soap-client
 packages/w3
 packages/xelb
diff --git a/externals-list b/externals-list
index 446ed58..94151e4 100644
--- a/externals-list
+++ b/externals-list
@@ -68,7 +68,6 @@
  ;;FIXME:("org":external ??) ;; Need to introduce snapshots!!
  ("rich-minority" :subtree "https://github.com/Malabarba/rich-minority;)
  ("rudel"  :external nil) ;; Was 
bzr::bzr://rudel.bzr.sourceforge.net/bzrroot/rudel/trunk
- ("seq":core "lisp/emacs-lisp/seq.el")
  ("soap-client":core ("lisp/net/soap-client.el" 
"lisp/net/soap-inspect.el"))
  ("sotlisp" :subtree "https://github.com/Malabarba/speed-of-thought-lisp;)
  ("spinner" :subtree "https://github.com/Malabarba/spinner.el;)
diff --git a/packages/seq/seq.el b/packages/seq/seq.el
new file mode 100644
index 000..58f6903
--- /dev/null
+++ b/packages/seq/seq.el
@@ -0,0 +1,483 @@
+;;; seq.el --- Sequence manipulation functions  -*- lexical-binding: t -*-
+
+;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
+
+;; Author: Nicolas Petton <nico...@petton.fr>
+;; Keywords: sequences
+;; Version: 1.11
+;; Package: seq
+
+;; Maintainer: emacs-de...@gnu.org
+
+;; 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/>.
+
+;;; Commentary:
+
+;; Sequence-manipulation functions that complement basic functions
+;; provided by subr.el.
+;;
+;; All functions are prefixed with "seq-".
+;;
+;; All provided functions work on lists, strings and vectors.
+;;
+;; Functions taking a predicate or iterating over a sequence using a
+;; function as argument take the function as their first argument and
+;; the sequence as their second argument.  All other functions take
+;; the sequence as their first argument.
+;;
+;; All functions are tested in test/automated/seq-tests.el
+
+;;; Code:
+
+(defmacro seq-doseq (spec  body)
+  "Loop over a sequence.
+Similar to `dolist' but can be applied to lists, strings, and vectors.
+
+Evaluate BODY with VAR bound to each element of SEQ, in turn.
+
+\(fn (VAR SEQ) BODY...)"
+  (declare (indent 1) (debug ((symbolp form  form) body)))
+  (let ((length (make-symbol "length"))
+(seq (make-symbol "seq"))
+(index (make-symbol "index")))
+`(let* ((,seq ,(cadr spec))
+(,length (if (listp ,seq) nil (seq-length ,seq)))
+(,index (if ,length 0 ,seq)))
+   (while (if ,length
+  (< ,index ,length)
+(consp ,index))
+ (let ((,(car spec) (if ,length
+(prog1 (seq-elt ,seq ,index)
+  (setq ,index (+ ,index 1)))
+  (pop ,index
+   ,@body)
+
+(if (fboundp 'pcase-defmacro)
+;; Implementation of `seq-let' based on a `pcase'
+;; pattern. Requires Emacs>=25.1.
+(progn
+  (pcase-defmacro seq ( args)
+"pcase pattern matching sequence elements.
+Matches if the object is a sequence (list, string or vector), and
+binds each element of ARGS to the corresponding element of the
+sequence."
+`(and (pred seq-p)
+  ,@(seq--make-pcase-bindings args)))
+
+  (defmacro seq-let (args seq  body)
+"Bind the variables in ARGS to the elements of SEQ t

Re: [elpa] master baa81b1: * externals-list: Add seq and python as :core packages

2015-11-30 Thread Stefan Monnier
> Not sure if this is a good idea. The seq package on emacs core depends on
> 25.1, while the package on Elpa was 24 compatible.
> In fact, nico has been developing them in parallel IIRC.

Hmmm...oops!  didn't notice that the two versions had forked.
I just re-installed it, thanks for the heads up,


Stefan



[elpa] master 07c53b5: * admin/archive-contents.el (archive--sync-emacs-repo): Fix thinko.

2015-11-30 Thread Stefan Monnier
branch: master
commit 07c53b50741b6684d3d3ef5177a92861fbaec14c
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* admin/archive-contents.el (archive--sync-emacs-repo): Fix thinko.
---
 admin/archive-contents.el |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index ae46435..b63f4cd 100755
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -572,7 +572,8 @@ Return non-nil if there's an \"emacs\" repository present."
   ;; has setup a clone of Emacs under the "emacs" subdirectory.
   (let ((emacs-repo-root (expand-file-name "emacs")))
 (if (not (file-directory-p emacs-repo-root))
-(message "No \"emacs\" subdir: will skip :core packages")
+(progn (message "No \"emacs\" subdir: will skip :core packages")
+   nil)
   (let ((default-directory emacs-repo-root))
 (message "Running git pull in %S" default-directory)
 (call-process "git" nil t nil "pull")



[elpa] master e565b52: * GNUmakefile (check_copyrights): Skip symlinks

2015-12-01 Thread Stefan Monnier
branch: master
commit e565b529faf932e1b772587bcf4e1a8e105eae9c
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* GNUmakefile (check_copyrights): Skip symlinks
---
 GNUmakefile |   28 ++--
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/GNUmakefile b/GNUmakefile
index 010d165..ad86a7f 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -13,20 +13,20 @@ CR_EXCEPTIONS=copyright_exceptions
 .PHONY: check_copyrights
 check_copyrights:
@echo "Compute exceptions >$(CR_EXCEPTIONS)~"
-   @export LC_ALL=C;   \
-   (cd packages && \
-   find . -name '.git' -prune -o   \
-  -name 'test' -prune -o   \
-  -name '*.el' -print0 |   \
-   xargs -0 grep -L 'Free Software Foundation, Inc' |  \
-   grep -v '\(\.dir-locals\|.-\(pkg\|autoloads\)\)\.el$$'; \
-   find . -name '.git' -prune -o -name '*.el' -print | \
-   while read f; do\
-   fquoted="$$(echo $$f|tr '|' '_')";  \
-   sed -n -e '/[Cc]opyright.*, *[1-9][-0-9]*,\?$$/N'   \
-   -e '/Free Software Foundation/d'\
-   -e "s|^\\(.*[Cc]opyright\\)|$$fquoted:\\1|p"\
-  "$$f";   \
+   @export LC_ALL=C;   \
+   (cd packages && \
+   find . -name '.git' -prune -o   \
+  -name 'test' -prune -o   \
+  -name '*.el' -print0 |   \
+   xargs -0 grep -L 'Free Software Foundation, Inc' |  \
+   grep -v '\(\.dir-locals\|.-\(pkg\|autoloads\)\)\.el$$'; \
+   find . -name '.git' -prune -o -name '*.el' -type f -print | \
+   while read f; do\
+   fquoted="$$(echo $$f|tr '|' '_')";  \
+   sed -n -e '/[Cc]opyright.*, *[1-9][-0-9]*,\?$$/N'   \
+   -e '/Free Software Foundation/d'\
+   -e "s|^\\(.*[Cc]opyright\\)|$$fquoted:\\1|p"\
+  "$$f";   \
done) | sort >$(CR_EXCEPTIONS)~
diff -u "$(CR_EXCEPTIONS)" "$(CR_EXCEPTIONS)~"
 



[elpa] master d16cc52: * sm-c-mode.el: Auto-align backslashes. Improve indent rules

2015-11-24 Thread Stefan Monnier
branch: master
commit d16cc527fbdab0e42642db827f12984be916dba2
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* sm-c-mode.el: Auto-align backslashes.  Improve indent rules

* sm-c-mode/sm-c-mode.el: Auto-align backslashes.  Improve indent rules.
(sm-c--cpp-indent-comment-inside): New function.
(sm-c--cpp-smie-indent-functions): Use it.
(sm-c--cpp-smie-indent): Handle indentation within comments-within-cpp.
(sm-c-smie-grammar): Manually tweak precedence of ":label".
(sm-c-smie-operator-regexp): Parentheses aren't operators.
(sm-c--boi): Add `inner' arg.
(sm-c--boe): Complete the code.
(sm-c-smie--*-token): Refine.
(sm-c-smie-rules): Various tweaks based on tests on src/eval.c and
src/xdisp.c.
(sm-c--bs-changed): New var.
(sm-c--bs-after-change, sm-c--bs-realign, sm-c--bs-realign-1):
New functions.
(sm-c-mode): Use them.

* sm-c-mode/sm-c-mode-test.c: Add a few more cases.
---
 packages/sm-c-mode/sm-c-mode-test.c |   47 +-
 packages/sm-c-mode/sm-c-mode.el |  307 +--
 2 files changed, 259 insertions(+), 95 deletions(-)

diff --git a/packages/sm-c-mode/sm-c-mode-test.c 
b/packages/sm-c-mode/sm-c-mode-test.c
index 3a1f1b6..94cf476 100644
--- a/packages/sm-c-mode/sm-c-mode-test.c
+++ b/packages/sm-c-mode/sm-c-mode-test.c
@@ -1,12 +1,29 @@
 /* -*- sm-c -*- */
 
-#define toto /* bla
-bla */ \
- if (a) { \
-   f \
- }
+#define toto(arg) /* bla
+ bla */ \
+  if (a) {  /* toto
+ * titi
+ */\
+fs((arg) + 2); \
+  }
+
+#define test(arg) \
+  (hello + arg)
+
+struct foo;
+
+#define titi(arg) { \
+if (a) {\
+  f(arg + 1)\
+}   \
+  }
 
 DEFUN ()
+  ()
+{
+  return Qnil;
+}
 
 int main (void)
 {
@@ -24,10 +41,22 @@ int main (void)
 printf ("wow\n");
   else
 if (c)
-  printf ("weee\n");
+  printf
+("weee\n");
 else
   printf ("wop\n");
-
+
+  if (a)
+if (b) {
+  c;
+}
+
+  *a = b;
+
+  if (pITORIG != pITCOPY)
+*(pITORIG)
+  = *(pITCOPY);
+
   switch (a)
 {
 case 1:
@@ -42,8 +71,8 @@ int main (void)
 }
 }
 
-static struct myownspecialstruct
-  *testfunction
+static struct myownspecialstruct *
+testfunction
   (args)
 {
   return NULL;
diff --git a/packages/sm-c-mode/sm-c-mode.el b/packages/sm-c-mode/sm-c-mode.el
index 3771169..7616616 100644
--- a/packages/sm-c-mode/sm-c-mode.el
+++ b/packages/sm-c-mode/sm-c-mode.el
@@ -163,8 +163,19 @@ Typically 2 for GNU style and `tab-width' for Linux style."
 
 (defconst sm-c--cpp-smie-indent-functions
   ;; FIXME: Don't just align line after #define with the "d"!
-  (remq #'smie-indent-comment-inside
-(default-value 'smie-indent-functions)))
+  (mapcar
+   (lambda (f)
+ (cond
+  ((eq f #'smie-indent-comment-inside) #'sm-c--cpp-indent-comment-inside)
+  ;; ((eq f #'smie-indent-exps) #'sm-c--cpp-indent-exps)
+  (t f)))
+   (default-value 'smie-indent-functions)))
+
+(defun sm-c--cpp-indent-comment-inside ()
+  (let ((ppss (syntax-ppss)))
+(when (nth 4 ppss)
+  ;; Indicate where's the comment start.
+  `(noindent . ,(nth 8 ppss)
 
 (defun sm-c--cpp-smie-indent ()
   (let ((ppss (syntax-ppss)))
@@ -172,15 +183,36 @@ Typically 2 for GNU style and `tab-width' for Linux 
style."
  ((sm-c--cpp-inside-p ppss)
   (save-restriction
 (narrow-to-region (nth 8 ppss) (point-max))
-(let ((smie-indent-functions sm-c--cpp-smie-indent-functions))
-  (smie-indent-calculate
+(let ((indent
+   (let ((smie-indent-functions sm-c--cpp-smie-indent-functions)
+ (syntax-ppss-cache nil)
+ (syntax-ppss-last nil)
+ (parse-sexp-lookup-properties nil))
+ (smie-indent-calculate
+  (if (not (eq 'noindent (car-safe indent)))
+  (if (integerp indent)
+  (max (funcall smie-rules-function :elem 'basic) indent)
+indent)
+;; We can't just return `noindent' if we're inside a comment,
+;; because the indent.el code would then be similarly confused,
+;; thinking the `noindent' is because we're inside the cpp
+;; pseudo-comment, and would hence align the code with the content
+;; of the psuedo-comment rather than the nested real comment!
+;;
+;; FIXME: Copy from indent--default-inside-comment.
+;; FIXME: This will always re-indent inside these comments, even
+;; during indent-region.
+(save-excursion
+  (forward-line -1)
+  (skip-chars-forward " \t")
+  (when (< (1- (point)) (cdr indent) (line-end-position))

[elpa] master ada17c9: * myers.el: New package

2016-06-10 Thread Stefan Monnier
branch: master
commit ada17c96448a2f35479bc5147df04a4d00301ad3
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* myers.el: New package
---
 packages/myers/myers.el |  196 +++
 1 file changed, 196 insertions(+)

diff --git a/packages/myers/myers.el b/packages/myers/myers.el
new file mode 100644
index 000..e52dd6a
--- /dev/null
+++ b/packages/myers/myers.el
@@ -0,0 +1,196 @@
+;;; myers.el --- Random-access singly-linked lists -*- lexical-binding: t; 
-*-
+
+;; Copyright (C) 2016  Free Software Foundation, Inc.
+
+;; Author: Stefan Monnier <monn...@iro.umontreal.ca>
+;; Keywords: list, containers
+;; Package-Requires: ((emacs "25"))
+;; 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 package implements Eugene W. Myers's "stacks" which are like
+;; standard singly-linked lists, except that they also provide efficient
+;; lookup.  More specifically:
+;;
+;; cons/car/cdr are O(1), while (nthcdr N L) is O(min (N, log L))
+;;
+;; For details, see "An applicative random-access stack", Eugene W. Myers,
+;; 1983, Information Processing Letters
+;; 
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.188.9344=rep1=pdf
+
+;;; Code:
+
+(require 'cl-lib)
+(require 'seq)
+
+(cl-defstruct (myers
+   (:copier nil)
+   (:constructor nil)
+   (:conc-name myers--)
+   (:constructor myers--cons (car cdr skip-distance skip)))
+  (car nil :read-only t)
+  (cdr nil :read-only t :type (or null myers))
+  ;; Contrary to Myers's presentation, we index from the top of the stack,
+  ;; and we don't store the total length but the "skip distance" instead.
+  ;; This makes `cons' slightly faster, and better matches our use for
+  ;; debruijn environments.
+  (skip-distance nil :read-only t :type integer)
+  (skip nil :read-only t :type (or null myers)))
+
+(defun myers-cons (car cdr)
+  "Create a new Myers cons, give it CAR and CDR as components, and return it.
+This like `cons' but for Myers's lists."
+  (if (null cdr)
+  (myers--cons car cdr 1 cdr)
+(let ((s1 (myers--skip-distance cdr))
+  (cddr (myers--skip cdr)))
+  (if (null cddr)
+  (myers--cons car cdr 1 cdr)
+(let ((s2 (myers--skip-distance cddr))
+  (cdddr (myers--skip cddr)))
+  (if (<= s2 s1)
+  (myers--cons car cdr (+ 1 s1 s2) cdddr)
+(myers--cons car cdr 1 cdr)))
+
+(defun myers-list ( objects)
+  "Return a newly created list with specified arguments as elements."
+  (let ((list nil))
+(dolist (x (nreverse objects))
+  (setq list (myers-cons x list)))
+list))
+
+;; FIXME: Should myers-car/cdr just defer to myers--car/cdr, or should they
+;; reproduce car/cdr's behavior more faithfully and return nil when the arg
+;; is nil?
+(defalias 'myers-car #'myers--car)
+(defalias 'myers-cdr #'myers--cdr)
+
+(pcase-defmacro myers-cons (car cdr)
+  `(cl-struct myers (car ,car) (cdr ,cdr)))
+
+(defun myers-nthcdr (n list)
+  "Take `myers-cdr' N times on LIST, return the result."
+  (while (and (> n 0) list)
+(let ((s (myers--skip-distance list)))
+  (if (<= s n)
+  (setq n (- n s) list (myers--skip list))
+(setq n (- n 1) list (myers--cdr list)
+  list)
+
+;; This operation would be more efficient using Myers's choice of keeping
+;; the length (instead of the skip-distance) in each node.
+(cl-defmethod seq-length ((seq myers))
+  (let ((n 0))
+(while seq
+  (cl-incf n (myers--skip-distance seq))
+  (setq seq (myers--skip seq)))
+n))
+
+(cl-defmethod seq-elt ((seq myers) n)
+  (let ((l (myers-nthcdr n seq)))
+(when l (myers--car l
+
+
+(cl-defmethod seq-do (fun (seq myers))
+  (while seq
+(funcall fun (myers--car seq))
+(setq seq (myers--cdr seq
+
+(cl-defmethod seqp ((_seq myers)) t)
+
+(cl-defmethod seq-copy ((seq myers))
+  (let ((elts ()))
+(while seq
+  (push (myers--car seq) elts)
+  (setq seq (myers--cdr seq)))
+(dolist (elt elts)
+  (setq seq (myers-cons elt seq)))
+seq))
+
+(cl-defmethod seq-subseq ((seq myers) start  end)
+  (when (< start 0)
+(let ((nstart (+ (seq-length seq) start)))
+

[elpa] master 74aa97f: * packages/yasnippet: Fix some compilation warnings

2016-06-22 Thread Stefan Monnier
branch: master
commit 74aa97f31a5bc11009ce5bfddfd9fcbde1bbc89b
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* packages/yasnippet: Fix some compilation warnings

* packages/yasnippet/yasnippet-tests.el (complicated-yas-key-syntaxes):
Avoid looking-back.

* packages/yasnippet/yasnippet.el (yas--font-lock-keywords): Escape $, even 
if
first in the regexp.
(yas--indent): Remove unused var `end'.
(yas--indent-parse-create): Remove unused arg `snippet'.  Update caller.
---
 packages/yasnippet/yasnippet-tests.el |2 +-
 packages/yasnippet/yasnippet.el   |   23 +++
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/packages/yasnippet/yasnippet-tests.el 
b/packages/yasnippet/yasnippet-tests.el
index 9d2074a..47b6e1f 100644
--- a/packages/yasnippet/yasnippet-tests.el
+++ b/packages/yasnippet/yasnippet-tests.el
@@ -484,7 +484,7 @@ TODO: correct this bug!"
(yas-should-expand '(("foo-barbaz" . "OKfoo-barbazOK"
  (let ((yas-key-syntaxes
 (cons #'(lambda (_start-point)
-  (unless (looking-back "-")
+  (unless (eq ?- (char-before))
 (backward-char)
 'again))
   yas-key-syntaxes))
diff --git a/packages/yasnippet/yasnippet.el b/packages/yasnippet/yasnippet.el
index 8a4ef1d..ed52907 100644
--- a/packages/yasnippet/yasnippet.el
+++ b/packages/yasnippet/yasnippet.el
@@ -896,10 +896,10 @@ Honour `yas-dont-activate-functions', which see."
 ;; They're "compiled", so extract the source.
 (cadr font-lock-keywords)
   font-lock-keywords))
-  '(("$\\([0-9]+\\)"
+  '(("\\$\\([0-9]+\\)"
  (0 font-lock-keyword-face)
  (1 font-lock-string-face t))
-("${\\([0-9]+\\):?"
+("\\${\\([0-9]+\\):?"
  (0 font-lock-keyword-face)
  (1 font-lock-warning-face t))
 ("\\(\\$(\\)" 1 font-lock-preprocessor-face)
@@ -3860,7 +3860,7 @@ Meant to be called in a narrowed buffer, does various 
passes"
 (yas--protect-escapes)
 ;; Parse indent markers: `$>'.
 (goto-char parse-start)
-(yas--indent-parse-create snippet)
+(yas--indent-parse-create)
 ;; parse fields with {}
 ;;
 (goto-char parse-start)
@@ -3966,12 +3966,11 @@ The SNIPPET's markers are preserved."
(zerop (current-column)))
  (indent-to-column yas--indent-original-column)))
   ((eq yas-indent-line 'auto)
-   (let ((end (set-marker (make-marker) (point-max
- (unless yas-also-auto-indent-first-line
-   (forward-line 1))
- (yas--indent-region (line-beginning-position)
- (point-max)
- snippet))
+   (unless yas-also-auto-indent-first-line
+ (forward-line 1))
+   (yas--indent-region (line-beginning-position)
+   (point-max)
+   snippet)
 
 (defun yas--collect-snippet-markers (snippet)
   "Make a list of all the markers used by SNIPPET."
@@ -4064,8 +4063,8 @@ with their evaluated value into 
`yas--backquote-markers-and-strings'."
 (set-marker-insertion-type marker nil)
 marker))
 
-(defun yas--indent-parse-create (snippet)
-  "Parse the \"$>\" indentation markers in SNIPPET."
+(defun yas--indent-parse-create ()
+  "Parse the \"$>\" indentation markers just inserted."
   (setq yas--indent-markers ())
   (while (search-forward "$>" nil t)
 (delete-region (match-beginning 0) (match-end 0))
@@ -4523,7 +4522,7 @@ and return the directory.  Return nil if not found."
  yas-after-exit-snippet-hook
  yas-before-expand-snippet-hook
  yas-buffer-local-condition
- yas-dont-activate
+ yas-dont-activate-functions
 
  ;; prompting functions
  ;;



[elpa] master 1f870ab 18/23: Align event-handler-attribute checking with spec

2016-01-14 Thread Stefan Monnier
branch: master
commit 1f870abb962f285cc12a4da04ae5ab63974538f1
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Align event-handler-attribute checking with spec

Fixes https://bugzilla.validator.nu/show_bug.cgi?id=1026
---
 core-scripting.rnc |   36 +---
 embed.rnc  |   25 +++--
 meta.rnc   |1 -
 3 files changed, 44 insertions(+), 18 deletions(-)

diff --git a/core-scripting.rnc b/core-scripting.rnc
index 0569d0e..534e4ca 100644
--- a/core-scripting.rnc
+++ b/core-scripting.rnc
@@ -115,17 +115,22 @@ datatypes w = "http://whattf.org/datatype-draft;
 
common.attrs.scripting &=
(   scripting.attr.onabort?
+   &   scripting.attr.onautocomplete?
+   &   scripting.attr.onautocompleteerror?
&   scripting.attr.onblur?
+   &   scripting.attr.oncancel?
&   scripting.attr.oncanplay?
&   scripting.attr.oncanplaythrough?
&   scripting.attr.onchange?
&   scripting.attr.onclick?
&   scripting.attr.onclose?
+   &   scripting.attr.oncuechange?
&   scripting.attr.oncontextmenu?
&   scripting.attr.ondblclick?
&   scripting.attr.ondrag?
&   scripting.attr.ondragend?
&   scripting.attr.ondragenter?
+   &   scripting.attr.ondragexit?
&   scripting.attr.ondragleave?
&   scripting.attr.ondragover?
&   scripting.attr.ondragstart?
@@ -145,26 +150,31 @@ datatypes w = "http://whattf.org/datatype-draft;
&   scripting.attr.onloadedmetadata?
&   scripting.attr.onloadstart?
&   scripting.attr.onmousedown?
+   &   scripting.attr.onmouseenter?
+   &   scripting.attr.onmouseleave?
&   scripting.attr.onmousemove?
&   scripting.attr.onmouseout?
&   scripting.attr.onmouseover?
&   scripting.attr.onmouseup?
-   &   scripting.attr.onmousewheel?
+   &   scripting.attr.onwheel?
&   scripting.attr.onpause?
&   scripting.attr.onplay?
&   scripting.attr.onplaying?
&   scripting.attr.onprogress?
&   scripting.attr.onratechange?
&   scripting.attr.onreset?
+   &   scripting.attr.onresize?
&   scripting.attr.onscroll?
&   scripting.attr.onseeked?
&   scripting.attr.onseeking?
&   scripting.attr.onselect?
&   scripting.attr.onshow?
+   &   scripting.attr.onsort?
&   scripting.attr.onstalled?
&   scripting.attr.onsubmit?
&   scripting.attr.onsuspend?
&   scripting.attr.ontimeupdate?
+   &   scripting.attr.ontoggle?
&   scripting.attr.onvolumechange?
&   scripting.attr.onwaiting?
)
@@ -173,10 +183,16 @@ datatypes w = "http://whattf.org/datatype-draft;
 
scripting.attr.onabort =
attribute onabort { common.data.functionbody }
+   scripting.attr.onautocomplete =
+   attribute onautocomplete { common.data.functionbody }
+   scripting.attr.onautocompleteerror =
+   attribute onautocompleteerror { common.data.functionbody }
scripting.attr.onblur =
attribute onblur { common.data.functionbody }
scripting.attr.oncanplay =
attribute oncanplay { common.data.functionbody }
+   scripting.attr.oncancel =
+   attribute oncancel { common.data.functionbody }
scripting.attr.oncanplaythrough =
attribute oncanplaythrough { common.data.functionbody }
scripting.attr.onchange =
@@ -187,6 +203,8 @@ datatypes w = "http://whattf.org/datatype-draft;
attribute onclose { common.data.functionbody }
scripting.attr.oncontextmenu =
attribute oncontextmenu { common.data.functionbody }
+   scripting.attr.oncuechange =
+   attribute oncuechange { common.data.functionbody }
scripting.attr.ondblclick =
attribute ondblclick { common.data.functionbody }
scripting.attr.ondrag =
@@ -195,6 +213,8 @@ datatypes w = "http://whattf.org/datatype-draft;
attribute ondragend { common.data.functionbody }
scripting.attr.ondragenter =
attribute ondragenter { common.data.functionbody }
+   scripting.attr.ondragexit =
+   

[elpa] master 7635384 17/23: Align iframe[sandbox] checking with spec

2016-01-14 Thread Stefan Monnier
branch: master
commit 76353846aa84173b57107ef6d917aaaf7f3da344
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Align iframe[sandbox] checking with spec

Fixes https://github.com/validator/validator/issues/138
---
 common.rnc |4 ++
 embed.rnc  |  149 +--
 2 files changed, 7 insertions(+), 146 deletions(-)

diff --git a/common.rnc b/common.rnc
index 97c09de..3352fd8 100644
--- a/common.rnc
+++ b/common.rnc
@@ -394,6 +394,10 @@ common.attrs.other =
common.data.integrity =
w:integrity-metadata
 
+## List of sandbox keywords
+   common.data.sandbox-allow-list =
+   w:string "" | w:sandbox-allow-list
+
 ## Microdata Properties
   common.data.microdata-properties =
 list { w:microdata-property+ }
diff --git a/embed.rnc b/embed.rnc
index 1b20ba8..27b3ab6 100644
--- a/embed.rnc
+++ b/embed.rnc
@@ -465,152 +465,9 @@ namespace local = ""
w:string "seamless" | w:string ""
} & v5only
iframe.attrs.sandbox =
-   attribute sandbox
-   {   list 
-   {   ( w:string 
"allow-top-navigation" )?
-   ,   ( w:string "allow-same-origin" 
)?
-   ,   ( w:string "allow-forms" )?
-   ,   ( w:string "allow-scripts" )?
-   }
-   |   list 
-   {   ( w:string 
"allow-top-navigation" )?
-   ,   ( w:string "allow-same-origin" 
)?
-   ,   ( w:string "allow-scripts" )?
-   ,   ( w:string "allow-forms" )?
-   }
-   |   list 
-   {   ( w:string 
"allow-top-navigation" )?
-   ,   ( w:string "allow-forms" )?
-   ,   ( w:string "allow-same-origin" 
)?
-   ,   ( w:string "allow-scripts" )?
-   }
-   |   list 
-   {   ( w:string 
"allow-top-navigation" )?
-   ,   ( w:string "allow-forms" )?
-   ,   ( w:string "allow-scripts" )?
-   ,   ( w:string "allow-same-origin" 
)?
-   }
-   |   list 
-   {   ( w:string 
"allow-top-navigation" )?
-   ,   ( w:string "allow-scripts" )?
-   ,   ( w:string "allow-same-origin" 
)?
-   ,   ( w:string "allow-forms" )?
-   }
-   |   list 
-   {   ( w:string 
"allow-top-navigation" )?
-   ,   ( w:string "allow-scripts" )?
-   ,   ( w:string "allow-forms" )?
-   ,   ( w:string "allow-same-origin" 
)?
-   }
-   |   list 
-   {   ( w:string "allow-same-origin" 
)?
-   ,   ( w:string 
"allow-top-navigation" )?
-   ,   ( w:string "allow-forms" )?
-   ,   ( w:string "allow-scripts" )?
-   }
-   |   list 
-   {   ( w:string "allow-same-origin" 
)?
-   ,   ( w:string 
"allow-top-navigation" )?
-   ,   ( w:string "allow-scripts" )?
-   ,   ( w:string "allow-forms" )?
-   }
-   |   list 
-   {   ( w:string "allow-forms" )?
-   ,   ( w:string 
"allow-top-navigation" )?
-   ,   ( w:string "allow-same-origin" 
)?
-   ,   ( w:string "allow-scripts" )?
-   }
-   |   list 
-   {   ( w:string "allow-forms" )?
-   

[elpa] master updated (9ac55ab -> a426434)

2016-01-14 Thread Stefan Monnier
monnier pushed a change to branch master.

  from  9ac55ab   Consolidation in debbugs
   new  dcd917c   Consolidated all RelaxNG files into `/schema` dir.
   new  c531523   Added warning that assertions.sch isn't maintained
   new  9b44795   Exit the meta[name]-checking business.
   new  a9ca633   Make input[type]-specific error msgs more clear.
   new  2d5e35e   Report warning for inputmode (instead of error).
   new  e2f495e   Allow ruby  &  elements.
   new  242f515   Emit error for empty form-control `name` attr.
   new  8b4cba1   Corrected the content model for the ruby element.
   new  103dc56   (Re)corrected content model for the ruby element.
   new  76e0657   Allow ol>li[role=menuitem] & ol>li[role=tab].
   new  f1cac66   Refine some ARIA checking to sync w/ current spec
   new  1c11a56   Add the "integrity" attribute
   new  85521bf   Make "integrity" checking more helpful
   new  c3b8596   Sync up with latest ARIA-in-HTML spec changes
   new  67350aa   Allow ARIA role=switch
   new  44fe4a7   Allow "minlength"
   new  7635384   Align iframe[sandbox] checking with spec
   new  1f870ab   Align event-handler-attribute checking with spec
   new  ae3a23b   Allow the "nonce" attribute
   new  fec8cdf   Add CSP syntax checking for  & HTTP header
   new  6e7c7c3   Make minlength checking behave as expected
   new  07bcdb8   Add 'packages/html5-schema/' from commit 
'6e7c7c331e7f6692be6c7d39fb9485792f0d3513'
   new  a426434   * html5-schema: Add locating-rules.xml and setup nxml to 
use it


Summary of changes:
 packages/html5-schema/.htaccess|   10 +
 packages/html5-schema/LICENSE  |   23 +
 packages/html5-schema/applications.rnc |  405 
 packages/html5-schema/aria.rnc | 1251 
 packages/html5-schema/assertions.sch   | 1235 +++
 packages/html5-schema/block.rnc|  250 +
 packages/html5-schema/common.rnc   |  526 ++
 packages/html5-schema/core-scripting.rnc   |  386 
 packages/html5-schema/data.rnc |   94 ++
 packages/html5-schema/embed.rnc|  586 +++
 packages/html5-schema/form-datatypes.rnc   |   63 ++
 packages/html5-schema/html5-schema.el  |   67 ++
 packages/html5-schema/html5.rnc|   56 ++
 packages/html5-schema/html5exclusions.rnc  |   63 ++
 packages/html5-schema/locating-rules.xml   |9 +
 packages/html5-schema/media.rnc|  210 
 packages/html5-schema/meta.rnc |  424 
 packages/html5-schema/microdata.rnc|  101 ++
 packages/html5-schema/phrase.rnc   |  400 
 packages/html5-schema/rdfa.rnc |  285 ++
 packages/html5-schema/revision.rnc |   54 +
 packages/html5-schema/ruby.rnc |   81 ++
 packages/html5-schema/sectional.rnc|  172 
 packages/html5-schema/structural.rnc   |  135 +++
 packages/html5-schema/tables.rnc   |  244 +
 packages/html5-schema/web-components.rnc   |   43 +
 packages/html5-schema/web-forms-scripting.rnc  |   27 +
 packages/html5-schema/web-forms.rnc|  607 
 packages/html5-schema/web-forms2-scripting.rnc |9 +
 packages/html5-schema/web-forms2.rnc   |  789 +++
 packages/html5-schema/xhtml5.rnc   |   40 +
 31 files changed, 8645 insertions(+), 0 deletions(-)
 create mode 100644 packages/html5-schema/.htaccess
 create mode 100644 packages/html5-schema/LICENSE
 create mode 100644 packages/html5-schema/applications.rnc
 create mode 100644 packages/html5-schema/aria.rnc
 create mode 100644 packages/html5-schema/assertions.sch
 create mode 100644 packages/html5-schema/block.rnc
 create mode 100644 packages/html5-schema/common.rnc
 create mode 100644 packages/html5-schema/core-scripting.rnc
 create mode 100644 packages/html5-schema/data.rnc
 create mode 100644 packages/html5-schema/embed.rnc
 create mode 100644 packages/html5-schema/form-datatypes.rnc
 create mode 100644 packages/html5-schema/html5-schema.el
 create mode 100644 packages/html5-schema/html5.rnc
 create mode 100644 packages/html5-schema/html5exclusions.rnc
 create mode 100644 packages/html5-schema/locating-rules.xml
 create mode 100644 packages/html5-schema/media.rnc
 create mode 100644 packages/html5-schema/meta.rnc
 create mode 100644 packages/html5-schema/microdata.rnc
 create mode 100644 packages/html5-schema/phrase.rnc
 create mode 100644 packages/html5-schema/rdfa.rnc
 create mode 100644 packages/html5-schema/revision.rnc
 create mode 100644 packages/html5-schema/ruby.rnc
 create mode 100644 packages/html5-schema/sectional.rnc
 create mode 100644 packages/html5-schema/structural.rnc
 create mode 100644 packages/html5-schema/tables.rnc
 create mode 100644 

[elpa] master c531523 02/23: Added warning that assertions.sch isn't maintained

2016-01-14 Thread Stefan Monnier
branch: master
commit c5315230007d115b0e27a0f20e9664fce7d40cd6
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Added warning that assertions.sch isn't maintained
---
 assertions.sch |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/assertions.sch b/assertions.sch
index 77656f8..2b34fcc 100644
--- a/assertions.sch
+++ b/assertions.sch
@@ -1,4 +1,11 @@
 
+
+
+
+
+
+
+
 
 
 

[elpa] master 6e7c7c3 21/23: Make minlength checking behave as expected

2016-01-14 Thread Stefan Monnier
branch: master
commit 6e7c7c331e7f6692be6c7d39fb9485792f0d3513
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Make minlength checking behave as expected

This makes the "minlength" attribute a non-error for input[type=password]
and input[type=text], as expected.

Fixes https://github.com/validator/validator/issues/208 Thanks @StevenMaude
---
 web-forms.rnc  |5 -
 web-forms2.rnc |7 +++
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/web-forms.rnc b/web-forms.rnc
index edc00b2..c58e652 100644
--- a/web-forms.rnc
+++ b/web-forms.rnc
@@ -31,11 +31,6 @@ datatypes w = "http://whattf.org/datatype-draft;
common.data.integer.non-negative
}
 
-   shared-form.attrs.minlength =
-   attribute minlength {
-   common.data.integer.non-negative
-   }
-
shared-form.attrs.size = 
attribute size {
common.data.integer.positive
diff --git a/web-forms2.rnc b/web-forms2.rnc
index 0d2699d..ebd3ee4 100644
--- a/web-forms2.rnc
+++ b/web-forms2.rnc
@@ -83,6 +83,11 @@ datatypes w = "http://whattf.org/datatype-draft;
string
}
 
+   shared-form.attrs.minlength =
+   attribute minlength {
+   common.data.integer.non-negative
+   }
+
 ## Shared attributes for 

shared-input.attrs =
@@ -134,6 +139,7 @@ datatypes w = "http://whattf.org/datatype-draft;
&   shared-form.attrs.required?
&   shared-form.attrs.placeholder?
&   shared-form.attrs.inputmode?
+   &   shared-form.attrs.minlength?
)
 
 ## Password Field: , Extensions
@@ -145,6 +151,7 @@ datatypes w = "http://whattf.org/datatype-draft;
&   shared-form.attrs.pattern?
&   shared-form.attrs.placeholder?
&   shared-form.attrs.required?
+   &   shared-form.attrs.minlength?
)
 
 ## Checkbox , Extensions



[elpa] master a9ca633 04/23: Make input[type]-specific error msgs more clear.

2016-01-14 Thread Stefan Monnier
branch: master
commit a9ca633814ff43a1193c533cba3be701921f4359
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Make input[type]-specific error msgs more clear.

Fixes #49. Thanks @cvrebert.
---
 web-forms2.rnc |  237 +---
 1 files changed, 90 insertions(+), 147 deletions(-)

diff --git a/web-forms2.rnc b/web-forms2.rnc
index e83c399..e9ddb55 100644
--- a/web-forms2.rnc
+++ b/web-forms2.rnc
@@ -80,6 +80,18 @@ datatypes w = "http://whattf.org/datatype-draft;
 
 ## Shared attributes for 

+   shared-input.attrs =
+   (   input.attrs.autocomplete?
+   &   shared-form.attrs.autofocus?
+   &   input.attrs.list?
+   &   shared-form.attrs.maxlength?
+   &   shared-form.attrs.pattern?
+   &   shared-form.attrs.placeholder?
+   &   shared-form.attrs.readonly?
+   &   shared-form.attrs.required?
+   &   shared-form.attrs.size?
+   )
+
input.attrs.autocomplete = 
attribute autocomplete {
w:string "on" | w:string "off"
@@ -108,77 +120,73 @@ datatypes w = "http://whattf.org/datatype-draft;
 ## Text Field: , Extensions
 
input.text.attrs &=
-   (   input.attrs.autocomplete? 
-   &   shared-form.attrs.autofocus? 
-   &   input.attrs.list? 
-   &   shared-form.attrs.pattern? 
-   &   shared-form.attrs.required? 
-   &   shared-form.attrs.placeholder?
+   (   input.attrs.autocomplete?
+   &   shared-form.attrs.autofocus?
&   shared-form.attrs.dirname?
+   &   input.attrs.list?
+   &   shared-form.attrs.pattern?
+   &   shared-form.attrs.required?
+   &   shared-form.attrs.placeholder?
)
 
 ## Password Field: , Extensions
 
input.password.attrs &=
-   (   input.attrs.autocomplete? 
-   &   shared-form.attrs.autofocus? 
-   &   shared-form.attrs.pattern? 
-   &   shared-form.attrs.required? 
+   (   input.attrs.autocomplete?
+   &   shared-form.attrs.autofocus?
+   &   input.attrs.list?
+   &   shared-form.attrs.pattern?
&   shared-form.attrs.placeholder?
+   &   shared-form.attrs.required?
)
 
 ## Checkbox , Extensions
 
input.checkbox.attrs &=
-   (   shared-form.attrs.autofocus? 
-   &   shared-form.attrs.required? 
-   )
+   (   shared-input.attrs  )
 
 ## Radiobutton: , Extensions
 
input.radio.attrs &=
-   (   shared-form.attrs.autofocus? 
-   &   shared-form.attrs.required? 
-   )
+   (   shared-input.attrs  )
 
 ## Scripting Hook Button: , Extensions
 
input.button.attrs &=
-   ( shared-form.attrs.autofocus? )
+   (   shared-input.attrs  )
 
 ## Submit Button: , Extensions
 
input.submit.attrs &=
-   (   shared-form.attrs.formaction? 
-   &   shared-form.attrs.autofocus? 
-   &   shared-form.attrs.formenctype? 
-   &   shared-form.attrs.formmethod? 
-   &   shared-form.attrs.formtarget? 
-   &   shared-form.attrs.formnovalidate? 
+   (   shared-input.attrs
+   &   shared-form.attrs.formaction?
+   &   shared-form.attrs.formenctype?
+   &   shared-form.attrs.formmethod?
+   &   shared-form.attrs.formtarget?
+   &   shared-form.attrs.formnovalidate?
)
 
 ## Reset Button: , Extensions
 
input.reset.attrs &=
-   ( shared-form.attrs.autofocus? )
+   (   shared-input.attrs  )
 
 ## File Upload: , Extensions
 
input.file.attrs &=
-   (   shared-form.attrs.autofocus? 
-   &   shared-form.attrs.required? 
-   &   input.attrs.multiple? 
+   (   shared-input.attrs
+   &   input.attrs.multiple?
)
 
 ## Image Submit Button: , Extensions
 
input.image.attrs &=
-   (   shared-form.attrs.formaction? 
-   &   shared-form.attrs.autofocus? 
-   &   shared-form.attrs.formenctype? 
-   &   shared-form.attrs.formmethod? 
-   &   shared-form.attrs.formtarget? 
-   &   shared-form.attrs.formnovalidate? 
+   (   shared-input.attrs
+   &   

[elpa] master 85521bf 13/23: Make "integrity" checking more helpful

2016-01-14 Thread Stefan Monnier
branch: master
commit 85521bf41e5c2fed0d207e24fd80d805916d673a
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Make "integrity" checking more helpful

Refines https://github.com/validator/validator/issues/151
---
 common.rnc |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common.rnc b/common.rnc
index b105ad7..6ac04aa 100644
--- a/common.rnc
+++ b/common.rnc
@@ -392,7 +392,7 @@ common.attrs.other =
 
 ## Subresource Integrity
common.data.integrity =
-   string
+   w:integrity-metadata
 
 ## Microdata Properties
   common.data.microdata-properties =



[elpa] master c3b8596 14/23: Sync up with latest ARIA-in-HTML spec changes

2016-01-14 Thread Stefan Monnier
branch: master
commit c3b8596f469114430b133b95da50f03735c4
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Sync up with latest ARIA-in-HTML spec changes

This allows role=group for  & , and role=search for .

Fixes #185. Fixes #193.
---
 aria.rnc   |3 +++
 common.rnc |1 +
 structural.rnc |2 ++
 web-forms.rnc  |6 --
 4 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/aria.rnc b/aria.rnc
index 3e724a1..4f2d22b 100644
--- a/aria.rnc
+++ b/aria.rnc
@@ -53,6 +53,9 @@ common.attrs.aria.implicit.dialog |=
 common.attrs.aria.implicit.document |=
(   aria.state.expanded? )
 
+common.attrs.aria.implicit.form |=
+   (   aria.state.expanded? )
+
 common.attrs.aria.implicit.group |=
(   aria.state.expanded?
&   aria.prop.activedescendant?
diff --git a/common.rnc b/common.rnc
index 6ac04aa..4436010 100644
--- a/common.rnc
+++ b/common.rnc
@@ -479,6 +479,7 @@ common.attrs.aria.implicit.complementary = ( notAllowed )
 common.attrs.aria.implicit.contentinfo = ( notAllowed )
 common.attrs.aria.implicit.dialog = ( notAllowed )
 common.attrs.aria.implicit.document = ( notAllowed )
+common.attrs.aria.implicit.form = ( notAllowed )
 common.attrs.aria.implicit.group = ( notAllowed )
 common.attrs.aria.implicit.heading = ( notAllowed )
 common.attrs.aria.implicit.img = ( notAllowed )
diff --git a/structural.rnc b/structural.rnc
index ebb26bd..410f34d 100644
--- a/structural.rnc
+++ b/structural.rnc
@@ -93,6 +93,7 @@
(   common.attrs
&   (   common.attrs.aria.implicit.banner
|   common.attrs.aria.landmark.banner
+   |   common.attrs.aria.role.group
|   common.attrs.aria.role.presentation
)?
)
@@ -109,6 +110,7 @@
(   common.attrs
&   (   common.attrs.aria.implicit.contentinfo
|   common.attrs.aria.landmark.contentinfo
+   |   common.attrs.aria.role.group
|   common.attrs.aria.role.presentation
)?
)
diff --git a/web-forms.rnc b/web-forms.rnc
index a0d1d50..1372b7a 100644
--- a/web-forms.rnc
+++ b/web-forms.rnc
@@ -527,8 +527,10 @@ datatypes w = "http://whattf.org/datatype-draft;
&   form.attrs.enctype?
&   common-form.attrs.name?
&   form.attrs.accept-charset?
-   &   (   common.attrs.aria.implicit.group
-   |   common.attrs.aria.role.group
+   &   (   common.attrs.aria.implicit.form
+   |   common.attrs.aria.landmark.form
+   |   common.attrs.aria.role.search
+   |   common.attrs.aria.role.presentation
)?
)
form.attrs.action =



[elpa] master 44fe4a7 16/23: Allow "minlength"

2016-01-14 Thread Stefan Monnier
branch: master
commit 44fe4a71acf4f3637aa98ce2a45cc0c792381b33
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Allow "minlength"

Fixes https://github.com/validator/validator/issues/164
---
 web-forms.rnc  |5 +
 web-forms2.rnc |2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/web-forms.rnc b/web-forms.rnc
index c58e652..edc00b2 100644
--- a/web-forms.rnc
+++ b/web-forms.rnc
@@ -31,6 +31,11 @@ datatypes w = "http://whattf.org/datatype-draft;
common.data.integer.non-negative
}
 
+   shared-form.attrs.minlength =
+   attribute minlength {
+   common.data.integer.non-negative
+   }
+
shared-form.attrs.size = 
attribute size {
common.data.integer.positive
diff --git a/web-forms2.rnc b/web-forms2.rnc
index 9aef196..0d2699d 100644
--- a/web-forms2.rnc
+++ b/web-forms2.rnc
@@ -90,6 +90,7 @@ datatypes w = "http://whattf.org/datatype-draft;
&   shared-form.attrs.autofocus?
&   input.attrs.list?
&   shared-form.attrs.maxlength?
+   &   shared-form.attrs.minlength?
&   shared-form.attrs.pattern?
&   shared-form.attrs.placeholder?
&   shared-form.attrs.readonly?
@@ -651,6 +652,7 @@ datatypes w = "http://whattf.org/datatype-draft;
empty
textarea.attrs &=
(   shared-form.attrs.maxlength?
+   &   shared-form.attrs.minlength?
&   shared-form.attrs.autofocus? 
&   shared-form.attrs.required? 
&   shared-form.attrs.placeholder?



[elpa] master 76e0657 10/23: Allow ol>li[role=menuitem] & ol>li[role=tab].

2016-01-14 Thread Stefan Monnier
branch: master
commit 76e0657f05643ba1ee2ba63b5b1c929b77488142
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Allow ol>li[role=menuitem] & ol>li[role=tab].

Fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=22165
Thanks Bruno Racineux.
---
 block.rnc |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/block.rnc b/block.rnc
index bc2b3a1..cd2980d 100644
--- a/block.rnc
+++ b/block.rnc
@@ -154,9 +154,11 @@ datatypes w = "http://whattf.org/datatype-draft;
&   oli.attrs.value?
&   (   common.attrs.aria.implicit.listitem
|   common.attrs.aria.role.listitem
+   |   common.attrs.aria.role.menuitem
|   common.attrs.aria.role.menuitemcheckbox
|   common.attrs.aria.role.menuitemradio
|   common.attrs.aria.role.option
+   |   common.attrs.aria.role.tab
|   common.attrs.aria.role.treeitem
|   common.attrs.aria.role.separator
|   common.attrs.aria.role.presentation



[elpa] master 2d5e35e 05/23: Report warning for inputmode (instead of error).

2016-01-14 Thread Stefan Monnier
branch: master
commit 2d5e35e5c71877f6cd35aa272b45886fd6a017e5
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Report warning for inputmode (instead of error).

Addresses #102.
---
 web-forms2.rnc |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/web-forms2.rnc b/web-forms2.rnc
index e9ddb55..9aef196 100644
--- a/web-forms2.rnc
+++ b/web-forms2.rnc
@@ -78,6 +78,11 @@ datatypes w = "http://whattf.org/datatype-draft;
form.data.nonemptystring
}
 
+   shared-form.attrs.inputmode =
+   attribute inputmode {
+   string
+   }
+
 ## Shared attributes for 

shared-input.attrs =
@@ -127,6 +132,7 @@ datatypes w = "http://whattf.org/datatype-draft;
&   shared-form.attrs.pattern?
&   shared-form.attrs.required?
&   shared-form.attrs.placeholder?
+   &   shared-form.attrs.inputmode?
)
 
 ## Password Field: , Extensions
@@ -657,6 +663,7 @@ datatypes w = "http://whattf.org/datatype-draft;
&   textarea.attrs.cols?
)
)
+   &   shared-form.attrs.inputmode?
)
textarea.attrs.wrap.hard =
attribute wrap {



[elpa] master a426434 23/23: * html5-schema: Add locating-rules.xml and setup nxml to use it

2016-01-14 Thread Stefan Monnier
branch: master
commit a42643459f0e32e3cda87d652c9f2602316f13b1
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* html5-schema: Add locating-rules.xml and setup nxml to use it
---
 packages/html5-schema/html5-schema.el|   67 ++
 packages/html5-schema/locating-rules.xml |9 
 2 files changed, 76 insertions(+), 0 deletions(-)

diff --git a/packages/html5-schema/html5-schema.el 
b/packages/html5-schema/html5-schema.el
new file mode 100644
index 000..5fff760
--- /dev/null
+++ b/packages/html5-schema/html5-schema.el
@@ -0,0 +1,67 @@
+;;; html5-schema.el --- Add HTML5 schemas for use by nXML  -*- 
lexical-binding: t; -*-
+
+;; Copyright (C) 2016  Free Software Foundation, Inc
+
+;; Author: Stefan Monnier <monn...@iro.umontreal.ca>
+;; Keywords: html, xml
+;; Version: 0.1
+;; URL: https://github.com/validator/validator
+;; Package-Type: multi
+
+;; 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:
+
+;; The RelaxNG files are taken straight from
+;; https://github.com/validator/validator.git's via:
+;;
+;; git subtree -P schema/html5 split
+;;
+;; To which we manually add `locating-rules.xml` and this file.
+
+;;; Code:
+
+;;;###autoload
+(when load-file-name
+  (let* ((dir (file-name-directory load-file-name))
+ (file (expand-file-name "locating-rules.xml" dir)))
+(eval-after-load 'rng-loc
+  `(progn
+ (add-to-list 'rng-schema-locating-files-default 'file)
+ ;; FIXME: We should only push to rng-schema-locating-files-default,
+ ;; since rng-schema-locating-files is a custom var, but by the time
+ ;; we run, rng-schema-locating-files has already been initialized
+ ;; from rng-schema-locating-files-default, so setting
+ ;; rng-schema-locating-files-default doesn't have any effect
+ ;; any more!
+ (add-to-list 'rng-schema-locating-files ,file)
+ (put 'http://whattf.org/datatype-draft 'rng-dt-compile
+  #'nxml-html5-dt-compile)
+
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.html?\\'" . nxml-mode))
+
+(defvar nxml-html5-dt-params nil)
+(defvar nxml-html5-dt-names nil)
+
+;;;###autoload
+(defun nxml-html5-dt-compile (name params)
+  ;; FIXME: How/when is `params' ever used?  It seems to always be nil!
+  (add-to-list 'nxml-html5-dt-params params)
+  (add-to-list 'nxml-html5-dt-names name)
+  ;; FIXME: We currently don't do any actual validation of datatypes!
+  '(t identity))
+
+(provide 'html5-schema)
+;;; html5-schema.el ends here
diff --git a/packages/html5-schema/locating-rules.xml 
b/packages/html5-schema/locating-rules.xml
new file mode 100644
index 000..86b2bb1
--- /dev/null
+++ b/packages/html5-schema/locating-rules.xml
@@ -0,0 +1,9 @@
+
+http://thaiopensource.com/ns/locating-rules/1.0;>
+  
+  
+  http://www.w3.org/1999/xhtml; typeId="XHTML5"/>
+  
+  
+  
+



[elpa] master 242f515 07/23: Emit error for empty form-control `name` attr.

2016-01-14 Thread Stefan Monnier
branch: master
commit 242f5156862583956473de343a5a5ab8f52d53a0
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Emit error for empty form-control `name` attr.

Fixes #106. Thanks @dhodder.
---
 web-forms.rnc |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/web-forms.rnc b/web-forms.rnc
index f786a1b..3f89143 100644
--- a/web-forms.rnc
+++ b/web-forms.rnc
@@ -13,7 +13,7 @@ datatypes w = "http://whattf.org/datatype-draft;

common-form.attrs.name = 
attribute name {
-   string #REVISIT should this be restricted somehow? No & 
and = perhaps?
+   form.data.nonemptystring
}
 
common-form.attrs.disabled = 



[elpa] master f1cac66 11/23: Refine some ARIA checking to sync w/ current spec

2016-01-14 Thread Stefan Monnier
branch: master
commit f1cac663a191cd6fb532cd01824d61d163e020f0
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Refine some ARIA checking to sync w/ current spec
---
 applications.rnc |   38 +-
 block.rnc|9 -
 data.rnc |4 ++--
 structural.rnc   |2 --
 web-forms.rnc|   13 +++--
 5 files changed, 10 insertions(+), 56 deletions(-)

diff --git a/applications.rnc b/applications.rnc
index 2a592fb..618814d 100644
--- a/applications.rnc
+++ b/applications.rnc
@@ -91,8 +91,6 @@ datatypes w = "http://whattf.org/datatype-draft;
&   progress.attrs.max?
&   (   common.attrs.aria.implicit.progressbar
|   common.attrs.aria.role.progressbar
-   |   common.attrs.aria.role.presentation
-   |   common.attrs.aria.role.menuitem
)?
)
progress.attrs.value =
@@ -371,40 +369,7 @@ datatypes w = "http://whattf.org/datatype-draft;
(   common.attrs
&   details.attrs.open?
&   (   common.attrs.aria.implicit.group # 
aria-expanded must be true if open attr present; check by assertions
-   |   common.attrs.aria.role.alertdialog
-   |   common.attrs.aria.role.banner
-   |   common.attrs.aria.role.button
-   |   common.attrs.aria.role.combobox
-   |   common.attrs.aria.role.dialog
-   |   common.attrs.aria.role.directory
|   common.attrs.aria.role.group
-   |   common.attrs.aria.role.heading
-   |   common.attrs.aria.role.img
-   |   common.attrs.aria.role.link
-   |   common.attrs.aria.role.list
-   |   common.attrs.aria.role.listbox
-   |   common.attrs.aria.role.listitem
-   |   common.attrs.aria.role.log
-   |   common.attrs.aria.role.marquee
-   |   common.attrs.aria.role.menu
-   |   common.attrs.aria.role.menubar
-   |   common.attrs.aria.role.note
-   |   common.attrs.aria.role.status
-   |   common.attrs.aria.role.tab
-   |   common.attrs.aria.role.tablist
-   |   common.attrs.aria.role.tabpanel
-   |   common.attrs.aria.role.toolbar
-   |   common.attrs.aria.role.tree
-   |   common.attrs.aria.role.treeitem
-   |   common.attrs.aria.landmark.application
-   |   common.attrs.aria.landmark.article
-   |   common.attrs.aria.landmark.complementary
-   |   common.attrs.aria.landmark.contentinfo
-   |   common.attrs.aria.landmark.document
-   |   common.attrs.aria.landmark.form
-   |   common.attrs.aria.landmark.main
-   |   common.attrs.aria.landmark.navigation
-   |   common.attrs.aria.landmark.search
)?
)
details.attrs.open =
@@ -424,8 +389,7 @@ datatypes w = "http://whattf.org/datatype-draft;
element summary { summary.inner & summary.attrs }
summary.attrs =
(   common.attrs
-   &   (   common.attrs.aria.role.presentation
-   |   common.attrs.aria.role.menuitem
+   &   (   common.attrs.aria.implicit.button
|   common.attrs.aria.role.button
)?
)
diff --git a/block.rnc b/block.rnc
index cd2980d..6d0eb0d 100644
--- a/block.rnc
+++ b/block.rnc
@@ -26,10 +26,7 @@ datatypes w = "http://whattf.org/datatype-draft;
element hr { hr.inner & hr.attrs }
hr.attrs =
(   common.attrs
-   &   (   common.attrs.aria.role.separator
-   |   common.attrs.aria.role.presentation
-   |   common.attrs.aria.role.menuitem
-   )?
+   &   common.attrs.aria.role.separator?
)
hr.inner =
( empty )
@@ -180,7 +177,9 @@ datatypes w = "http://whattf.org/datatype-draft;
element dl { dl.inner & dl.attrs }
dl.attrs =
(   common.attrs
-   &   common.attrs.aria?
+   &   (   common.attrs.aria.implicit.list
+

[elpa] master 103dc56 09/23: (Re)corrected content model for the ruby element.

2016-01-14 Thread Stefan Monnier
branch: master
commit 103dc56ee76cd36c45171517ecf5f06a87ed7cfb
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

(Re)corrected content model for the ruby element.
---
 ruby.rnc |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ruby.rnc b/ruby.rnc
index 49db995..dfd0e3f 100644
--- a/ruby.rnc
+++ b/ruby.rnc
@@ -17,9 +17,9 @@ namespace local = ""
)
ruby.inner =
(   (   common.inner.phrasing
-   |   rb.elem+
-   )
-   |   (   (   rt.elem
+   |   rb.elem
+   )+
+   ,   (   (   rt.elem
|   rtc.elem
)+
|   (   rp.elem



[elpa] master 9b44795 03/23: Exit the meta[name]-checking business.

2016-01-14 Thread Stefan Monnier
branch: master
commit 9b4479574a3c0dfd9329f438043b5b77f8ac5747
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Exit the meta[name]-checking business.

Removed the code for checking if meta[name] values are registered. While
admiring the spirit behind the original requirement, the experiment has
failed in practice. It's ended up costing a huge amount of maintenance time
for something that was of very little benefit to end users to begin with --
even if it had ever worked as conceived. But it's not working as conceived
-- in fact at this point it's mostly just wasting the time of both users
and maintainers. So, enough is enough -- let's cut our losses.
---
 meta.rnc |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta.rnc b/meta.rnc
index 91d9d1c..92aaf5e 100644
--- a/meta.rnc
+++ b/meta.rnc
@@ -249,7 +249,7 @@ datatypes w = "http://whattf.org/datatype-draft;
)
meta.name.attrs.name =
attribute name {
-   w:meta-name
+   w:non-empty-string
}
meta.name.attrs.content =
attribute content {



[elpa] master fec8cdf 20/23: Add CSP syntax checking for & HTTP header

2016-01-14 Thread Stefan Monnier
branch: master
commit fec8cdffb904d2d58b3fb10d90efa095ce5e1f76
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Add CSP syntax checking for  & HTTP header

Adds datatype/microsyntax-checking of the "content" attribute of the
 element, along with
such checking of the value of the Content-Security-Policy HTTP header.

Fixes https://github.com/validator/validator/issues/153
---
 common.rnc |4 
 meta.rnc   |   25 +
 2 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/common.rnc b/common.rnc
index 3352fd8..68d9acc 100644
--- a/common.rnc
+++ b/common.rnc
@@ -394,6 +394,10 @@ common.attrs.other =
common.data.integrity =
w:integrity-metadata
 
+## Content Security Policy
+   common.data.content-security-policy =
+   w:content-security-policy
+
 ## List of sandbox keywords
common.data.sandbox-allow-list =
w:string "" | w:sandbox-allow-list
diff --git a/meta.rnc b/meta.rnc
index e97e0de..ff67c2d 100644
--- a/meta.rnc
+++ b/meta.rnc
@@ -324,6 +324,31 @@ datatypes w = "http://whattf.org/datatype-draft;
# if the 
definition is 
# reused in 
another language
 
+## Content Security Policy pragma directive: 
+
+   meta.http-equiv.content-security-policy.elem =
+   element meta { meta.inner & 
meta.http-equiv.content-security-policy.attrs }
+   meta.http-equiv.content-security-policy.attrs =
+   (   common.attrs.basic
+   &   common.attrs.i18n
+   &   common.attrs.present
+   &   common.attrs.other
+   &   meta.http-equiv.attrs.http-equiv.content-security-policy
+   &   meta.http-equiv.attrs.content.content-security-policy
+   &   (   common.attrs.aria.role.presentation
+   |   common.attrs.aria.role.menuitem
+   )?
+   )
+   meta.http-equiv.attrs.http-equiv.content-security-policy =
+   attribute http-equiv {
+   w:string "content-security-policy"
+   }
+   meta.http-equiv.attrs.content.content-security-policy =
+   attribute content {
+   common.data.content-security-policy
+   }
+   common.elem.metadata |= meta.http-equiv.content-security-policy.elem
+
 ## "x-ua-compatible" pragma directive: 
 
meta.http-equiv.x-ua-compatible.elem =



[elpa] master 67350aa 15/23: Allow ARIA role=switch

2016-01-14 Thread Stefan Monnier
branch: master
commit 67350aac0bb34cdb39855be35f171bd40f0020a7
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Allow ARIA role=switch

Fixes #135
---
 aria.rnc  |   11 +++
 common.rnc|1 +
 phrase.rnc|1 +
 web-forms.rnc |8 
 4 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/aria.rnc b/aria.rnc
index 4f2d22b..61e007b 100644
--- a/aria.rnc
+++ b/aria.rnc
@@ -,6 +,17 @@ common.attrs.aria.implicit.navigation |= 
common.attrs.aria.implicit.landmark
common.attrs.aria |= aria.status
common.attrs.aria.role.status |= aria.status
 
+## switch
+   aria.switch =
+   (   aria.role.switch
+   &   aria.state.checked #required!
+   )
+   aria.role.switch =
+   attribute role { string "switch" }
+
+   common.attrs.aria |= aria.switch
+   common.attrs.aria.role.switch |= aria.switch
+
 ## tab
aria.tab =
(   aria.role.tab
diff --git a/common.rnc b/common.rnc
index 4436010..97c09de 100644
--- a/common.rnc
+++ b/common.rnc
@@ -462,6 +462,7 @@ common.attrs.aria.role.separator = ( notAllowed )
 common.attrs.aria.role.slider = ( notAllowed )
 common.attrs.aria.role.spinbutton = ( notAllowed )
 common.attrs.aria.role.status = ( notAllowed )
+common.attrs.aria.role.switch = ( notAllowed )
 common.attrs.aria.role.tab = ( notAllowed )
 common.attrs.aria.role.tablist = ( notAllowed )
 common.attrs.aria.role.tabpanel = ( notAllowed )
diff --git a/phrase.rnc b/phrase.rnc
index dc70881..f8fa725 100644
--- a/phrase.rnc
+++ b/phrase.rnc
@@ -30,6 +30,7 @@ datatypes w = "http://whattf.org/datatype-draft;
|   common.attrs.aria.role.menuitem
|   common.attrs.aria.role.menuitemcheckbox
|   common.attrs.aria.role.menuitemradio
+   |   common.attrs.aria.role.switch
|   common.attrs.aria.role.tab
|   common.attrs.aria.role.treeitem
)?
diff --git a/web-forms.rnc b/web-forms.rnc
index 1372b7a..c58e652 100644
--- a/web-forms.rnc
+++ b/web-forms.rnc
@@ -114,6 +114,7 @@ datatypes w = "http://whattf.org/datatype-draft;
&   (   common.attrs.aria.implicit.checkbox
|   common.attrs.aria.role.checkbox
|   common.attrs.aria.role.menuitemcheckbox
+   |   common.attrs.aria.role.switch
)?
)
input.checkbox.attrs.type = 
@@ -169,6 +170,7 @@ datatypes w = "http://whattf.org/datatype-draft;
|   common.attrs.aria.role.menuitemcheckbox
|   common.attrs.aria.role.menuitemradio
|   common.attrs.aria.role.radio
+   |   common.attrs.aria.role.switch
)?
)
input.button.attrs.type = 
@@ -293,6 +295,7 @@ datatypes w = "http://whattf.org/datatype-draft;
|   common.attrs.aria.role.menuitemcheckbox
|   common.attrs.aria.role.menuitemradio
|   common.attrs.aria.role.radio
+   |   common.attrs.aria.role.switch
)?
)   
input.image.attrs.type = 
@@ -450,6 +453,7 @@ datatypes w = "http://whattf.org/datatype-draft;
&   button.attrs.value?
&   (   common.attrs.aria.implicit.button
|   common.attrs.aria.role.button
+   |   common.attrs.aria.role.checkbox
|   common.attrs.aria.role.link
|   common.attrs.aria.role.menuitem
|   common.attrs.aria.role.menuitemcheckbox
@@ -475,11 +479,13 @@ datatypes w = "http://whattf.org/datatype-draft;
&   button.attrs.value? #REVISIT I guess this still affects 
the DOM
&   (   common.attrs.aria.implicit.button
|   common.attrs.aria.role.button
+   |   common.attrs.aria.role.checkbox
|   common.attrs.aria.role.link
|   common.attrs.aria.role.menuitem
|   common.attrs.aria.role.menuitemcheckbox
|   common.attrs.aria.role.menuitemradio
|   common.attrs.aria.role.radio
+   |   common.attrs.aria.role.switch
)?
)
button.reset.attrs.type =
@@ -500,11 +506,13 @@ datatypes w = "http://whattf.org/datatype-draft;
&   button.attrs.value? #REVISIT I guess 

[elpa] master 1c11a56 12/23: Add the "integrity" attribute

2016-01-14 Thread Stefan Monnier
branch: master
commit 1c11a56fc072cba7c1251b1e02811d93bb1a3d66
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Add the "integrity" attribute

Fixes https://github.com/validator/validator/issues/151
---
 common.rnc |4 
 core-scripting.rnc |6 ++
 meta.rnc   |5 +
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/common.rnc b/common.rnc
index e87d49b..b105ad7 100644
--- a/common.rnc
+++ b/common.rnc
@@ -390,6 +390,10 @@ common.attrs.other =
common.data.source.size.list =
w:source-size-list
 
+## Subresource Integrity
+   common.data.integrity =
+   string
+
 ## Microdata Properties
   common.data.microdata-properties =
 list { w:microdata-property+ }
diff --git a/core-scripting.rnc b/core-scripting.rnc
index ff64969..0569d0e 100644
--- a/core-scripting.rnc
+++ b/core-scripting.rnc
@@ -15,6 +15,7 @@ datatypes w = "http://whattf.org/datatype-draft;
(   common.attrs
&   script.attrs.type?
&   script.attrs.language? # restricted in Schematron
+   &   script.attrs.integrity?
&   embedded.content.attrs.crossorigin?
&   (   common.attrs.aria.role.presentation
|   common.attrs.aria.role.menuitem
@@ -30,6 +31,7 @@ datatypes w = "http://whattf.org/datatype-draft;
&   script.attrs.type?
&   script.attrs.charset?
&   script.attrs.language? # restricted in Schematron
+   &   script.attrs.integrity?
&   embedded.content.attrs.crossorigin?
&   (   common.attrs.aria.role.presentation
|   common.attrs.aria.role.menuitem
@@ -59,6 +61,10 @@ datatypes w = "http://whattf.org/datatype-draft;
attribute language {
string
}
+   script.attrs.integrity =
+   attribute integrity {
+   common.data.integrity
+   }
script.inner.embedded =
( common.inner.anything )
script.inner.imported =
diff --git a/meta.rnc b/meta.rnc
index 92aaf5e..bbb67b4 100644
--- a/meta.rnc
+++ b/meta.rnc
@@ -159,6 +159,7 @@ datatypes w = "http://whattf.org/datatype-draft;
&   common.attrs.other
&   link.attrs.href
&   link.attrs.rel
+   &   link.attrs.integrity?
&   shared-hyperlink.attrs.hreflang?
&   shared-hyperlink.attrs.media?
&   shared-hyperlink.attrs.type?
@@ -178,6 +179,10 @@ datatypes w = "http://whattf.org/datatype-draft;
attribute rel {
w:link-rel
}
+   link.attrs.integrity =
+   attribute integrity {
+   common.data.integrity
+   }
link.attrs.sizes =
attribute sizes {
w:string "any" | common.data.sizes



[elpa] master e2f495e 06/23: Allow ruby & elements.

2016-01-14 Thread Stefan Monnier
branch: master
commit e2f495ebbe40e50068226aee08b6d58b9f1d597f
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Allow ruby  &  elements.

Multiple UAs now have support for  and .
Fixes #96. Thanks @stevefaulkner.
---
 ruby.rnc |   50 --
 1 files changed, 40 insertions(+), 10 deletions(-)

diff --git a/ruby.rnc b/ruby.rnc
index cd95ff8..4199528 100644
--- a/ruby.rnc
+++ b/ruby.rnc
@@ -16,15 +16,20 @@ namespace local = ""
&   common.attrs.aria?
)
ruby.inner =
-   (  (  common.inner.phrasing
-  ,  (  rt.elem
- |  (  rp.elem
-,  rt.elem
-,  rp.elem
-)
- )
-  )+
-   )
+   (   (   common.inner.phrasing
+   |   rb.elem+
+   )
+   ,   (   (   rt.elem
+   |   rtc.elem
+   )
+   |   (   rp.elem
+   ,   (   rt.elem
+   |   rtc.elem
+   )
+   ,   rp.elem
+   )
+   )
+   )+
 
common.elem.phrasing |= ruby.elem
 
@@ -38,7 +43,32 @@ namespace local = ""
)
rt.inner =
( common.inner.phrasing )
-   
+
+## Ruby Text Container: 
+
+   rtc.elem =
+   element rtc { rtc.inner & rtc.attrs }
+   rtc.attrs =
+   (   common.attrs
+   &   common.attrs.aria?
+   )
+   rtc.inner =
+   (   common.inner.phrasing
+   |   rt.elem
+   |   rp.elem
+   )*
+
+## Ruby Base: 
+
+   rb.elem =
+   element rb { rb.inner & rb.attrs }
+   rb.attrs =
+   (   common.attrs
+   &   common.attrs.aria?
+   )
+   rb.inner =
+   ( common.inner.phrasing )
+
 ## Ruby Parenthesis: 
 
rp.elem =



[elpa] master ae3a23b 19/23: Allow the "nonce" attribute

2016-01-14 Thread Stefan Monnier
branch: master
commit ae3a23b36026d161ba2b5d834729a0815ccd198d
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Allow the "nonce" attribute

Fixes https://github.com/validator/validator/issues/159
---
 core-scripting.rnc |6 ++
 meta.rnc   |5 +
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/core-scripting.rnc b/core-scripting.rnc
index 534e4ca..33e8ff7 100644
--- a/core-scripting.rnc
+++ b/core-scripting.rnc
@@ -16,6 +16,7 @@ datatypes w = "http://whattf.org/datatype-draft;
&   script.attrs.type?
&   script.attrs.language? # restricted in Schematron
&   script.attrs.integrity?
+   &   script.attrs.nonce?
&   embedded.content.attrs.crossorigin?
&   (   common.attrs.aria.role.presentation
|   common.attrs.aria.role.menuitem
@@ -32,6 +33,7 @@ datatypes w = "http://whattf.org/datatype-draft;
&   script.attrs.charset?
&   script.attrs.language? # restricted in Schematron
&   script.attrs.integrity?
+   &   script.attrs.nonce?
&   embedded.content.attrs.crossorigin?
&   (   common.attrs.aria.role.presentation
|   common.attrs.aria.role.menuitem
@@ -65,6 +67,10 @@ datatypes w = "http://whattf.org/datatype-draft;
attribute integrity {
common.data.integrity
}
+   script.attrs.nonce =
+   attribute nonce{
+   string
+   }
script.inner.embedded =
( common.inner.anything )
script.inner.imported =
diff --git a/meta.rnc b/meta.rnc
index ad5e2f1..e97e0de 100644
--- a/meta.rnc
+++ b/meta.rnc
@@ -199,6 +199,7 @@ datatypes w = "http://whattf.org/datatype-draft;
(   common.attrs
&   style.attrs.type?
&   style.attrs.media?
+   &   style.attrs.nonce?
#   style.attrs.title included in common.attrs
&   (   common.attrs.aria.role.presentation
|   common.attrs.aria.role.menuitem
@@ -212,6 +213,10 @@ datatypes w = "http://whattf.org/datatype-draft;
attribute media {
common.data.mediaquery
}
+   style.attrs.nonce =
+   attribute nonce{
+   string
+   }
style.inner =
( common.inner.anything )




[elpa] master 8b4cba1 08/23: Corrected the content model for the ruby element.

2016-01-14 Thread Stefan Monnier
branch: master
commit 8b4cba1aab61fb522b79918ba09a6845732e3281
Author: Michael[tm] Smith 
Commit: Michael[tm] Smith 

Corrected the content model for the ruby element.

Fixes #113. Fixes #114. Thanks @momdo.
---
 ruby.rnc |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ruby.rnc b/ruby.rnc
index 4199528..49db995 100644
--- a/ruby.rnc
+++ b/ruby.rnc
@@ -19,13 +19,13 @@ namespace local = ""
(   (   common.inner.phrasing
|   rb.elem+
)
-   ,   (   (   rt.elem
+   |   (   (   rt.elem
|   rtc.elem
-   )
+   )+
|   (   rp.elem
,   (   rt.elem
|   rtc.elem
-   )
+   )+
,   rp.elem
)
)



[elpa] master bac85c0: * ampc/ampc.el: Fix up warnings and use cl-lib. Change maintainer

2016-02-13 Thread Stefan Monnier
branch: master
commit bac85c0136ab02f79f8060ade4b63250a4ca0e15
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* ampc/ampc.el: Fix up warnings and use cl-lib.  Change maintainer

(ampc-current-playlist-mode-map): Prefer RET over  (so it also
works on ttys).
(ampc-tagger-mode-map): Prefer TAB over  (so it also
works on ttys).
---
 packages/ampc/ampc.el | 1525 +
 1 files changed, 765 insertions(+), 760 deletions(-)

diff --git a/packages/ampc/ampc.el b/packages/ampc/ampc.el
index bce7a93..6e9bbd6 100644
--- a/packages/ampc/ampc.el
+++ b/packages/ampc/ampc.el
@@ -1,9 +1,12 @@
 ;;; ampc.el --- Asynchronous Music Player Controller -*- lexical-binding: t -*-
 
-;; Copyright (C) 2011-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2012, 2016 Free Software Foundation, Inc.
 
 ;; Author: Christopher Schmidt <christop...@ch.ristopher.com>
-;; Maintainer: Christopher Schmidt <christop...@ch.ristopher.com>
+;; Comment: On Jan 2016, I couldn't get hold of Christopher Schmidt
+;;   nor could I find ampc anywhere, so I re-instated GNU ELPA's old version
+;;   and marked it as "maintainerless".
+;; Maintainer: emacs-de...@gnu.org
 ;; Version: 0.2
 ;; Created: 2011-12-06
 ;; Keywords: ampc, mpc, mpd
@@ -112,7 +115,7 @@
 ;; playlist, press `d' (ampc-delete).  Pressing `' will move the
 ;; point to the entry under cursor and delete it from the playlist.  To move 
the
 ;; selected songs up, press `' (ampc-up).  Analogous, press `'
-;; (ampc-down) to move the selected songs down.  Pressing `'
+;; (ampc-down) to move the selected songs down.  Pressing `RET'
 ;; (ampc-play-this) or `' will play the song at point/cursor.
 ;;
 ;; Windows three to five are tag browsers.  You use them to narrow the song
@@ -317,8 +320,7 @@
 
 ;;; Code:
 ;;; * code
-(eval-when-compile
-  (require 'cl))
+(eval-when-compile (require 'cl-lib))
 (require 'network-stream)
 (require 'avl-tree)
 
@@ -629,12 +631,12 @@ modified."
 (define-key map (kbd "z") 'ampc-suspend)
 (define-key map (kbd "T") 'ampc-trigger-update)
 (define-key map (kbd "I") 'ampc-tagger)
-(loop for view in ampc-views
-  do (when (stringp (car view))
-   (define-key map (cadr view)
- `(lambda ()
-(interactive)
-(ampc-change-view ',view)
+(cl-loop for view in ampc-views
+ do (when (stringp (car view))
+  (define-key map (cadr view)
+`(lambda ()
+   (interactive)
+   (ampc-change-view ',view)
 map))
 
 (defvar ampc-item-mode-map
@@ -655,7 +657,7 @@ modified."
 (defvar ampc-current-playlist-mode-map
   (let ((map (make-sparse-keymap)))
 (suppress-keymap map)
-(define-key map (kbd "") 'ampc-play-this)
+(define-key map (kbd "RET") 'ampc-play-this)
 (define-key map (kbd "") 'ampc-mouse-play-this)
 (define-key map (kbd "") 'ampc-mouse-align-point)
 (define-key map (kbd "") 'ampc-mouse-delete)
@@ -712,9 +714,9 @@ modified."
 (define-key map (kbd "C-c C-r") 'ampc-tagger-reset)
 (define-key map [remap ampc-tagger] nil)
 (define-key map [remap ampc-quit] 'ampc-tagger-quit)
-(loop for view in ampc-views
-  do (when (stringp (car view))
-   (define-key map (cadr view) nil)))
+(cl-loop for view in ampc-views
+ do (when (stringp (car view))
+  (define-key map (cadr view) nil)))
 map))
 
 (defvar ampc-tagger-mode-map
@@ -722,7 +724,7 @@ modified."
 (define-key map (kbd "C-c C-q") 'ampc-tagger-quit)
 (define-key map (kbd "C-c C-c") 'ampc-tagger-save)
 (define-key map (kbd "C-c C-r") 'ampc-tagger-reset)
-(define-key map (kbd "") 'ampc-tagger-completion-at-point)
+(define-key map (kbd "TAB") 'ampc-tagger-completion-at-point)
 map))
 
 (defvar ampc-tagger-dired-mode-map
@@ -733,13 +735,13 @@ modified."
 ;;;  menu
 (easy-menu-define nil ampc-mode-map nil
   `("ampc"
-("Change view" ,@(loop for view in ampc-views
-   when (stringp (car view))
-   collect (vector (car view)
-   `(lambda ()
-  (interactive)
-  (ampc-change-view ',view)))
-   end))
+("Change view" ,@(cl-loop for view in ampc-views
+  when (stringp (car view))
+  collect (vector (car view)
+  `(lambda ()
+ (interactive)

[elpa] master ada08b0: * rnc-mode: New package

2016-01-29 Thread Stefan Monnier
branch: master
commit ada08b05a1ff278c1e20d9af60fb22fe9f8e65fc
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* rnc-mode: New package
---
 packages/rnc-mode/rnc-mode.el |  153 +
 1 files changed, 153 insertions(+), 0 deletions(-)

diff --git a/packages/rnc-mode/rnc-mode.el b/packages/rnc-mode/rnc-mode.el
new file mode 100644
index 000..81f891b
--- /dev/null
+++ b/packages/rnc-mode/rnc-mode.el
@@ -0,0 +1,153 @@
+;;; rnc-mode.el --- Emacs mode to edit Relax-NG Compact files  -*- 
lexical-binding:t -*-
+
+;; Copyright (C) 1994-1998, 2001-2016 Free Software Foundation, Inc.
+
+;; Author: Stefan Monnier <monn...@iro.umontreal.ca>
+;; Keywords: xml relaxng
+;; Version: 0.1
+
+;; 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/>.
+
+
+;;; Commentary:
+
+(require 'smie)
+(require 'nxml-mode)
+
+;;; Code:
+
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.rnc\\'" . rnc-mode))
+
+(defconst rnc-mode-syntax-table
+  (let ((st (make-syntax-table)))
+(modify-syntax-entry ?# "<" st)
+(modify-syntax-entry ?\n ">" st)
+(modify-syntax-entry ?\" "\"" st)
+(modify-syntax-entry ?- "_" st)
+(modify-syntax-entry ?. "_" st)
+(modify-syntax-entry ?: "_" st)
+(modify-syntax-entry ?_ "_" st)
+st))
+
+(defconst rnc--keywords
+  ;; Taken from the grammar in http://relaxng.org/compact-20021121.html,
+  ;; by order of appearance.
+  '("namespace" "default" "datatypes" "element" "attribute"
+"list" "mixed" "parent" "empty" "text" "notAllowed" "external"
+"grammar" "div" "include" ;; "start"
+"string" "token" "inherit"))
+
+(defconst rnc--def-regexp "^[ \t]*\\([\\[:alpha:]][[:alnum:]-._]*\\)[ \t]*=")
+
+(defconst rnc-font-lock-keywords
+  `((,rnc--def-regexp (1 font-lock-function-name-face))
+(,(concat "\\_<" (regexp-opt rnc--keywords) "\\_>")
+ (0 font-lock-keyword-face))
+("attribute[ \t\n]+\\([^ ]+\\)" (1 'nxml-attribute-local-name))
+;; FIXME: We'd like to use nxml-element-local-name for element names,
+;; but by default this looks exactly like font-lock-function-name-face,
+;; which we want to use for local pattern definitions.
+;; ("element[ \t\n]+\\([^ ]+\\)" (1 'nxml-element-local-name))
+))
+
+(defconst rnc-imenu-generic-expression `((nil ,rnc--def-regexp 1)))
+
+(defconst rnc-smie-grammar
+  ;; The body of an RNC file is a sequence of definitions.
+  ;; Problem is: these definitions are not separated by any special keyword.
+  ;; It's basically a repetition of (id "=" pattern), where
+  ;; patterns can end with:
+  ;; "}", ")" "*", "+", "?", id, stringliteral
+  ;; Since this is way beyond the power of SMIE, we resort to using a pseudo
+  ;; " ; " separator which is introduced by the tokenizer.
+  (smie-prec2->grammar
+   (smie-bnf->prec2
+'((id) (atom) (args)
+  (header (header "include" atom))
+  (decls (id "=" pattern) (id "|=" pattern) (id "&=" pattern)
+ (decls " ; " decls))
+  (pattern ("element" args) ("attribute" args)
+   ("list" args) ("mixed" args)
+   ("parent" id) ("external" id)
+   ("grammar" atom)
+  ("{" pattern "}")
+  (pattern "," pattern)
+  (pattern "&" pattern)
+  (pattern "|" pattern)
+  (pattern "?")
+  (pattern "*")
+  (pattern "+")))
+;; The spec says "There is no notion of operator precedence".
+'((assoc " ; "))
+'((assoc "," "&" "|") (nonassoc "?" "*" "+"))
+)))
+
+(defun rnc-smie-forward-token ()
+  (let ((start (point

[elpa] master a51042d: * arbitools/arbitools.el: Fix checkdoc warnings and quoting problems

2016-02-22 Thread Stefan Monnier
branch: master
commit a51042d67cf764e6e454d38b3f7025584ce58f13
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* arbitools/arbitools.el: Fix checkdoc warnings and quoting problems

* arbitools/arbitools.el (arbitools-update, arbitools-add)
(arbitools-standings): Fix obvious quoting problems.  Add docstring.
(arbitools-mode): Use a more conventional mode-name.
---
 packages/arbitools/arbitools.el |   38 +++---
 1 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/packages/arbitools/arbitools.el b/packages/arbitools/arbitools.el
index 541c20f..7f2a4de 100644
--- a/packages/arbitools/arbitools.el
+++ b/packages/arbitools/arbitools.el
@@ -27,19 +27,19 @@
 ;; USAGE:
 ;; ---
 ;; arbitools.el is an interface for the pythong package "arbitools",
-;; designed to manage chess tournament reports. If you don't install the
+;; designed to manage chess tournament reports.  If you don't install the
 ;; python package you can still have the syntax colouring.
 ;;
 ;; FEATURES:
 ;; 
-;; - Syntax colouring for the official trf FIDE files. This facilitates
+;; - Syntax colouring for the official trf FIDE files.  This facilitates
 ;; manual edition of the files.
 ;;
-;; - Updating the players ratings. By means of the function arbitools-update
+;; - Updating the players ratings.  By means of the function arbitools-update
 ;;
-;; - Adding players to an existing file. By arbitools-add
+;; - Adding players to an existing file.  By arbitools-add
 ;;
-;; - Getting standings and report files from a tournament file. By
+;; - Getting standings and report files from a tournament file.  By
 ;;   arbitools-standings.
 ;;
 ;; You will find more information in www.ourenxadrez.org/arbitools.htm
@@ -47,17 +47,33 @@
 ;;; Code:
 
 (defun arbitools-update (list)
+  "Update the players ratings."
   (interactive "slist:")
-  (shell-command (concat "arbitools-update.py" " -l " list  " -i " 
buffer-file-name)))
+  ;; FIXME: What if `list' is "foo; bar"?
+  ;; FIXME: Do we really need a shell here?
+  ;; Why not use just call-process, so we don't need to worry about quoting?
+  (shell-command (concat "arbitools-update.py -l " list  " -i "
+ (shell-quote-argument buffer-file-name
 
 (defun arbitools-add (addfile)
+  "Add players to an existing file."
+  ;; FIXME: is `addfile' a file?  If o, then use "f" rather than "s", else
+  ;; better give it another name!
   (interactive "saddfile: ")
-  (shell-command (concat "arbitools-add.py" " -a " addfile " -i " 
buffer-file-name)))
+  ;; FIXME: What if `addlist' is "foo; bar"?
+  ;; FIXME: Do we really need a shell here?
+  ;; Why not use just call-process, so we don't need to worry about quoting?
+  (shell-command (concat "arbitools-add.py -a " addfile " -i "
+ (shell-quote-argument buffer-file-name
 
 (defun arbitools-standings ()
+  "Get standings and report files from a tournament file."
   (interactive)
   ;; (shell-command (concat (expand-file-name "arbitools-standings.py") " -i " 
buffer-file-name))) ;this is to use the actual path
-  (shell-command (concat "arbitools-standings.py" " -i " buffer-file-name)))
+  ;; FIXME: Do we really need a shell here?
+  ;; Why not use just call-process, so we don't need to worry about quoting?
+  (shell-command (concat "arbitools-standings.py -i "
+ (shell-quote-argument buffer-file-name
 
 (defvar arbitools-highlights
  '(("^001" . font-lock-function-name-face) ;name of the tournament
@@ -124,8 +140,8 @@
 ;;;###autoload
 (define-derived-mode arbitools-mode
   fundamental-mode
-  "arbitools-mode"
-  "Major mode for Chess Tournament Management"
+  "Arbitools"
+  "Major mode for Chess Tournament Management."
   ;(setq font-lock-defaults '(arbitools-highlights))
   (set (make-local-variable 'font-lock-defaults) '(arbitools-highlights)))
 
@@ -134,4 +150,4 @@
 
 (provide 'arbitools)
 
-;;; arbitools.el end here
+;;; arbitools.el ends here



[elpa] master 6c284f2: Update copyright exceptions

2016-02-23 Thread Stefan Monnier
branch: master
commit 6c284f20011e37080319e9a7cc33e1622e6a9e74
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

Update copyright exceptions
---
 copyright_exceptions |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/copyright_exceptions b/copyright_exceptions
index 45857d0..272d7ac 100644
--- a/copyright_exceptions
+++ b/copyright_exceptions
@@ -60,6 +60,7 @@
 ./auctex/style/virtex.el
 ./auctex/tex-fold.el:("(C)" ("copyright"))
 ./auctex/tex-info.el:   '("copyright" nil)
+./debbugs/debbugs-gnu.el:(insert "  Copyright-paperwork-exempt: yes"))
 ./ergoemacs-mode/ergoemacs-advices.el: emacs-copyright
 ./ergoemacs-mode/ergoemacs-themes.el: ,(lambda () 
emacs-copyright)
 ./gnugo/gnugo.el:(CP "Copyright"   game  simpletext)



[elpa] master d9d7229: * sed-mode: New package

2016-02-25 Thread Stefan Monnier
branch: master
commit d9d7229875019ea5d97e227af18908a49a432252
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* sed-mode: New package
---
 packages/company/company-nxml.el|8 ++--
 packages/company/company.el |5 -
 packages/gnome-c-style/gnome-c-tests.el |2 ++
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/packages/company/company-nxml.el b/packages/company/company-nxml.el
index 70e1c09..c405d2e 100644
--- a/packages/company/company-nxml.el
+++ b/packages/company/company-nxml.el
@@ -1,6 +1,6 @@
 ;;; company-nxml.el --- company-mode completion back-end for nxml-mode
 
-;; Copyright (C) 2009-2011, 2013  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2013, 2016  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -123,6 +123,10 @@
 (defun company-nxml (command  arg  ignored)
   "`company-mode' completion back-end for `nxml-mode'."
   (interactive (list 'interactive))
+  (if (fboundp 'rng-completion-at-point)
+  ;; In recent Emacsen, nXML provides a good CAPF completion, so we can
+  ;; disable our own implementation.
+  nil
   (cl-case command
 (interactive (company-begin-backend 'company-nxml))
 (prefix (or (company-nxml-tag 'prefix)
@@ -136,7 +140,7 @@
  ((company-nxml-attribute-value 'prefix)
   (sort (company-nxml-attribute-value 'candidates arg)
 'string<
-(sorted t)))
+(sorted t
 
 (provide 'company-nxml)
 ;;; company-nxml.el ends here
diff --git a/packages/company/company.el b/packages/company/company.el
index ce0b5a4..7f55625 100644
--- a/packages/company/company.el
+++ b/packages/company/company.el
@@ -1,6 +1,6 @@
 ;;; company.el --- Modular text completion framework  -*- lexical-binding: t 
-*-
 
-;; Copyright (C) 2009-2015  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2016  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 ;; Maintainer: Dmitry Gutov <dgu...@yandex.ru>
@@ -318,6 +318,9 @@ This doesn't include the margins and the scroll bar."
 (defcustom company-backends `(,@(unless (version< "24.3.50" emacs-version)
   (list 'company-elisp))
   company-bbdb
+  ;; FIXME: We could use a version-test to exclude
+  ;; company-nxml, but we don't know yet if that
+  ;; version will be called 25.2 or 26.1.
   company-nxml company-css
   company-eclim company-semantic company-clang
   company-xcode company-ropemacs company-cmake
diff --git a/packages/gnome-c-style/gnome-c-tests.el 
b/packages/gnome-c-style/gnome-c-tests.el
index 17dbfe1..2c1e220 100644
--- a/packages/gnome-c-style/gnome-c-tests.el
+++ b/packages/gnome-c-style/gnome-c-tests.el
@@ -282,3 +282,5 @@ G_DECLARE_FINAL_TYPE (GGpgEngineInfo, g_gpg_engine_info, 
G_GPG, ENGINE_INFO,
   (should (equal class '("Gpg" "Engine" "Info")))
   (should (equal parent-package nil))
   (should (equal parent-class nil)
+
+;;; gnome-c-tests.el ends here



[elpa] master 1b6b981: Revert last botched commit

2016-02-25 Thread Stefan Monnier
branch: master
commit 1b6b9819a790e8a7ebe0e56507b276190e77b277
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

Revert last botched commit
---
 packages/company/company-nxml.el|8 ++--
 packages/company/company.el |5 +
 packages/gnome-c-style/gnome-c-tests.el |2 --
 3 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/packages/company/company-nxml.el b/packages/company/company-nxml.el
index c405d2e..70e1c09 100644
--- a/packages/company/company-nxml.el
+++ b/packages/company/company-nxml.el
@@ -1,6 +1,6 @@
 ;;; company-nxml.el --- company-mode completion back-end for nxml-mode
 
-;; Copyright (C) 2009-2011, 2013, 2016  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2013  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -123,10 +123,6 @@
 (defun company-nxml (command  arg  ignored)
   "`company-mode' completion back-end for `nxml-mode'."
   (interactive (list 'interactive))
-  (if (fboundp 'rng-completion-at-point)
-  ;; In recent Emacsen, nXML provides a good CAPF completion, so we can
-  ;; disable our own implementation.
-  nil
   (cl-case command
 (interactive (company-begin-backend 'company-nxml))
 (prefix (or (company-nxml-tag 'prefix)
@@ -140,7 +136,7 @@
  ((company-nxml-attribute-value 'prefix)
   (sort (company-nxml-attribute-value 'candidates arg)
 'string<
-(sorted t
+(sorted t)))
 
 (provide 'company-nxml)
 ;;; company-nxml.el ends here
diff --git a/packages/company/company.el b/packages/company/company.el
index 7f55625..ce0b5a4 100644
--- a/packages/company/company.el
+++ b/packages/company/company.el
@@ -1,6 +1,6 @@
 ;;; company.el --- Modular text completion framework  -*- lexical-binding: t 
-*-
 
-;; Copyright (C) 2009-2016  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2015  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 ;; Maintainer: Dmitry Gutov <dgu...@yandex.ru>
@@ -318,9 +318,6 @@ This doesn't include the margins and the scroll bar."
 (defcustom company-backends `(,@(unless (version< "24.3.50" emacs-version)
   (list 'company-elisp))
   company-bbdb
-  ;; FIXME: We could use a version-test to exclude
-  ;; company-nxml, but we don't know yet if that
-  ;; version will be called 25.2 or 26.1.
   company-nxml company-css
   company-eclim company-semantic company-clang
   company-xcode company-ropemacs company-cmake
diff --git a/packages/gnome-c-style/gnome-c-tests.el 
b/packages/gnome-c-style/gnome-c-tests.el
index 2c1e220..17dbfe1 100644
--- a/packages/gnome-c-style/gnome-c-tests.el
+++ b/packages/gnome-c-style/gnome-c-tests.el
@@ -282,5 +282,3 @@ G_DECLARE_FINAL_TYPE (GGpgEngineInfo, g_gpg_engine_info, 
G_GPG, ENGINE_INFO,
   (should (equal class '("Gpg" "Engine" "Info")))
   (should (equal parent-package nil))
   (should (equal parent-class nil)
-
-;;; gnome-c-tests.el ends here



[elpa] master 6d0fecb: * sed-mode: New package

2016-02-25 Thread Stefan Monnier
branch: master
commit 6d0fecb89385c58cf4dd83237a4ca9e9afe9babe
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* sed-mode: New package
---
 packages/sed-mode/sed-mode.el |  139 +
 1 files changed, 139 insertions(+), 0 deletions(-)

diff --git a/packages/sed-mode/sed-mode.el b/packages/sed-mode/sed-mode.el
new file mode 100644
index 000..ba29bc5
--- /dev/null
+++ b/packages/sed-mode/sed-mode.el
@@ -0,0 +1,139 @@
+;;; sed-mode.el --- Major mode to edit sed scripts  -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2016  Free Software Foundation, Inc.
+
+;; Author: Stefan Monnier <monn...@iro.umontreal.ca>
+;; Version: 0
+;; Keywords:
+
+;; 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:
+
+;; If you need this major mode, you might also want to
+;; consider spending some time with `M-x doctor'.
+
+;;; Code:
+
+(require 'cl-lib)
+(require 'smie)
+
+(defgroup sed-mode nil
+  "Major mode to edit sed code."
+  :group 'programming)
+
+
+(defvar sed-mode-syntax-table
+  (let ((st (make-syntax-table)))
+(modify-syntax-entry ?# "<" st)
+(modify-syntax-entry ?\n ">" st)
+(modify-syntax-entry ?\\ "." st)
+st))
+
+(defconst sed-commands ":=aiqQrRbcdDhHgGlnNpPstTwWxy")
+
+(eval-and-compile
+  (defconst sed-command-prefix-regexp "\\(?:^\\|[$/0-9;]\\)[ \t]*")
+  (defconst sed-address-prefix-regexp "\\(?:^\\|[,;]\\)[ \t]*"))
+
+(defconst sed-label-regexp "[[:alnum:]]+")
+
+(defun sed-syntax-propertize (beg end)
+  (goto-char beg)
+  (sed-syntax-propertize-string end)
+  (funcall
+   (syntax-propertize-rules
+("$"
+ (0 (unless (nth 8 (save-excursion (syntax-ppss (match-beginning 0
+  (put-text-property (match-beginning 0) (match-end 0)
+ 'syntax-table (string-to-syntax "|"))
+  (sed-syntax-propertize-string end)
+  nil)))
+((concat "\\(?:" sed-address-prefix-regexp
+ "\\(?:\\(?1:/\\)\\|\\(?1:.\\)\\)"
+ "\\|" sed-command-prefix-regexp "[sy]\\(?1:.\\)"
+ "\\)")
+ (0 (unless (nth 8 (save-excursion (syntax-ppss (match-beginning 0
+  (put-text-property (match-beginning 1) (match-end 1)
+ 'syntax-table (string-to-syntax "\""))
+  (sed-syntax-propertize-string end)
+  nil
+   (point) end))
+
+(defun sed-syntax-propertize-string (end)
+  (let* ((ppss (syntax-ppss))
+ (c (nth 3 ppss)))
+(when c
+  (let ((count (cond
+((or (eq c t)
+ (not (memq (char-before (nth 8 ppss)) '(?s ?y
+ 1)
+(t 2
+(goto-char (1+ (nth 8 ppss)))
+(when (re-search-forward
+   (if (eq c t) "[^\\]\n" (regexp-quote (string c)))
+   end 'move count)
+  (put-text-property (1- (match-end 0)) (match-end 0)
+ 'syntax-table
+ (if (eq c t) (string-to-syntax "|")
+   (string-to-syntax "\""
+
+(defun sed--font-lock-command (cmd)
+  (unless (nth 8 (syntax-ppss))
+(pcase cmd
+  (?: (if (looking-at (concat "[   ]*\\(" sed-label-regexp "\\)"))
+  (put-text-property (match-beginning 1) (match-end 1) 'face
+ font-lock-function-name-face)))
+  ((or ?b ?t ?T)
+   (if (looking-at (concat "[  ]*\\(" sed-label-regexp "\\)"))
+   (put-text-property (match-beginning 1) (match-end 1) 'face
+  font-lock-constant-face
+font-lock-keyword-face))
+
+(defconst sed-font-lock-keywords
+  `((,(concat sed-command-prefix-regexp "\\([" sed-commands "]\\)")
+ (1 (sed--font-lock-command (char-after (match-beginning 1)))
+
+(defconst sed-smie-grammar nil)
+
+(defun sed-smie-rules (kind token)
+  (pcase (cons kind token)
+(`(:list-intro . ,_) t)
+))
+
+;;;###autoload (add-to-list 'auto-mode-alist '("\\.sed\\'" . sed-mode))
+
+;;;###autoload
+(defin

[elpa] master 6a92042: * sed-mode/sed-mode.el: Bump up version for first release

2016-02-26 Thread Stefan Monnier
branch: master
commit 6a92042cf61d42328724eaa6bfef7bd334b138c3
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* sed-mode/sed-mode.el: Bump up version for first release

(interpreter-mode-alist): Register ourselves.
---
 packages/sed-mode/sed-mode.el |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/packages/sed-mode/sed-mode.el b/packages/sed-mode/sed-mode.el
index ba29bc5..1b35c7a 100644
--- a/packages/sed-mode/sed-mode.el
+++ b/packages/sed-mode/sed-mode.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2016  Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <monn...@iro.umontreal.ca>
-;; Version: 0
+;; Version: 1.0
 ;; Keywords:
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -113,6 +113,7 @@
 ))
 
 ;;;###autoload (add-to-list 'auto-mode-alist '("\\.sed\\'" . sed-mode))
+;;;###autoload (add-to-list 'interpreter-mode-alist '("sed" . sed-mode))
 
 ;;;###autoload
 (define-derived-mode sed-mode prog-mode "Sed"



[elpa] master e3a5dbc: * sisu-mode/sisu-mode.el: Clean up name space, clear sisu-mode-hook

2016-02-22 Thread Stefan Monnier
branch: master
commit e3a5dbc1017bf96b74358c67f697bb06ef9b7ca3
Author: Ralph Amissah <ralph.amis...@gmail.com>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* sisu-mode/sisu-mode.el: Clean up name space, clear sisu-mode-hook

* sisu-mode/sisu-mode.el (sisu-general-font-lock-*): Rename from
general-font-lock-* to obey the package-prefix convention.
(sisu-font-lock-keywords): Adjust accordingly.
(sisu-mode-hook): Don't add outline-minor-mode.
(sisu-mode): Call it here instead.
---
 packages/sisu-mode/sisu-mode.el |  233 ++
 1 files changed, 110 insertions(+), 123 deletions(-)

diff --git a/packages/sisu-mode/sisu-mode.el b/packages/sisu-mode/sisu-mode.el
index b519e08..6bfbb4b 100644
--- a/packages/sisu-mode/sisu-mode.el
+++ b/packages/sisu-mode/sisu-mode.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2011, 2016  Free Software Foundation, Inc.
 
 ;; Author: Ralph Amissah & Ambrose Kofi Laing
-;; Note: The "Maintainer:" field below should hold a valid email address!
 ;; Maintainer: Ralph Amissah <ralph.amis...@gmail.com>
 ;; Keywords: text, syntax, processes, tools
 ;; Version:   7.1.8
@@ -112,20 +111,19 @@
 (defvar sisu-title-3 'sisu-title-3-face)
 (defvar sisu-title-4 'sisu-title-4-face)
 
-;;; FIXME: These variable should use the "sisu-" prefix.
-(defvar general-font-lock-red1 font-lock-warning-face)
-(defvar general-font-lock-red2 font-lock-comment-face)
-(defvar general-font-lock-red3 font-lock-string-face)
+(defvar sisu-general-font-lock-red1 font-lock-warning-face)
+(defvar sisu-general-font-lock-red2 font-lock-comment-face)
+(defvar sisu-general-font-lock-red3 font-lock-string-face)
 
-(defvar general-font-lock-green1 font-lock-type-face)
-(defvar general-font-lock-green2 font-lock-constant-face)
+(defvar sisu-general-font-lock-green1 font-lock-type-face)
+(defvar sisu-general-font-lock-green2 font-lock-constant-face)
 
-(defvar general-font-lock-blue1 font-lock-keyword-face)
-(defvar general-font-lock-blue2 font-lock-function-name-face)
-(defvar general-font-lock-blue3 font-lock-builtin-face)
+(defvar sisu-general-font-lock-blue1 font-lock-keyword-face)
+(defvar sisu-general-font-lock-blue2 font-lock-function-name-face)
+(defvar sisu-general-font-lock-blue3 font-lock-builtin-face)
 
-(defvar general-font-lock-yellow1 font-lock-variable-name-face)
-(defvar general-font-lock-yellow2 font-lock-comment-face)
+(defvar sisu-general-font-lock-yellow1 font-lock-variable-name-face)
+(defvar sisu-general-font-lock-yellow2 font-lock-comment-face)
 
 ;; == sisu-mode settings
 
@@ -140,21 +138,21 @@
   (eval-when-compile
 (list
   ;;grouped text -
-  ;(cons "^```[ ]code\\(.\\|\n\\)+?\n```\n"  'general-font-lock-red2)
-  (cons "^```[ ]+code.*?$\\|^```$"  'general-font-lock-red2)
-  (cons "^```[ ]+table.*?$\\|^```$" 'general-font-lock-red2)
-  (cons "^```[ ]+group$\\|^```$"'general-font-lock-red2)
-  (cons "^```[ ]+block$\\|^```$"'general-font-lock-red2)
-  (cons "^```[ ]+poem$\\|^```$" 'general-font-lock-red2)
-  (cons "^```[ ]+alt$\\|^```$"  'general-font-lock-red2)
+  ;(cons "^```[ ]code\\(.\\|\n\\)+?\n```\n"  
'sisu-general-font-lock-red2)
+  (cons "^```[ ]+code.*?$\\|^```$"  'sisu-general-font-lock-red2)
+  (cons "^```[ ]+table.*?$\\|^```$" 'sisu-general-font-lock-red2)
+  (cons "^```[ ]+group$\\|^```$"'sisu-general-font-lock-red2)
+  (cons "^```[ ]+block$\\|^```$"'sisu-general-font-lock-red2)
+  (cons "^```[ ]+poem$\\|^```$" 'sisu-general-font-lock-red2)
+  (cons "^```[ ]+alt$\\|^```$"  'sisu-general-font-lock-red2)
   ;;grouped text -
-  (cons "^group{\\|^}group"   'general-font-lock-red2)
-  (cons "^block{\\|^}block"   'general-font-lock-red2)
-  (cons "^code{\\|^}code" 'general-font-lock-red2)
-  (cons "^poem{\\|^}poem" 'general-font-lock-red2)
-  (cons "^alt{\\|^}alt"   'general-font-lock-red2)
-  (cons "^table{.+\\|^}table" 'general-font-lock-red2)
-  (cons "^{table[^}]+}"   'general-font-lock-red2)
+  (cons "^group{\\|^}group"   'sisu-general-font-lock-red2)
+  (cons "^block{\\|^}block"   'sisu-general-font-lock-red2)
+  (cons "^code{\\|^}code" 'sisu-general-font-lock-red2)
+  (cons "^poem{\\|^}poem" 'sisu-general-font-lock-red2)
+  (cons "^alt{\\|^}alt"   'sisu-general-font-lock-red2)
+  (cons "^table{.+\\|^}table" 'sisu-general-font-lock-red2)
+  (cons "^{table[^}]+}"   'sisu-general-font-lock-red2)
 
   (list
 (concat
@@ -162,9 +160,9 @@
   

[elpa] master 1f8bb1b: * packages/gnome-c-style/gnome-c-tests.el: Add copyright blurb

2016-01-21 Thread Stefan Monnier
branch: master
commit 1f8bb1b5f88d22a60a7a36c55b829e42c4b5f633
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* packages/gnome-c-style/gnome-c-tests.el: Add copyright blurb
---
 admin/archive-contents.el  |   13 
 packages/ada-mode/ada-mode.el  |4 +-
 packages/dts-mode/dts-mode.el  |4 ++-
 .../f90-interface-browser/f90-interface-browser.el |   32 ++-
 packages/hydra/hydra.el|2 +
 packages/js2-mode/js2-mode.el  |   11 ++-
 packages/lex/lex.el|   10 +-
 packages/on-screen/on-screen.el|2 +-
 packages/wisi/wisi-compile.el  |   17 ++
 packages/ztree/ztree-diff-model.el |8 -
 packages/ztree/ztree-view.el   |   15 -
 11 files changed, 67 insertions(+), 51 deletions(-)

diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index b63f4cd..8f054ad 100755
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -622,12 +622,13 @@ If WITH-CORE is non-nil, it means we manage :core 
packages as well."
 ;; Not under version control.  Check if it only contains
 ;; symlinks and generated files, in which case it is probably
 ;; a leftover :core package that can safely be deleted.
-(let ((file (archive--find-non-trivial-file dir)))
-  (if file
-  (message "Keeping %s for non-trivial file \"%s\"" dir file)
-(progn
-  (message "Deleted untracked package %s" dir)
-  (delete-directory dir 'recursive t)
+;; (let ((file (archive--find-non-trivial-file dir)))
+;;   (if file
+;;   (message "Keeping %s for non-trivial file \"%s\"" dir file)
+;; (progn
+;;   (message "Deleted untracked package %s" dir)
+;;   (delete-directory dir 'recursive t
+)
 
 (defun archive--external-package-sync (name)
   "Sync external package named NAME."
diff --git a/packages/ada-mode/ada-mode.el b/packages/ada-mode/ada-mode.el
index 3fca118..8fb112a 100644
--- a/packages/ada-mode/ada-mode.el
+++ b/packages/ada-mode/ada-mode.el
@@ -2598,8 +2598,8 @@ If POSTFIX and JUSTIFY are non-nil, 
`ada-fill-comment-postfix' is appended
 to each line filled and justified.
 The paragraph is indented on the first line."
   (interactive "P")
-  (if (and (not (ada-in-comment-p))
-  (not (looking-at "[ \t]*--")))
+  (if (not (or (ada-in-comment-p)
+   (looking-at "[ \t]*--")))
   (error "Not inside comment"))
 
   ;; fill-region-as-paragraph leaves comment text exposed (without
diff --git a/packages/dts-mode/dts-mode.el b/packages/dts-mode/dts-mode.el
index 99aff26..e1ce4fd 100644
--- a/packages/dts-mode/dts-mode.el
+++ b/packages/dts-mode/dts-mode.el
@@ -163,7 +163,9 @@
   (dts--using-macro syntax-propertize-rules
 (set (make-local-variable 'syntax-propertize-function)
  (syntax-propertize-rules
-  ("#include[ \t]+\\(<\\).*\\(>\\)" (1 "|") (2 "|")
+  ("#include[ \t]+\\(<\\).*\\(>\\)" (1 "|") (2 "|"))
+  ;; Treat things like /delete-property/ as a single identifier.
+  ("\\(/\\)[a-z]+\\(/\\)" (1 "_") (2 "_")
   (if dts-use-smie
   (smie-setup dts-grammar #'dts-indent-rules)
 (set (make-local-variable 'indent-line-function) #'dts-indent-line)))
diff --git a/packages/f90-interface-browser/f90-interface-browser.el 
b/packages/f90-interface-browser/f90-interface-browser.el
index d499ba0..8113a8b 100644
--- a/packages/f90-interface-browser/f90-interface-browser.el
+++ b/packages/f90-interface-browser/f90-interface-browser.el
@@ -1,6 +1,6 @@
 ;;; f90-interface-browser.el --- Parse and browse f90 interfaces
 
-;; Copyright (C) 2011, 2012, 2013, 2014  Free Software Foundation, Inc
+;; Copyright (C) 2011, 2012, 2013, 2014, 2015  Free Software Foundation, Inc
 
 ;; Author: Lawrence Mitchell <we...@gmx.li>
 ;; Created: 2011-07-06
@@ -272,7 +272,8 @@ an alphanumeric character."
   (loop for file in (directory-files dir t
  (rx-to-string
   `(and "." (or ,@f90-file-extensions)
-eos) t))
+eos)
+  t))
 do (f90-parse-interfaces file f90-all-interfaces)))
 
 (defun f90-find-tag-interface (name  match-sublist)
@@ -530,11 +531,11 @@ default is the type of the variable."
   "UNION

[elpa] master c0e5823: Fix maintainer address

2016-01-25 Thread Stefan Monnier
branch: master
commit c0e5823c5b1cbc08f20527ffb8522d6030b5a54c
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

Fix maintainer address
---
 packages/ioccur/ioccur.el |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/packages/ioccur/ioccur.el b/packages/ioccur/ioccur.el
index 521d3de..aa2b23d 100644
--- a/packages/ioccur/ioccur.el
+++ b/packages/ioccur/ioccur.el
@@ -1,8 +1,8 @@
 ;;; ioccur.el --- Incremental occur
 
-;; Copyright (C) 2010-2013  Free Software Foundation, Inc.
+;; Copyright (C) 2010-2013, 2016  Free Software Foundation, Inc.
 
-;; Author: Thierry Volpiatto 
+;; Author: Thierry Volpiatto <thierry.volpia...@gmail.com>
 ;; X-URL: https://github.com/thierryvolpiatto/ioccur
 ;; Version: 2.4
 ;; Compatibility: GNU Emacs >=22.3



[elpa] master ad2214a: * sm-c-mode/sm-c-mode.el (sm-c-smie-rules): Improve indent of enum's {...}

2016-01-25 Thread Stefan Monnier
branch: master
commit ad2214a5ea10ea8d5e5075bc0a518d9c474321d6
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* sm-c-mode/sm-c-mode.el (sm-c-smie-rules): Improve indent of enum's {...}
---
 packages/sm-c-mode/sm-c-mode.el |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/packages/sm-c-mode/sm-c-mode.el b/packages/sm-c-mode/sm-c-mode.el
index a643829..54b9a54 100644
--- a/packages/sm-c-mode/sm-c-mode.el
+++ b/packages/sm-c-mode/sm-c-mode.el
@@ -640,6 +640,16 @@ if INNER is non-nil, it stops at the innermost one."
   0
 (funcall smie-rules-function :elem 'basic))
   (smie-indent-virtual
+  ((and (member tok '("enum" "struct"))
+;; Make sure that the {...} is about this struct/enum, as
+;; opposed to "struct foo *get_foo () {...}"!
+(save-excursion
+  (smie-indent-forward-token)
+  (smie-indent-forward-token)
+  (forward-comment (point-max))
+  (>= (point) pos)))
+   `(column . ,(+ (funcall smie-rules-function :elem 'basic)
+  (smie-indent-virtual
   ((or (member tok sm-c-paren-block-keywords)
(equal tok "do"))
nil)



[elpa] master 3790777: * ztree/ztree-diff-model.el (ztree-diff-node): Use cl-defstruct

2016-01-24 Thread Stefan Monnier
branch: master
commit 37907778d2266ea80e079d015c26281195f6b30b
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* ztree/ztree-diff-model.el (ztree-diff-node): Use cl-defstruct

(ztree-diff-model-partial-rescan, ztree-diff-model-subtree)
(ztree-diff-node-update-diff-from-children, )
(ztree-diff-node-traverse):
* ztree/ztree-diff.el (ztree-diff-copy-file, ztree-diff-copy-dir)
(ztree-diff-delete-file): Adjust accordingly.
* ztree/ztree-dir.el (ztree-dir): Don't quote lambda.
* ztree/ztree.el: Fix up maintainer address.  Add cl-lib dependency.
* ztree/ztree-util.el (ztree-defrecord): Delete.
---
 packages/ztree/ztree-diff-model.el |   72 ++-
 packages/ztree/ztree-diff.el   |   22 ++-
 packages/ztree/ztree-dir.el|   14 +++---
 packages/ztree/ztree-util.el   |   64 +---
 packages/ztree/ztree-view.el   |8 ++-
 packages/ztree/ztree.el|5 +-
 6 files changed, 65 insertions(+), 120 deletions(-)

diff --git a/packages/ztree/ztree-diff-model.el 
b/packages/ztree/ztree-diff-model.el
index e8fa4d9..f0b4e4a 100644
--- a/packages/ztree/ztree-diff-model.el
+++ b/packages/ztree/ztree-diff-model.el
@@ -31,6 +31,7 @@
 
 ;;; Code:
 (require 'ztree-util)
+(eval-when-compile (require 'cl-lib))
 
 (defvar ztree-diff-model-wait-message nil
   "Message showing while constructing the diff tree.")
@@ -54,7 +55,16 @@
 ;; short-name - is the file or directory name
 ;; children - list of nodes - files or directories if the node is a directory
 ;; different = {nil, 'new, 'diff} - means comparison status
-(ztree-defrecord ztree-diff-node (parent left-path right-path short-name 
right-short-name children different))
+(cl-defstruct (ztree-diff-node
+   (:constructor)
+   (:constructor ztree-diff-node-create
+(parent left-path right-path
+different
+ (short-name (ztree-file-short-name
+  (or left-path right-path)))
+(right-short-name (ztree-file-short-name
+   (or right-path left-path))
+  parent left-path right-path short-name right-short-name children different)
 
 (defun ztree-diff-model-ignore-p (node)
   "Determine if the NODE should be excluded from comparison results."
@@ -126,6 +136,9 @@ RIGHT if only on the right side."
   "Return FILE as the local file name."
   ;; FIXME: We shouldn't use internal Tramp functions.
   (require 'tramp)
+  (declare-function tramp-tramp-file-p "tramp" (name))
+  (declare-function tramp-file-name-localname "tramp" (vec))
+  (declare-function tramp-dissect-file-name "tramp" (name  nodefault))
   (if (not (tramp-tramp-file-p file))
   file
 (tramp-file-name-localname (tramp-dissect-file-name file
@@ -167,18 +180,17 @@ Filters out . and .."
(file-exists-p left)
(file-exists-p right))
   (if isdir
-  (let ((traverse (ztree-diff-node-traverse
-   node
-   left
-   right)))
-(ztree-diff-node-set-different node (car traverse))
-(ztree-diff-node-set-children node (cdr traverse)))
+(let ((traverse (ztree-diff-node-traverse
+ node
+ left
+ right)))
+  (setf (ztree-diff-node-different node) (car traverse))
+  (setf (ztree-diff-node-children node) (cdr traverse)))
 ;; node is a file
-(ztree-diff-node-set-different
- node
- (if (ztree-diff-model-files-equal left right)
- nil
-   'diff))
+(setf (ztree-diff-node-different node)
+  (if (ztree-diff-model-files-equal left right)
+  nil
+'diff))
 
 (defun ztree-diff-model-subtree (parent path side)
   "Create a subtree with given PARENT for the given PATH.
@@ -191,20 +203,14 @@ Argument SIDE either 'left or 'right side."
 parent
 (when (eq side 'left) file)
 (when (eq side 'right) file)
-(ztree-file-short-name file)
-(ztree-file-short-name file)
-nil
 'new))
  (children (ztree-diff-model-subtree node file side)))
-(ztree-diff-node-set-children node children)
+(setf (ztree-diff-node-children node) children)
 (push node result))
 (push (ztree-diff-node-create
parent
(when (eq side 'left) file)
(when (eq side 'right) file)
-   (ztree-file-short-name

[elpa] master 2da8923: Fix maintainer address

2016-01-24 Thread Stefan Monnier
branch: master
commit 2da89232f200f6d390c89d73c1dece3fc3ff9256
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

Fix maintainer address
---
 packages/websocket/websocket.el |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/packages/websocket/websocket.el b/packages/websocket/websocket.el
index c42f2cc..1b0b294 100644
--- a/packages/websocket/websocket.el
+++ b/packages/websocket/websocket.el
@@ -1,9 +1,8 @@
 ;;; websocket.el --- Emacs WebSocket client and server
 
-;; Copyright (c) 2013  Free Software Foundation, Inc.
+;; Copyright (c) 2013, 2016  Free Software Foundation, Inc.
 
-;; Author: Andrew Hyatt 
-;; Maintainer: Andrew Hyatt 
+;; Author: Andrew Hyatt <ahy...@gmail.com>
 ;; Keywords: Communication, Websocket, Server
 ;; Version: 1.5
 ;;



[elpa] master 7dece2c: * packages/sisu-mode/sisu-mode.el: Update to 7.1.8

2016-02-21 Thread Stefan Monnier
branch: master
commit 7dece2c1976b6e38e371ddebc74420a5c537c9ec
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* packages/sisu-mode/sisu-mode.el: Update to 7.1.8

(sisu-font-lock-keywords): Reindent and improve.
(sisu-mode): Add outline-regexp.  Don't run sisu-mode-hook since
define-derived-mode already does it for us.
(sisu-mode-hook): Add outline-minor-mode to its default.
(auto-mode-alist): Use .ss[imt] extensions rather than .sisu.
---
 packages/sisu-mode/sisu-mode.el |  540 ---
 1 files changed, 335 insertions(+), 205 deletions(-)

diff --git a/packages/sisu-mode/sisu-mode.el b/packages/sisu-mode/sisu-mode.el
index 9d287f1..3a6aefd 100644
--- a/packages/sisu-mode/sisu-mode.el
+++ b/packages/sisu-mode/sisu-mode.el
@@ -1,16 +1,16 @@
 ;;; sisu-mode.el --- Major mode for SiSU markup text
 
-;; Copyright (C) 2011  Free Software Foundation, Inc.
+;; Copyright (C) 2011, 2016  Free Software Foundation, Inc.
 
-;; Author: Ambrose Kofi Laing (& Ralph Amissah)
-;; Keywords: text, processes, tools
-;; Version: 3.0.3
-;; License: GPLv3
-;; Home URL: SiSU:   http://www.jus.uio.no/sisu
+;; Author: Ralph Amissah & Ambrose Kofi Laing
+;; Keywords: text, syntax, processes, tools
+;; Version:   7.1.8
+;; URL: http://www.sisudoc.org/
 ;; originally looked at (based on) doc-mode, with kind permission of the author
 ;;   Author: SUN, Tong <suntong...@users.sf.net>, (c)2001-6, all right reserved
 ;;   Version: $Date: 2006/01/19 03:13:41 $ $Revision: 1.14 $
 ;;   Home URL: http://xpt.sourceforge.net/
+;; with contributions from Kevin Ryde and Stefan Monnier
 
 ;; 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
@@ -136,200 +136,328 @@
 (defconst sisu-font-lock-keywords
   (eval-when-compile
 (list
+  ;;grouped text -
+  ;(cons "^```[ ]code\\(.\\|\n\\)+?\n```\n"  'general-font-lock-red2)
+  (cons "^```[ ]+code.*?$\\|^```$"  'general-font-lock-red2)
+  (cons "^```[ ]+table.*?$\\|^```$" 'general-font-lock-red2)
+  (cons "^```[ ]+group$\\|^```$"'general-font-lock-red2)
+  (cons "^```[ ]+block$\\|^```$"'general-font-lock-red2)
+  (cons "^```[ ]+poem$\\|^```$" 'general-font-lock-red2)
+  (cons "^```[ ]+alt$\\|^```$"  'general-font-lock-red2)
+  ;;grouped text -
+  (cons "^group{\\|^}group"   'general-font-lock-red2)
+  (cons "^block{\\|^}block"   'general-font-lock-red2)
+  (cons "^code{\\|^}code" 'general-font-lock-red2)
+  (cons "^poem{\\|^}poem" 'general-font-lock-red2)
+  (cons "^alt{\\|^}alt"   'general-font-lock-red2)
+  (cons "^table{.+\\|^}table" 'general-font-lock-red2)
+  (cons "^{table[^}]+}"   'general-font-lock-red2)
+
+  (list
+(concat
+  "^\`\\{3\\}[ ]+code.*?$"
+  "\\(.\\|\n\\)+?"
+  "\`\\{3\\}$"
+)
+'(1 general-font-lock-red2 t)
+'(2 nil t)
+'(3 general-font-lock-red2 t)
+  )
+  (list
+(concat
+  "^\`\\{3\\}[ ]+table.*?$"
+  "\\(.\\|\n\\)+?"
+  "\`\\{3\\}$"
+)
+'(1 general-font-lock-red2 t)
+'(2 nil t)
+'(3 general-font-lock-red2 t)
+  )
+  (list
+(concat
+  "^\`\\{3\\}[ ]+\\(group\\|block\\|alt\\|poem\\)$"
+  "\\(.\\|\n\\)+?"
+  "^\`\\{3\\}$"
+)
+'(1 general-font-lock-red2 t)
+'(2 nil t)
+'(3 general-font-lock-red2 t)
+  )
+
+  ;; footnote/endnote 
+  ;(cons "\~{.+?}\~"  'general-font-lock-green1)
+  (cons "\~{\\*\\*\\|\~{\\*\\|\~{\\|}\~"   'general-font-lock-red2)
+  (cons "\~\\[\\+\\|\~\\[\\*\\|\~\\[\\|\\]\~"  'general-font-lock-red2)
+  (cons "\~\\^ \\|^\\^\~ " 'general-font-lock-red2)
+  (list
+(concat
+  "\\(\*\~\\)"
+  "\\([^ \r\t\n]+\\)"
+)
+'(1 general-font-lock-red1 t)
+'(2 general-font-lock-blue2 t)
+  )
+
+  ;; emphasis (can be program configured to be bold italics or underscore)
+  (list
+(concat
+  "\\([*]{\\)"
+  "\\([^}]+\\)"
+  "\\(}[*]\\)"
+)
+'(1 general-font-lock-red1 t)
+'(2 general-font-lock-red1 t)
+'(3 general-font-lock-red1 t)
+  )
+
+  ;; bold 
+  (list
+(concat
+  "\\([!]{\\)"
+  "\\([^}]+

[elpa] master a5f534b: * sisu-mode/sisu-mode.el: Fix Maintainer: address.

2016-02-21 Thread Stefan Monnier
branch: master
commit a5f534b09ab7750da41541524f0491254dcb8659
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* sisu-mode/sisu-mode.el: Fix Maintainer: address.
---
 packages/sisu-mode/sisu-mode.el |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/packages/sisu-mode/sisu-mode.el b/packages/sisu-mode/sisu-mode.el
index 3a6aefd..b519e08 100644
--- a/packages/sisu-mode/sisu-mode.el
+++ b/packages/sisu-mode/sisu-mode.el
@@ -3,6 +3,8 @@
 ;; Copyright (C) 2011, 2016  Free Software Foundation, Inc.
 
 ;; Author: Ralph Amissah & Ambrose Kofi Laing
+;; Note: The "Maintainer:" field below should hold a valid email address!
+;; Maintainer: Ralph Amissah <ralph.amis...@gmail.com>
 ;; Keywords: text, syntax, processes, tools
 ;; Version:   7.1.8
 ;; URL: http://www.sisudoc.org/
@@ -110,6 +112,7 @@
 (defvar sisu-title-3 'sisu-title-3-face)
 (defvar sisu-title-4 'sisu-title-4-face)
 
+;;; FIXME: These variable should use the "sisu-" prefix.
 (defvar general-font-lock-red1 font-lock-warning-face)
 (defvar general-font-lock-red2 font-lock-comment-face)
 (defvar general-font-lock-red3 font-lock-string-face)



[elpa] master 1f20594: * admin/archive-contents.el (archive--pull): New function

2016-03-19 Thread Stefan Monnier
branch: master
commit 1f20594738040cae975827f6456046ceb188c1ca
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* admin/archive-contents.el (archive--pull): New function

(archive--sync-emacs-repo, archive--external-package-sync): Use it.
---
 admin/archive-contents.el |   26 +-
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index 8f054ad..37b582d 100755
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -1,6 +1,6 @@
 ;;; archive-contents.el --- Auto-generate an Emacs Lisp package archive.  -*- 
lexical-binding:t -*-
 
-;; Copyright (C) 2011-2015  Free Software Foundation, Inc
+;; Copyright (C) 2011-2016  Free Software Foundation, Inc
 
 ;; Author: Stefan Monnier <monn...@iro.umontreal.ca>
 
@@ -556,6 +556,14 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
  packages)
 (archive--html-make-index archive-contents)))
 
+(defun archive--pull (dirname)
+  (let ((default-directory (file-name-as-directory
+(expand-file-name dirname
+(with-temp-buffer
+  (message "Running git pull in %S" default-directory)
+  (call-process "git" nil t nil "pull")
+  (message "Updated %s:\n%s" dirname (buffer-string)
+
 ;;; Maintain external packages.
 
 (defconst archive--elpa-git-url "git://git.sv.gnu.org/emacs/elpa")
@@ -574,10 +582,8 @@ Return non-nil if there's an \"emacs\" repository present."
 (if (not (file-directory-p emacs-repo-root))
 (progn (message "No \"emacs\" subdir: will skip :core packages")
nil)
-  (let ((default-directory emacs-repo-root))
-(message "Running git pull in %S" default-directory)
-(call-process "git" nil t nil "pull")
-t
+  (archive--pull emacs-repo-root)
+  t)))
 
 (defun archive--find-non-trivial-file (dir)
   (catch 'found-important-file
@@ -637,7 +643,7 @@ If WITH-CORE is non-nil, it means we manage :core packages 
as well."
(let* ((branch (concat "externals/" name))
   (output
(with-temp-buffer
- ;; FIXME: Use git-new-workdir!
+ ;; FIXME: Use `git worktree'!
  (call-process "git" nil t nil "clone"
"--reference" ".." "--single-branch"
"--branch" branch
@@ -646,13 +652,7 @@ If WITH-CORE is non-nil, it means we manage :core packages 
as well."
  (message "Cloning branch %s:\n%s" name output)))
   ((not (file-directory-p (concat name "/.git")))
(message "%s is in the way of an external, please remove!" name))
-  (t
-   (let ((default-directory (file-name-as-directory
- (expand-file-name name
- (with-temp-buffer
-   (message "Running git pull in %S" default-directory)
-   (call-process "git" nil t nil "pull")
-   (message "Updated %s:%s" name (buffer-string
+  (t (archive--pull name)
 
 (defun archive--core-package-empty-dest-p (dest)
   "Return non-nil if DEST is an empty variant."



[elpa] master 8f3c30e: * csv-mode, landmark: Fix maintainer's email

2016-03-03 Thread Stefan Monnier
branch: master
commit 8f3c30e535c6342fb42f31be35be8ebfb1adcf9e
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* csv-mode, landmark: Fix maintainer's email
---
 packages/csv-mode/csv-mode.el |4 ++--
 packages/landmark/landmark.el |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/packages/csv-mode/csv-mode.el b/packages/csv-mode/csv-mode.el
index 1e20f8c..909c10a 100644
--- a/packages/csv-mode/csv-mode.el
+++ b/packages/csv-mode/csv-mode.el
@@ -1,8 +1,8 @@
 ;;; csv-mode.el --- Major mode for editing comma/char separated values  -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2003, 2004, 2012, 2013, 2014, 2015  Free Software Foundation, 
Inc
+;; Copyright (C) 2003, 2004, 2012-2016  Free Software Foundation, Inc
 
-;; Author: Francis J. Wright 
+;; Author: "Francis J. Wright" <f.j.wri...@qmul.ac.uk>
 ;; Time-stamp: <23 August 2004>
 ;; URL: http://centaur.maths.qmul.ac.uk/Emacs/
 ;; Version: 1.5
diff --git a/packages/landmark/landmark.el b/packages/landmark/landmark.el
index f3b5b8c..6230dba 100644
--- a/packages/landmark/landmark.el
+++ b/packages/landmark/landmark.el
@@ -1,11 +1,11 @@
 ;;; landmark.el --- Neural-network robot that learns landmarks  -*- 
lexical-binding:t -*-
 
-;; Copyright (C) 1996-1997, 2000-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1997, 2000-2016 Free Software Foundation, Inc.
 
 ;; Author: Terrence Brannon (was: <bran...@rana.usc.edu>)
 ;; Created: December 16, 1996 - first release to usenet
 ;; Keywords: games, neural network, adaptive search, chemotaxis
-;; Maintainer: No maintainer - help wanted.
+;; Maintainer: emacs-de...@gnu.org
 ;; Version: 1.0
 
 ;; This file is part of GNU Emacs.



[elpa] master 5cf5b85: * csv-mode/csv-mode.el: Remove out-of-date "URL:" header.

2016-03-04 Thread Stefan Monnier
branch: master
commit 5cf5b85bd3205bfecb7a34926b33690d06c7d0b8
Author: Francis Wright <f.j.wri...@qmul.ac.uk>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* csv-mode/csv-mode.el: Remove out-of-date "URL:" header.
---
 packages/csv-mode/csv-mode.el |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/packages/csv-mode/csv-mode.el b/packages/csv-mode/csv-mode.el
index 909c10a..b61fe67 100644
--- a/packages/csv-mode/csv-mode.el
+++ b/packages/csv-mode/csv-mode.el
@@ -4,7 +4,6 @@
 
 ;; Author: "Francis J. Wright" <f.j.wri...@qmul.ac.uk>
 ;; Time-stamp: <23 August 2004>
-;; URL: http://centaur.maths.qmul.ac.uk/Emacs/
 ;; Version: 1.5
 ;; Keywords: convenience
 



[elpa] externals/auctex 7ba0a0e: * tex-buf.el: Address some compiler warnings

2016-04-01 Thread Stefan Monnier
branch: externals/auctex
commit 7ba0a0e131279761337350d67e0c65dc8025c1bf
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* tex-buf.el: Address some compiler warnings

Require `latex' since we refer to some of its variables.
Use #' to quote a function.  Use _ prefix for unused vars.
(TeX-current-process-region-p, TeX-save-query, TeX-parse-function)
(TeX-sentinel-function, TeX-sentinel-default-function)
(compilation-in-progress, TeX-current-page)
(TeX-error-overview-open-after-TeX-run, TeX-error-list)
(TeX-parse-all-errors, TeX-command-buffer, TeX-region): Declare before
the first use.
(TeX-command-text, TeX-command-pos): Declare as dyn-bound
(TeX-command-expand): Strength reduce `eval' to `symbol-name'.
(TeX-run-TeX): Use let*.
(TeX-sentinel-function, TeX-sentinel-default-function): Put something
in the function's body.
(TeX-TeX-sentinel-check): Check ConTeXt-Mark-version exists before
using it.  We could have (require 'context) instead.
(TeX-Biber-sentinel): Remove redundant `concat'.
(TeX-error-description-list): Move before first use.
(TeX-error-overview-mode-map): Remove unused var `menu-map'.
(TeX-output-revert-buffer): Remove unused var `command'.
---
 tex-buf.el |  393 
 1 files changed, 208 insertions(+), 185 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index 0d459cf..58e1602 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1,6 +1,6 @@
 ;;; tex-buf.el --- External commands for AUCTeX.
 
-;; Copyright (C) 1991-1999, 2001-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1991-1999, 2001-2016 Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-de...@gnu.org
 ;; Keywords: tex, wp
@@ -29,6 +29,7 @@
 ;;; Code:
 
 (require 'tex)
+(require 'latex)
 
 ;;; Customization:
 
@@ -259,6 +260,23 @@ at bottom if LINE is nil."
   ;; Should test for TeX background process here.
   (error "No TeX process to kill"
 
+;; FIXME: The vars below are defined in this file, but they're defined too
+;; far down (i.e. further down than their first use), so we have to pre-declare
+;; them here to explain it to the compiler.
+;; We should move those vars's definitions earlier instead!
+(defvar TeX-current-process-region-p)
+(defvar TeX-save-query)
+(defvar TeX-parse-function)
+(defvar TeX-sentinel-function)
+(defvar TeX-sentinel-default-function)
+(defvar compilation-in-progress)
+(defvar TeX-current-page)
+(defvar TeX-error-overview-open-after-TeX-run)
+(defvar TeX-error-list)
+(defvar TeX-parse-all-errors)
+(defvar TeX-command-buffer)
+(defvar TeX-region)
+
 (defun TeX-home-buffer ()
   "Go to the buffer where you last issued a TeX command.
 If there is no such buffer, or you already are in that buffer, find
@@ -320,7 +338,7 @@ This works only with TeX commands and if the
   (previous-error arg)
 
 (let ((parse-function (TeX-get-parse-function)))
-  (if (and TeX-parse-all-errors (equal parse-function 'TeX-parse-TeX))
+  (if (and TeX-parse-all-errors (equal parse-function #'TeX-parse-TeX))
  ;; When `TeX-parse-all-errors' is non-nil and the parsing function is
  ;; `TeX-parse-TeX' we can move backward in the errors.
  (TeX-parse-TeX (- arg) nil)
@@ -464,9 +482,9 @@ Run function `TeX-check-engine' to check the correct engine 
has
 been set."
   (TeX-check-engine name)
 
-  (cond ((eq file 'TeX-region-file)
+  (cond ((eq file #'TeX-region-file)
 (setq TeX-current-process-region-p t))
-   ((eq file 'TeX-master-file)
+   ((eq file #'TeX-master-file)
 (setq TeX-current-process-region-p nil)))
   (let ((command (TeX-command-expand (nth 1 (assoc name TeX-command-list))
 file))
@@ -509,18 +527,23 @@ remember to add /Library/TeX/texbin/ to your PATH"
 (TeX-process-set-variable file 'TeX-command-next TeX-command-Show)
 (funcall hook name command file)))
 
+(defvar TeX-command-text)   ;Dynamically scoped.
+(defvar TeX-command-pos);Dynamically scoped.
+
 (defun TeX-command-expand (command file  list)
   "Expand COMMAND for FILE as described in LIST.
 LIST default to `TeX-expand-list'.  As a special exception,
 `%%' can be used to produce a single `%' sign in the output
 without further expansion."
+  (defvar TeX-command-pos)
   (let (pat
-   pos
+   pos ;;FIXME: Should this be dynamically scoped?
entry TeX-command-text TeX-command-pos
+;; FIXME: This variable appears to be unused!
(file `(lambda ( args)
 (shell-quote-argument
  (concat (and (stringp TeX-command-pos) TeX-command-pos)
- (apply ',file args)
+ (apply #',file args)
  (and (stringp TeX-command-pos) TeX-command-pos)
 expansion-res cas

[elpa] master 3a57d2e: * packages/javaimp/javaimp.el (javaimp): Add a parent group

2016-04-21 Thread Stefan Monnier
branch: master
commit 3a57d2e04d1148386210166212892af4764e0e20
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* packages/javaimp/javaimp.el (javaimp): Add a parent group

(javaimp--maven-xml-load-tree): Fix reference to free var `project-elt`.
(javaimp-organize-imports): Use cl-lib name.
---
 packages/javaimp/javaimp.el |   17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/packages/javaimp/javaimp.el b/packages/javaimp/javaimp.el
index 7cd1e3e..a14d3da 100644
--- a/packages/javaimp/javaimp.el
+++ b/packages/javaimp/javaimp.el
@@ -78,7 +78,8 @@
 ;; User options
 
 (defgroup javaimp ()
-  "Add and reorder Java import statements in Maven projects")
+  "Add and reorder Java import statements in Maven projects"
+  :group 'c)
 
 (defcustom javaimp-import-group-alist '(("\\`javax?\\." . 10))
   "Specifies how to group classes and how to order resulting
@@ -260,9 +261,10 @@ children and are also included.  Subordinate modules with 
no
 inheritance are not included."
   (let ((xml-tree (javaimp--maven-xml-read-effective-pom file)))
 (cond ((assq 'project xml-tree)
-  (let ((project-elt (assq 'project xml-tree))
-(submodules (javaimp--xml-children
- (javaimp--xml-child 'modules project-elt) 
'module)))
+  (let* ((project-elt (assq 'project xml-tree))
+  (submodules (javaimp--xml-children
+   (javaimp--xml-child 'modules project-elt)
+   'module)))
 (and submodules
  ;; no real children
  (message "Independent submodules: %s"
@@ -680,9 +682,10 @@ is `'ordinary' or `'static'.  Interactively, NEW-IMPORTS 
is nil."
  (delete-region first (point
(javaimp--prepare-for-insertion first)
(setq all-imports
- (delete-duplicates all-imports
-:test (lambda (first second)
-(equal (car first) (car second)
+ (cl-delete-duplicates
+   all-imports
+   :test (lambda (first second)
+   (equal (car first) (car second)
;; assign order
(let ((with-order
   (mapcar



[elpa] master cbebd05: * seq-24.el (seq-concatenate, seq-into, seq--make-bindings): Use _

2016-04-21 Thread Stefan Monnier
branch: master
commit cbebd058c435ee2be5e9f30cedf78430ef979466
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* seq-24.el (seq-concatenate,seq-into,seq--make-bindings): Use _

rather than t as catch-all for pcase.
---
 packages/seq/seq-24.el |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/packages/seq/seq-24.el b/packages/seq/seq-24.el
index fc1d956..3b08855 100644
--- a/packages/seq/seq-24.el
+++ b/packages/seq/seq-24.el
@@ -1,6 +1,6 @@
 ;;; seq-24.el --- seq.el implementation for Emacs 24.x -*- lexical-binding: t 
-*-
 
-;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2016 Free Software Foundation, Inc.
 
 ;; Author: Nicolas Petton <nico...@petton.fr>
 ;; Keywords: sequences
@@ -270,7 +270,7 @@ TYPE must be one of following symbols: vector, string or 
list.
 (`vector (apply #'vconcat seqs))
 (`string (apply #'concat seqs))
 (`list (apply #'append (append seqs '(nil
-(t (error "Not a sequence type name: %S" type
+(_ (error "Not a sequence type name: %S" type
 
 (defun seq-mapcat (function sequence  type)
   "Concatenate the result of applying FUNCTION to each element of SEQUENCE.
@@ -359,7 +359,7 @@ TYPE can be one of the following symbols: vector, string or 
list."
 (`vector (vconcat sequence))
 (`string (concat sequence))
 (`list (append sequence nil))
-(t (error "Not a sequence type name: %S" type
+(_ (error "Not a sequence type name: %S" type
 
 (defun seq-min (sequence)
   "Return the smallest element of SEQUENCE.
@@ -432,7 +432,7 @@ BINDINGS."
   (seq-drop ,sequence ,index))
 bindings)
   (setq rest-marker t)))
-  (t
+  (_
(push `(,name (seq--elt-safe ,sequence ,index)) bindings
   (setq index (1+ index)))
 bindings))



[elpa] master de40f70: * debbugs: Use cl-lib. Use lexical-binding when available

2016-04-27 Thread Stefan Monnier
branch: master
commit de40f70fbbd6dfe03f43eae3eb4c928a05215c54
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* debbugs: Use cl-lib. Use lexical-binding when available

* debbugs-gnu.el: Only require subr-x at compile time.  Use cl-lib.
(debbugs-gnu-print-entry): Remove unused var `title-length'.
(debbugs-gnu-sort-title): Mark `s2' as unused.
* debbugs-org.el (debbugs-gnu): Use cl-lib.
* debbugs.el: Add `cl-lib' as dependency.  Use cl-lib.
(debbugs-soap-invoke-async): Mark `args' as unused.
---
 packages/debbugs/debbugs-gnu.el |   11 ++-
 packages/debbugs/debbugs-org.el |   10 +-
 packages/debbugs/debbugs.el |   39 +--
 3 files changed, 32 insertions(+), 28 deletions(-)

diff --git a/packages/debbugs/debbugs-gnu.el b/packages/debbugs/debbugs-gnu.el
index 10a31cb..a195814 100644
--- a/packages/debbugs/debbugs-gnu.el
+++ b/packages/debbugs/debbugs-gnu.el
@@ -1,4 +1,4 @@
-;;; debbugs-gnu.el --- interface for the GNU bug tracker
+;;; debbugs-gnu.el --- interface for the GNU bug tracker  -*- 
lexical-binding:t -*-
 
 ;; Copyright (C) 2011-2016 Free Software Foundation, Inc.
 
@@ -141,8 +141,8 @@
 (require 'debbugs)
 (require 'tabulated-list)
 (require 'add-log)
-(require 'subr-x)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'subr-x))
+(eval-when-compile (require 'cl-lib))
 
 (autoload 'article-decode-charset "gnus-art")
 (autoload 'diff-goto-source "diff-mode")
@@ -717,7 +717,8 @@ Used instead of `tabulated-list-print-entry'."
(submitter(aref cols 2))
(submitter-length (nth 1 (aref tabulated-list-format 2)))
(title(aref cols 3))
-   (title-length (nth 1 (aref tabulated-list-format 3
+   ;; (title-length (nth 1 (aref tabulated-list-format 3)))
+)
 (when (and
   ;; We may have a narrowing in effect.
   (or (not debbugs-gnu-limit)
@@ -951,7 +952,7 @@ The following commands are available:
   t)
  (t nil
 
-(defun debbugs-gnu-sort-title (s1 s2)
+(defun debbugs-gnu-sort-title (s1 _s2)
   (let ((owner (if (cdr (assq 'owner (car s1)))
   (car (mail-header-parse-address
 (decode-coding-string (cdr (assq 'owner (car s1)))
diff --git a/packages/debbugs/debbugs-org.el b/packages/debbugs/debbugs-org.el
index a95672d..ecd522d 100644
--- a/packages/debbugs/debbugs-org.el
+++ b/packages/debbugs/debbugs-org.el
@@ -1,4 +1,4 @@
-;;; debbugs-org.el --- Org-mode interface for the GNU bug tracker
+;;; debbugs-org.el --- Org-mode interface for the GNU bug tracker  -*- 
lexical-binding:t -*-
 
 ;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
 
@@ -100,7 +100,7 @@
 
 (require 'debbugs-gnu)
 (require 'org)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
 
 ;; Buffer-local variables.
 (defvar debbugs-gnu-local-query)
@@ -109,7 +109,7 @@
 (defconst debbugs-org-severity-priority
   (let ((priority ?A))
 (mapcar
- (lambda (x) (prog1 (cons x (char-to-string priority)) (incf priority)))
+ (lambda (x) (prog1 (cons x (char-to-string priority)) (cl-incf priority)))
  debbugs-gnu-all-severities))
   "Mapping of debbugs severities to TODO priorities.")
 
@@ -288,10 +288,10 @@ returned."
 
;; Handle tags.
(when (string-match "^\\([0-9.]+\\); \\(.+\\)$" subject)
- (let ((x (match-string 1 subject))) (pushnew x tags :test #'equal))
+ (let ((x (match-string 1 subject))) (cl-pushnew x tags :test #'equal))
  (setq subject (match-string 2 subject)))
(when archived
-  (pushnew "ARCHIVE" tags :test #'equal))
+  (cl-pushnew "ARCHIVE" tags :test #'equal))
(setq tags
  (mapcar
   ;; Replace all invalid TAG characters by "_".
diff --git a/packages/debbugs/debbugs.el b/packages/debbugs/debbugs.el
index cedf93f..f3dc7c6 100644
--- a/packages/debbugs/debbugs.el
+++ b/packages/debbugs/debbugs.el
@@ -1,4 +1,4 @@
-;;; debbugs.el --- SOAP library to access debbugs servers
+;;; debbugs.el --- SOAP library to access debbugs servers  -*- 
lexical-binding:t -*-
 
 ;; Copyright (C) 2011-2016 Free Software Foundation, Inc.
 
@@ -6,7 +6,7 @@
 ;; Keywords: comm, hypermedia
 ;; Package: debbugs
 ;; Version: 0.9.3
-;; Package-Requires: ((soap-client "3.1.1"))
+;; Package-Requires: ((soap-client "3.1.1") (cl-lib "0.5"))
 
 ;; This file is not part of GNU Emacs.
 
@@ -35,7 +35,7 @@
 
 ;(setq soap-debug t message-log-max t)
 (require 'soap-client)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
 
 (defgroup debbugs nil
   "Debbugs library"
@@ -120,8 +120,8 @@ This corresponds to the Debbugs server to be accessed, 
either
 (defun debbugs-soap-invoke-async (operation-name  paramet

[elpa] master 1ca09bd: * packages/rnc-mode/rnc-mode.el (rnc-smie-rules): Add empty-line-token rule.

2016-04-27 Thread Stefan Monnier
branch: master
commit 1ca09bd380a3b626aa7eba8c950a3a714752c6b0
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* packages/rnc-mode/rnc-mode.el (rnc-smie-rules): Add empty-line-token rule.
---
 packages/rnc-mode/rnc-mode.el |1 +
 1 file changed, 1 insertion(+)

diff --git a/packages/rnc-mode/rnc-mode.el b/packages/rnc-mode/rnc-mode.el
index 81f891b..9a08b5e 100644
--- a/packages/rnc-mode/rnc-mode.el
+++ b/packages/rnc-mode/rnc-mode.el
@@ -123,6 +123,7 @@
 (defun rnc-smie-rules (kind token)
   (pcase (cons kind token)
 (`(:list-intro . "element") t)
+(`(:elem . empty-line-token) " ; ")
 (`(:before . ,(or "include" "default" "namespace" "datatypes")) 0)
 (`(:before . "{")
  (save-excursion



[elpa] master 6a5d60c: * externals-list: Add ztree entry

2016-04-27 Thread Stefan Monnier
branch: master
commit 6a5d60cf830c161eec6c5e4ebc6a3aec2879d592
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* externals-list: Add ztree entry
---
 externals-list |1 +
 1 file changed, 1 insertion(+)

diff --git a/externals-list b/externals-list
index acf8dbb..169cb11 100644
--- a/externals-list
+++ b/externals-list
@@ -82,4 +82,5 @@
  ("websocket"  :subtree 
"https://github.com/ahyatt/emacs-websocket.git;)
  ("xelb"   :external "https://github.com/ch11ng/xelb.git;)
  ("yasnippet"  :subtree 
"https://github.com/capitaomorte/yasnippet.git;)
+ ("ztree"  :subtree "https://github.com/fourier/ztree;)
  )



[elpa] master 03d2b00: * arbitools/arbitools.el: Remove unused vars

2016-04-24 Thread Stefan Monnier
branch: master
commit 03d2b0087e553db136cbbf4b2546d76f6f3ed5c7
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* arbitools/arbitools.el: Remove unused vars

* arbitools.el (arbitools-calculate-standings, arbitools-delete-player)
(arbitools-calculate-standings): Remove unused vars.
---
 packages/arbitools/arbitools.el |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/packages/arbitools/arbitools.el b/packages/arbitools/arbitools.el
index 76fe0bc..8c43e78 100644
--- a/packages/arbitools/arbitools.el
+++ b/packages/arbitools/arbitools.el
@@ -273,7 +273,6 @@
   (interactive)
   (save-excursion
 (let ( (numberofrounds (arbitools-number-of-rounds))
-   (pointsstring   "")
(points 0.0)
(pointstosum0.0)
(roundcount 1))
@@ -284,7 +283,7 @@
 (while (<= roundcount numberofrounds)
   (beginning-of-line)
  (forward-char (+ 98 (* (- roundcount 1) 10))) ;; go to where the 
result is for each round
-  (setq pointsstring (thing-at-point 'symbol))
+  ;; FIXME: Use pcase?
   (cond ((string= (thing-at-point 'symbol) "1") (setq pointstosum 1.0))
 ((string= (thing-at-point 'symbol) "+") (setq pointstosum 1.0))
 ((string= (thing-at-point 'symbol) "=") (setq pointstosum 0.5))
@@ -310,7 +309,7 @@
 (let ((datachunk ""))
   (goto-char (point-min))
   (while (re-search-forward "^001" nil t)
-(let* ((linestring (thing-at-point 'line)))
+(let* () ;; (linestring (thing-at-point 'line))
   (beginning-of-line)
   (forward-char 89) ;; get the POS field
   (setq datachunk (thing-at-point 'word))
@@ -411,7 +410,6 @@
  (save-excursion 
(while (re-search-forward "^013" nil t)
 (let* ((linestringteam (thing-at-point 'line))
-  (actualintegrant (string-to-number (substring 
linestringteam 40 44)))
   (integrantcount 0)
   (members 0))
 



[elpa] master 1a3ec40: * aggressive-indent.el: Silence warning

2016-05-14 Thread Stefan Monnier
branch: master
commit 1a3ec404888b7cfd4a721768c802c26ff64af72d
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* aggressive-indent.el: Silence warning

* aggressive-indent.el (aggressive-indent-indent-region-and-on):
Remove unused var `was-beginning-of-line'.
---
 packages/aggressive-indent/aggressive-indent.el |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/packages/aggressive-indent/aggressive-indent.el 
b/packages/aggressive-indent/aggressive-indent.el
index 481e7ef..ac3ff96 100644
--- a/packages/aggressive-indent/aggressive-indent.el
+++ b/packages/aggressive-indent/aggressive-indent.el
@@ -1,6 +1,6 @@
 ;;; aggressive-indent.el --- Minor mode to aggressively keep your code always 
indented  -*- lexical-binding:t -*-
 
-;; Copyright (C) 2014, 2015 Free Software Foundation, Inc
+;; Copyright (C) 2014, 2015, 2016 Free Software Foundation, Inc
 
 ;; Author: Artur Malabarba <em...@endlessparentheses.com>
 ;; URL: https://github.com/Malabarba/aggressive-indent-mode
@@ -300,8 +300,7 @@ messages.  L and R passed to 
`aggressive-indent-indent-defun'."
 Call `indent-region' between L and R, and then keep indenting
 until nothing more happens."
   (interactive "r")
-  (let ((p (point-marker))
-was-begining-of-line)
+  (let ((p (point-marker)))
 (set-marker-insertion-type p t)
 (unwind-protect
 (progn



[elpa] master 59a4079: * websocket/websocket.el (websocket-server-accept): Mark arg as unused

2016-05-10 Thread Stefan Monnier
branch: master
commit 59a4079b73574eb5ef21103714e47033e61891c7
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* websocket/websocket.el (websocket-server-accept): Mark arg as unused

* websocket/websocket-functional-test.el: Fix compilation warnings.
---
 packages/websocket/websocket-functional-test.el |   62 +++
 packages/websocket/websocket.el |2 +-
 2 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/packages/websocket/websocket-functional-test.el 
b/packages/websocket/websocket-functional-test.el
index 1bbd190..e447015 100644
--- a/packages/websocket/websocket-functional-test.el
+++ b/packages/websocket/websocket-functional-test.el
@@ -1,6 +1,6 @@
 ;;; websocket-functional-test.el --- Simple functional testing
 
-;; Copyright (c) 2013  Free Software Foundation, Inc.
+;; Copyright (c) 2013, 2016  Free Software Foundation, Inc.
 
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
@@ -51,11 +51,11 @@
 (defvar wstest-ws
   (websocket-open
"ws://127.0.0.1:"
-   :on-message (lambda (websocket frame)
+   :on-message (lambda (_websocket frame)
  (push (websocket-frame-payload frame) wstest-msgs)
  (message "ws frame: %S" (websocket-frame-payload frame))
  (error "Test error (expected)"))
-   :on-close (lambda (websocket) (setq wstest-closed t
+   :on-close (lambda (_websocket) (setq wstest-closed t
 
 (defun wstest-pop-to-debug ()
   "Open websocket log buffer. Not used in testing. Just for debugging."
@@ -71,7 +71,7 @@
 
 (sleep-for 0.1)
 (assert (equal (car wstest-msgs) "You said: Hi!"))
-(setf (websocket-on-error wstest-ws) (lambda (ws type err)))
+(setf (websocket-on-error wstest-ws) (lambda (_ws _type _err)))
 (websocket-send-text wstest-ws "Hi after error!")
 (sleep-for 0.1)
 (assert (equal (car wstest-msgs) "You said: Hi after error!"))
@@ -94,19 +94,19 @@
 ;; Remote server test, with wss ;;
 ;;
 
-(when (>= (string-to-int (substring emacs-version 0 2)) 24)
+(when (>= (string-to-number (substring emacs-version 0 2)) 24)
   (message "Testing with wss://echo.websocket.org")
   (when (eq system-type 'windows-nt)
 (message "Windows users must have gnutls DLLs in the emacs bin 
directory."))
   (setq wstest-ws
 (websocket-open
  "wss://echo.websocket.org"
- :on-open (lambda (websocket)
+ :on-open (lambda (_websocket)
 (message "Websocket opened"))
- :on-message (lambda (websocket frame)
+ :on-message (lambda (_websocket frame)
(push (websocket-frame-payload frame) wstest-msgs)
(message "ws frame: %S" (websocket-frame-payload 
frame)))
- :on-close (lambda (websocket)
+ :on-close (lambda (_websocket)
  (message "Websocket closed")
  (setq wstest-closed t)))
 wstest-msgs nil)
@@ -126,30 +126,30 @@
 (message "Testing with emacs websocket server.")
 (message "If this does not pass, make sure your firewall allows the 
connection.")
 (setq wstest-closed nil)
-(setq server-conn (websocket-server
-   9998
-   :host 'local
-   :on-message (lambda (ws frame)
- (message "Server received text!")
- (websocket-send-text ws
-  (websocket-frame-payload frame)))
-   :on-open (lambda (websocket) "Client connection opened!")
-   :on-close (lambda (websocket)
-   (setq wstest-closed t
-
-(setq wstest-msgs nil
-  wstest-ws
-  (websocket-open
-   "ws://localhost:9998"
-   :on-message (lambda (websocket frame)
- (push (websocket-frame-payload frame) wstest-msgs)
- (message "ws frame: %S" (websocket-frame-payload 
frame)
+(let ((server-conn (websocket-server
+9998
+:host 'local
+:on-message (lambda (ws frame)
+  (message "Server received text!")
+  (websocket-send-text ws
+   
(websocket-frame-payload frame)))
+:on-open (lambda (_websocket) "Client connection opened!")
+:on-close (lambda (_websocket)
+(setq wstest-closed t)
+
+  (setq wstest-msgs nil
+wstest-ws
+(websocket-open
+ "ws://localhost:999

[elpa] master fda8249: * admin/archive-contents.el: Minimal support for local externals

2016-07-26 Thread Stefan Monnier
branch: master
commit fda824956947bfb4541f1119239dfc93125c8b51
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* admin/archive-contents.el: Minimal support for local externals

* admin/archive-contents.el (archive--cleanup-packages): Update
symlinked Git projects.
---
 admin/archive-contents.el |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index 37b582d..2b1ffec 100755
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -604,7 +604,13 @@ If WITH-CORE is non-nil, it means we manage :core packages 
as well."
   (let ((default-directory (expand-file-name "packages/")))
 (dolist (dir (directory-files "."))
   (cond
-   ((or (not (file-directory-p dir)) (file-symlink-p dir))
+   ((file-symlink-p dir)
+;; There are normally no such thing, but the user may elect to
+;; add symlinks to other projects.  If so, update them, as if they
+;; were "externals".
+(when (file-directory-p (expand-file-name ".git" dir))
+  (archive--pull dir)))
+   ((or (not (file-directory-p dir)) )
 ;; We only add/remove plain directories in elpa/packages (not
 ;; symlinks).
 nil)



[elpa] master 7d4771a: * packages/hyperbole: New package

2016-07-27 Thread Stefan Monnier
branch: master
commit 7d4771a880ed81bff2a6536fd39c8fa78a9551be
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* packages/hyperbole: New package
---
 copyright_exceptions |1 +
 externals-list   |1 +
 2 files changed, 2 insertions(+)

diff --git a/copyright_exceptions b/copyright_exceptions
index 272d7ac..f35c891 100644
--- a/copyright_exceptions
+++ b/copyright_exceptions
@@ -64,6 +64,7 @@
 ./ergoemacs-mode/ergoemacs-advices.el: emacs-copyright
 ./ergoemacs-mode/ergoemacs-themes.el: ,(lambda () 
emacs-copyright)
 ./gnugo/gnugo.el:(CP "Copyright"   game  simpletext)
+./hyperbole/hib-doc-id.el:;;  Copyright:
 ./math-symbol-lists/math-symbol-lists.el:"columnsep" "columnseprule" 
"columnwidth" "contentsline" "copyright"
 ./muse/htmlize-hack.el
 ./rudel/rudel-loaddefs.el
diff --git a/externals-list b/externals-list
index 1b65672..8a6c8fa 100644
--- a/externals-list
+++ b/externals-list
@@ -57,6 +57,7 @@
  ("ggtags" :subtree "https://github.com/leoliu/ggtags;)
  ("gnome-c-style"  :subtree "https://github.com/ueno/gnome-c-style.git;)
  ("gnorb"   :subtree "https://github.com/girzel/gnorb;)
+ ("hyperbole"   :external 
"http://git.savannah.gnu.org/r/hyperbole.git;)
  ("ioccur" :subtree 
"https://github.com/thierryvolpiatto/ioccur.git;)
  ("js2-mode"   :subtree "https://github.com/mooz/js2-mode.git;)
  ("let-alist" :core "lisp/emacs-lisp/let-alist.el")



[elpa] master ebda2a8: * ampc/ampc.el (ampc-views): Add "Search view"

2016-07-27 Thread Stefan Monnier
branch: master
commit ebda2a848354c2d86ff60e012dd268c144548823
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* ampc/ampc.el (ampc-views): Add "Search view"

(ampc-search-mode-map, ampc-search-keywords): New var.
(ampc-search-mode): New major mode.
(ampc-post-mark-change-update, ampc-update, ampc-handle-command):
Handle `search' case.
(ampc-handle-search): New function.
(ampc-start-search): New command.
(ampc-buffer-name): New const.
(ampc): Use it.
---
 packages/ampc/ampc.el |   73 +
 1 file changed, 68 insertions(+), 5 deletions(-)

diff --git a/packages/ampc/ampc.el b/packages/ampc/ampc.el
index 7a28bc7..8134c5c 100644
--- a/packages/ampc/ampc.el
+++ b/packages/ampc/ampc.el
@@ -76,11 +76,11 @@
 ;; selected window for its window setup, customise `ampc-use-full-frame' to a
 ;; non-nil value.
 ;;
-;; ampc offers three independent views which expose different parts of the user
+;; ampc offers independent views which expose different parts of the user
 ;; interface.  The current playlist view, the default view at startup, may be
 ;; accessed using the `J' key (that is `S-j').  The playlist view may be
 ;; accessed using the `K' key.  The outputs view may be accessed by pressing
-;; `L'.
+;; `L'. The search view may be accessed using the `F' key (find).
 
 ;;; *** current playlist view
 ;; The playlist view looks like this:
@@ -161,6 +161,11 @@
 ;; MPD.  To toggle the enabled property of the selected outputs, press `a'
 ;; (ampc-toggle-output-enabled) or `'.
 
+;;; *** search view
+;; The search view contains the result of the last performed search. You can
+;; start a new search with the `s' key while in the search view or use M-x
+;; ampc-start-search. Use the `a' key to add a song displayed in result list.
+
 ;;; ** tagger
 ;; To start the tagging subsystem, press `I' (ampc-tagger).  This key binding
 ;; works in every buffer associated with ampc.  First, the command tries to
@@ -521,7 +526,11 @@ modified."
  (pl-prop '(:properties (("Title" :min 15 :max 40)
  ("Artist" :min 15 :max 40)
  ("Album" :min 15 :max 40)
- ("Time" :width 6)
+ ("Time" :width 6
+ (search-view '(1.0 search :properties (("Track" :title "#" :width 4)
+("Title" :min 15 :max 40)
+("Artist" :min 15 :max 40)
+("Album" :min 15 :max 40)
 `((tagger
horizontal
(0.65 files-list
@@ -569,6 +578,13 @@ modified."
  (0.4 playlist ,@pl-prop)
  (1.0 playlists)))
,rs_b)
+  ("Search view"
+   ,(kbd "F")
+   horizontal
+   (0.4 vertical
+(6 status)
+(1.0 current-playlist ,@pl-prop))
+   ,search-view)
   ("Outputs view"
,(kbd "L")
outputs :properties (("outputname" :title "Name" :min 10 :max 30)
@@ -602,6 +618,7 @@ modified."
 
 (defconst ampc-tagger-version "0.1")
 (defconst ampc-tagger-tags '(Title Artist Album Comment Genre Year Track))
+(defconst ampc-buffer-name " *ampc*")
 
 ;;; *** mode maps
 (defvar ampc-mode-map
@@ -696,6 +713,16 @@ modified."
 (define-key map (kbd "") 'ampc-mouse-align-point)
 map))
 
+(defvar ampc-search-mode-map
+  (let ((map (make-sparse-keymap)))
+(suppress-keymap map)
+(define-key map (kbd "a") 'ampc-add)
+(define-key map (kbd "s") 'ampc-start-search)
+(define-key map (kbd "") 'ampc-mouse-add)
+(define-key map (kbd "") 'ampc-mouse-align-point)
+map)
+  "Key map for search view")
+
 (defvar ampc-outputs-mode-map
   (let ((map (make-sparse-keymap)))
 (suppress-keymap map)
@@ -732,6 +759,10 @@ modified."
 (define-key map (kbd "C-c C-t") 'ampc-tagger-dired)
 map))
 
+(defvar ampc-search-keywords
+  nil
+  "Ampc last performed search")
+
 ;;;  menu
 (easy-menu-define nil ampc-mode-map nil
   `("ampc"
@@ -952,6 +983,7 @@ modified."
do (goto-char next)
 
 (defmacro ampc-iterate-source-output (delimiter bindings pad-data  body)
+  "DELIMITER is the field that delimit command results in mpd response"
   (declare (indent 2) (debug t))
   `(let ((output-buffer (current-buffer))
  (tags (cl-loop for (tag . props) in
@@ -985,6 +1017,8 @@ modified."
 
 (define-derived-mode ampc-tag-song-mode ampc-item-mode "ampc-ts")
 
+(define-derived-mode ampc-search-mode amp

[elpa] master f28019a: * copyright_exceptions: Update for new ada-mode/ada-skel.el

2016-07-27 Thread Stefan Monnier
branch: master
commit f28019a4529d914a4407057d904e4b143a661673
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* copyright_exceptions: Update for new ada-mode/ada-skel.el
---
 copyright_exceptions |2 ++
 1 file changed, 2 insertions(+)

diff --git a/copyright_exceptions b/copyright_exceptions
index f35c891..563cab3 100644
--- a/copyright_exceptions
+++ b/copyright_exceptions
@@ -2,9 +2,11 @@
 ./ada-mode/ada-skel.el:("copyright_license"
 ./ada-mode/ada-skel.el:  "--  Copyright (C) " (format-time-string "%Y ") 
user-full-name " All Rights Reserved.\n"
 ./ada-mode/ada-skel.el:  "--  Copyright (C) " (format-time-string "%Y ") 
user-full-name " All Rights Reserved.\n"
+./ada-mode/ada-skel.el:  "--  Copyright (C) " (format-time-string "%Y ") 
user-full-name " All Rights Reserved.\n"
 ./ada-mode/ada-skel.el:  "Example copyright/license skeleton, with automatic 
year and owner, GPLv3."
 ./ada-mode/ada-skel.el:  "Example copyright/license skeleton, with automatic 
year and owner."
 ./ada-mode/ada-skel.el:  "Insert a file header comment, with automatic 
copyright year and prompt for copyright owner/license.
+./ada-mode/ada-skel.el:  "Modified GPLv3 copyright/license skeleton, with 
automatic year and owner."
 ./ada-mode/ada-skel.el:  "{copyright_license}\n"
 ./ada-mode/ada-stmt.el
 ./ada-mode/ada-xref.el



[elpa] master a2f9d50: * ampc/ampc.el: Add current song time in status display

2016-07-27 Thread Stefan Monnier
branch: master
commit a2f9d508d03787bca03649d58b4d050ab0d2be05
Author: Cédric Chépied <cedric.chep...@gmail.com>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* ampc/ampc.el: Add current song time in status display

(ampc-views): Increase size for `status'.
(ampc-status-timer): New var.
(ampc-status): Add optional `width' argument.
(ampc-fill-status): Use it.
(ampc-handle-current-song): Add "Time".
(ampc-handle-status): Add "elapsed"
(ampc-restart-status-timer, ampc-time-to-progress-bar)
(ampc-current-song-time): New functions.
(ampc-status): Use it.
(ampc-quit): Turn off ampc-status-timer.
(ampc): Turn on ampc-status-timer.
---
 packages/ampc/ampc.el |   98 -
 1 file changed, 88 insertions(+), 10 deletions(-)

diff --git a/packages/ampc/ampc.el b/packages/ampc/ampc.el
index 8134c5c..0710c70 100644
--- a/packages/ampc/ampc.el
+++ b/packages/ampc/ampc.el
@@ -548,21 +548,21 @@ modified."
,(kbd "J")
horizontal
(0.4 vertical
-(6 status)
+(10 status)
 (1.0 current-playlist ,@pl-prop))
,rs_a)
   ("Current playlist view (Genre|Album|Artist)"
,(kbd "M")
horizontal
(0.4 vertical
-(6 status)
+(10 status)
 (1.0 current-playlist ,@pl-prop))
,rs_b)
   ("Playlist view (Genre|Artist|Album)"
,(kbd "K")
horizontal
(0.4 vertical
-(6 status)
+(10 status)
 (1.0 vertical
  (0.4 current-playlist ,@pl-prop)
  (0.4 playlist ,@pl-prop)
@@ -572,7 +572,7 @@ modified."
,(kbd "<")
horizontal
(0.4 vertical
-(6 status)
+(10 status)
 (1.0 vertical
  (0.4 current-playlist ,@pl-prop)
  (0.4 playlist ,@pl-prop)
@@ -582,7 +582,7 @@ modified."
,(kbd "F")
horizontal
(0.4 vertical
-(6 status)
+(10 status)
 (1.0 current-playlist ,@pl-prop))
,search-view)
   ("Outputs view"
@@ -610,6 +610,7 @@ modified."
 
 (defvar ampc-internal-db nil)
 (defvar ampc-status nil)
+(defvar ampc-status-timer nil)
 
 (defvar ampc-tagger-previous-configuration nil)
 (defvar ampc-tagger-version-verified nil)
@@ -1860,7 +1861,8 @@ modified."
 (erase-buffer)
 (funcall (or (plist-get (cadr ampc-type) :filler)
  (lambda (_)
-   (insert (ampc-status t) "\n")))
+   (insert (ampc-status t (window-width (get-buffer-window)))
+   "\n")))
  ampc-status)
 (ampc-set-dirty nil)))
 
@@ -2007,13 +2009,14 @@ modified."
 (cl-callf2 assq-delete-all s ampc-status
 
 (defun ampc-handle-current-song ()
-  (ampc-fill-status-var (append ampc-status-tags '("Artist" "Title" "file")))
+  (ampc-fill-status-var (append ampc-status-tags
+'("Artist" "Title" "file" "Time")))
   (ampc-fill-status)
   (run-hook-with-args ampc-status-changed-hook ampc-status))
 
 (defun ampc-handle-status ()
   (ampc-fill-status-var '("volume" "repeat" "random" "consume" "xfade" "state"
-  "song" "playlistlength"))
+  "song" "playlistlength" "elapsed"))
   (ampc-with-buffer 'current-playlist
 (if (fboundp 'font-lock-flush)
 (font-lock-flush)
@@ -2811,7 +2814,71 @@ If ARG is omitted, use the selected entries in the 
current buffer."
   (ampc-with-selection arg
 (ampc-add-impl)))
 
-(defun ampc-status ( no-print)
+(defun ampc-restart-status-timer ()
+  (when ampc-status-timer
+(cancel-timer ampc-status-timer)
+(setq ampc-status-timer nil))
+  (setq ampc-status-timer
+(run-at-time
+ nil
+ 0.9
+ (lambda ()
+   (when (ampc-on-p)
+ (ampc-send-command 'status))
+
+
+(defun ampc-time-to-progress-bar (elapsed total width)
+  "Creates a progess bar like this: |=>|
+ELAPSED is the number of seconds represented by '=' signs
+TOTAL is the number of seconds represented by the entire bar
+WIDTH is the max width of the bar. If < 2, 2 characters will be used anyway"
+  (setq width (- width 2)) ;; 2 characters for '||'
+
+  (let ((result "|"))
+(when (> width 0)
+  (let* ((e (/ (* elapsed width) total)) ;; number of '=' signs
+ (r (- width e))) ;; number of '-' signs
+(setq result (concat result
+ (make-string (max 0 (1- e)) ?

[elpa] master 6753f73: * realgud.el: Fix "Author" to be a valid email

2016-07-31 Thread Stefan Monnier
branch: master
commit 6753f73ea57c0bd65d1b69c360ff836d847525ee
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* realgud.el: Fix "Author" to be a valid email
---
 packages/realgud/realgud.el |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/packages/realgud/realgud.el b/packages/realgud/realgud.el
index 5b6d217..548ea19 100644
--- a/packages/realgud/realgud.el
+++ b/packages/realgud/realgud.el
@@ -1,6 +1,6 @@
 ;;; realgud.el --- A modular front-end for interacting with external debuggers
 
-;; Author: Rocky Bernstein
+;; Author: Rocky Bernstein <ro...@gnu.org>
 ;; Version: 1.4.0
 ;; Package-Requires: ((load-relative "1.0") (loc-changes "1.1") (test-simple  
"1.0"))
 ;; URL: http://github.com/realgud/realgud/
@@ -8,8 +8,6 @@
 
 ;; Copyright (C) 2015, 2016 Free Software Foundation, Inc
 
-;; Author: Rocky Bernstein <ro...@gnu.org>
-
 ;; 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



[elpa] externals/hyperbole 81e8485: * hyperbole-pkg.el: Remove; autogenerated

2016-07-27 Thread Stefan Monnier
branch: externals/hyperbole
commit 81e8485c32ab1bcdccf4a0348e9f770039acfe51
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* hyperbole-pkg.el: Remove; autogenerated
---
 hyperbole-pkg.el |8 
 1 file changed, 8 deletions(-)

diff --git a/hyperbole-pkg.el b/hyperbole-pkg.el
deleted file mode 100644
index 85ced10..000
--- a/hyperbole-pkg.el
+++ /dev/null
@@ -1,8 +0,0 @@
-;; -*- no-byte-compile: t -*-
-(define-package "hyperbole" "6.0.1" "GNU Hyperbole: The Everyday Hypertextual 
Information Manager"
-  '((emacs "24.4"))
-  :url "http://www.gnu.org/software/hyperbole;
-  :keywords '("comm" "convenience" "files" "frames" "hypermedia" "languages"
- "mail" "matching" "mouse" "multimedia" "outlines" "tools" "wp"))
-
-(setq byte-compile-warnings '(not interactive-p find-tag))



[elpa] branch externals/hyperbole created (now 5b7b3b3)

2016-07-27 Thread Stefan Monnier
monnier pushed a change to branch externals/hyperbole.

at  5b7b3b3   Removed -Z option

This branch includes the following new commits:

   new  79812fd   Release candidate for version 6.0.
   new  9a01af4   * .hypb: Added. Lost during initial commit to git.
   new  6154da5   Use gnu as elpa archive name.
   new  deffc29   Add git ignore file.
   new  2525049   * MANIFEST: Eliminated hsite-ex.el and included hsite.el 
in distribution package. Users will use customizations now rather than 
direct editing of this file.
   new  83e2b8e   * man/hyperbole.texi (Global Key Bindings): Changed from 
setting the value of hkey-init-override-local-keys in personal init file to 
using the customize-variable interface.
   new  f6f4717   * hyperbole.el (hkey-override-local-bindings): Fixed case 
where an invalid key prefix is given and so local-key-binding returns a 
number rather than nil.
   new  991c75a   * HY-README (Installation): * man/hyperbole.texi 
(Installation): Made elpa line match the default in Emacs so if it is 
already there, it won't be added again.
   new  465cba1   * man/hyperbole.texi: Fixed typos and improved 
explanations in parts.
   new  1cab0c6   * hyperbole-pkg.el (hyperbole): Version update in 
preparation for next release and rebuilt package.
   new  c480343   Fixed one typo.
   new  64e0a5b   * Makefile (help): Added as the default target, 
explaining major targets.
   new  fbc772f   * hibtypes.el (mail-address-regexp): Simplified and 
modernized address matching to better distinguish from @username social 
media references.   (mail-address-mode-list): Added 
lisp-interaction-mode and fundamental-mode.   
(mail-address-tld-regexp): Added to match most common top-level domains to 
tell if a match is really an email address or not.   
(mail-address-at-p): Tightened by using mail-address-tld-regexp.   DEMO (Emai 
[...]
   new  0205138   * hib-social.el (social-reference):   hibtypes.el 
(mail-address-at-p): Let case-fold-search be t since mail-addresses are 
case-insensitive.
   new  d81c13e   .gitignore - added TAGS
   new  90026c9   * hsettings.el: Renamed this from hsite.el to prevent 
Hyperbole V4 users from accidentally loading it manually.
   new  1a85fe8   * hyperbole.el (hyperbole-koutliner group): Moved 
definition to ensure comes after hversion is loaded.
   new  f65e50f   * Makefile (release): Added this target to generate the 
kotl/kotl-autoloads.el file within the source tree.
   new  b524cab   * Makefile (release): Added this target to generate the 
kotl/kotl-autoloads.el file within the source tree.
   new  9e26ef4   * Updates from testing 'make release'.
   new  e9a4319   * man/hyperbole.texi (Implicit Buttons):   hib-social.el 
(social-reference): Improved doc for this ibtype.
   new  f200f78   * hui-menu.el (infodock-hyperbole-menu): Commented out 
InfoDock manual reference out until InfoDock is modernized for Emacs 25.
   new  53ed881   Rename kotl autoloads and insert copyright notice
   new  bf50f8d   Generate new kotl-loaddefs.el
   new  51b7ce7   * Makefile (hyperbole-$(HYPB_VERSION).tar): Added 
HY-ABOUT and HY-ANNOUNCE to files installed outside the tar archive for 
reference.
   new  38b5534   Patch from Stefan Monnier. Thank you Stefan.
   new  d956115   * README: Renamed this file from HY-README.  Moved 
installation and invocationinstructions to "INSTALL" file.  These changes 
were to eliminate releaseproblems with INSTALL and README being symbolic 
links.
   new  9205030   Merged changes from last 2 days.
   new  2f767bc   Updated manual release date.
   new  ee3d77d   Removed hyperbole.readme.txt
   new  656b085   * hyperbole.el: Added Date: header with release date and 
updated date in man/version.texi used in hyperbole.texi.
   new  b48739f   Merged ChangeLog updates.
   new  033bba0   * hypb.el (hypb:rgrep-command): Removed -S option not 
supported by GNU/Linux.
   new  5b7b3b3   Removed -Z option




[elpa] master d50a05d: * diffview.el: Fix copyright header

2016-08-03 Thread Stefan Monnier
branch: master
commit d50a05d81c72003813022697ca7000a87ec30f7d
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* diffview.el: Fix copyright header
---
 packages/diffview/diffview.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/diffview/diffview.el b/packages/diffview/diffview.el
index 06bbf42..2455c67 100644
--- a/packages/diffview/diffview.el
+++ b/packages/diffview/diffview.el
@@ -1,6 +1,6 @@
 ;;; diffview.el --- View diffs in side-by-side format
 
-;; Copyright (C) 2013-2015, Mitchel Humpherys
+;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
 
 ;; Author: Mitchel Humpherys <mitch.spec...@gmail.com>
 ;; Maintainer: Mitchel Humpherys <mitch.spec...@gmail.com>



[elpa] master d762ee5 05/22: Update some package tags

2016-08-03 Thread Stefan Monnier
branch: master
commit d762ee5e610068ea476286eaa5b5c69ccda7986e
Author: Mitchel Humpherys 
Commit: Mitchel Humpherys 

Update some package tags
---
 diffview.el |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/diffview.el b/diffview.el
index 2449b05..6d3ab63 100644
--- a/diffview.el
+++ b/diffview.el
@@ -1,10 +1,11 @@
 ;;; diffview.el --- View diffs in side-by-side format
 
-;; Copyright (C) 2013, Mitchel Humpherys
+;; Copyright (C) 2013-2015, Mitchel Humpherys
 
 ;; Author: Mitchel Humpherys 
-;; Keywords: convenience
+;; Keywords: convenience, diff
 ;; Version: 0.1
+;; URL: https://github.com/mgalgs/diffview-mode
 
 ;; 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 9e1ddf5 12/22: Rely on make-readme-markdown for license badge

2016-08-03 Thread Stefan Monnier
branch: master
commit 9e1ddf5acf5e65129fa1e9341b6628991a77324b
Author: Mitchel Humpherys 
Commit: Mitchel Humpherys 

Rely on make-readme-markdown for license badge
---
 Makefile|2 +-
 README.md   |2 +-
 diffview.el |1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index d2403cf..8031cc2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 README.md: make-readme-markdown.el diffview.el
-   emacs --script $< < diffview.el >$@ 2>/dev/null
+   emacs --script $< < diffview.el >$@
 
 make-readme-markdown.el:
wget -q -O $@ 
https://raw.github.com/mgalgs/make-readme-markdown/master/make-readme-markdown.el
diff --git a/README.md b/README.md
index d3297ef..93a56e4 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
 *View diffs in side-by-side format*
 
 ---
-[![License 
GPL3](https://img.shields.io/badge/license-GPL_3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.html)
+[![License 
GPLv3](https://img.shields.io/badge/license-GPL_v3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.html)
 
 Render a unified diff (top/bottom) in an easy-to-comprehend side-by-side
 format.  This comes in handy for reading patches from mailing lists (or
diff --git a/diffview.el b/diffview.el
index 075efad..983f9a4 100644
--- a/diffview.el
+++ b/diffview.el
@@ -21,7 +21,6 @@
 ;; along with this program.  If not, see .
 
 ;;; Commentary:
-;; [![License 
GPL3](https://img.shields.io/badge/license-GPL_3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.html)
 ;;
 ;; Render a unified diff (top/bottom) in an easy-to-comprehend side-by-side
 ;; format.  This comes in handy for reading patches from mailing lists (or



[elpa] master cb707b2 06/22: Fix some warnings from flycheck-package.el

2016-08-03 Thread Stefan Monnier
branch: master
commit cb707b230841388d87bd87c9a36e5eba07618d78
Author: Mitchel Humpherys 
Commit: Mitchel Humpherys 

Fix some warnings from flycheck-package.el
---
 diffview.el |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/diffview.el b/diffview.el
index 6d3ab63..4657459 100644
--- a/diffview.el
+++ b/diffview.el
@@ -48,8 +48,9 @@
 ;; After:
 ;; https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-after.png;>
 ;;
-;;; Code
+;;; Code:
 
+(require 'message)
 
 (defun diffview/print-all-lines-to-buffer (lines buffer-name)
   "Prints each line in `LINES' to a buffer named `BUFFER-NAME'
@@ -176,6 +177,7 @@ side-by-side view"
 
 ;;; diffview-mode ;;;
 
+;;;###autoload
 (define-derived-mode diffview-mode special-mode "Diffview"
   "Mode for viewing diffs side-by-side"
   (setq font-lock-defaults '(diff-font-lock-keywords t nil nil nil 
(font-lock-multiline . nil



[elpa] master updated (431bb44 -> e30def7)

2016-08-03 Thread Stefan Monnier
monnier pushed a change to branch master.

  from  431bb44   Add comment about (pcase) backquote inside (real) 
backquote
   new  89be8c1   initial commit
   new  5baa699   add screenshots
   new  8220a31   improve documentation
   new  1ba9c74   Add GPLv3 badge
   new  d762ee5   Update some package tags
   new  cb707b2   Fix some warnings from flycheck-package.el
   new  a156d34   set up some more reasonable autoloads
   new  9029356   Update documentation
   new  e321c3d   Improve clarity of some docs
   new  d94ebf7   Fix some `checkdoc' warnings
   new  c762e64   Use emacs quotes
   new  9e1ddf5   Rely on make-readme-markdown for license badge
   new  63f00b4   Add MELPA installation instructions
   new  dd42c87   Regenerate README.md (now includes MELPA badge)
   new  da412da   Makefile: Proper local build support
   new  214ec59   Regenerate README.md (now includes MELPA stable badge)
   new  4be8d94   Revert "Regenerate README.md (now includes MELPA stable 
badge)"
   new  471dc36   diffview.el: Version bump (1.0)
   new  548ad25   diffview.el: Remove unnecessary html
   new  32bb19a   README.md: Re-generate (now includes MELPA stable badge)
   new  031b709   diffview.el: Add `Maintainer' pseudo-header
   new  e30def7   Add 'packages/diffview/' from commit 
'031b70913e755c5e55222680f80185032a7d1728'


Summary of changes:
 packages/diffview/Makefile|   13 ++
 packages/diffview/README.md   |   59 ++
 packages/diffview/diffview.el |  200 +
 packages/diffview/screenshots/diffview-after.png  |  Bin 0 -> 199810 bytes
 packages/diffview/screenshots/diffview-before.png |  Bin 0 -> 184048 bytes
 5 files changed, 272 insertions(+)
 create mode 100644 packages/diffview/Makefile
 create mode 100644 packages/diffview/README.md
 create mode 100644 packages/diffview/diffview.el
 create mode 100644 packages/diffview/screenshots/diffview-after.png
 create mode 100644 packages/diffview/screenshots/diffview-before.png



[elpa] master 89be8c1 01/22: initial commit

2016-08-03 Thread Stefan Monnier
branch: master
commit 89be8c172bec0107e91373abd14ae6371560150b
Author: Mitchel Humpherys 
Commit: Mitchel Humpherys 

initial commit
---
 README.md   |   26 +
 diffview.el |  188 +++
 2 files changed, 214 insertions(+)

diff --git a/README.md b/README.md
new file mode 100644
index 000..3d61877
--- /dev/null
+++ b/README.md
@@ -0,0 +1,26 @@
+Commentary
+==
+
+View a diff in a side-by-side format. This comes in handy for ready
+patches from mailing lists (or from whencever you might acquire
+them).
+
+Installation
+
+
+Put this file on your load-path and do:
+
+(require 'diffview)
+
+Use
+===
+
+The following functions are provided:
+
+* `diffview-current` : Opens the current buffer with `diffview`
+* `diffview-region` : Opens the current region with `diffview`
+
+
+Markdown README file generated by
+https://github.com/mgalgs/make-readme-markdown;>make-readme-markdown.el
+
diff --git a/diffview.el b/diffview.el
new file mode 100644
index 000..34af32c
--- /dev/null
+++ b/diffview.el
@@ -0,0 +1,188 @@
+;;; diffview.el --- View diffs in side-by-side format
+
+;; Copyright (C) 2013, Mitchel Humpherys
+
+;; Author: Mitchel Humpherys 
+;; Keywords: convenience
+;; 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:
+;;
+;; View a diff in a side-by-side format. This comes in handy for ready
+;; patches from mailing lists (or from whencever you might acquire
+;; them).
+;;
+;;; Installation:
+;;
+;; Put this file on your load-path and do:
+;;
+;;`   (require 'diffview)
+;;
+;;; Use:
+;;
+;; The following functions are provided:
+;;
+;; o `diffview-current` : Opens the current buffer with `diffview`
+;; o `diffview-region` : Opens the current region with `diffview`
+;;
+;;; Code
+
+
+(defun diffview/print-all-lines-to-buffer (lines buffer-name)
+  "Prints each line in `LINES' to a buffer named `BUFFER-NAME'
+  with an intervening \n between each line"
+  (let ((old-temp-buffer (get-buffer buffer-name)))
+;; (with-output-to-temp-buffer buffer-name
+(when old-temp-buffer
+  (kill-buffer old-temp-buffer))
+(with-current-buffer (get-buffer-create buffer-name)
+  (erase-buffer)
+  (dolist (line lines)
+   (insert line "\n")
+
+(defvar diffview/minus-bufname "*side-by-side-1*")
+(defvar diffview/plus-bufname "*side-by-side-2*")
+(defvar diffview/saved-wincfg nil)
+(defvar diffview/regexp-is-plus-line "^\\+\\([^+]\\{1\\}\\|$\\)"
+  "a + followed by one non + or the end of the line")
+(defvar diffview/regexp-is-minus-line "^-\\([^-]\\{1\\}\\|$\\)"
+  "a - followed by one non - or the end of the line")
+
+(defun diffview/view-string (input-string)
+  "Parses `INPUT-STRING' as a diff and opens the result in a
+side-by-side view"
+  (setq diffview/saved-wincfg (current-window-configuration))
+  (delete-other-windows)
+  (let (plus-lines
+   minus-lines
+   tmp-line
+   (current-state 'in-common)
+   (last-state 'in-common)
+   (current-lines-in-plus 0)
+   (current-lines-in-minus 0)
+   (total-lines 0)
+   (all-lines (split-string input-string "\n")))
+(dolist (line all-lines)
+  (cond
+   ((string-match diffview/regexp-is-plus-line line)
+   (push line plus-lines)
+   (setq current-state 'in-plus)
+   (setq current-lines-in-plus (1+ current-lines-in-plus)))
+   ((string-match diffview/regexp-is-minus-line line)
+   (push line minus-lines)
+   (setq current-state 'in-minus)
+   (setq current-lines-in-minus (1+ current-lines-in-minus)))
+   ;; everything else must be common
+   (t
+   (push line plus-lines)
+   (push line minus-lines)
+   (setq current-state 'in-common)))
+
+  (setq total-lines (1+ total-lines))
+
+  ;; Process hunk state transitions
+  (when (not (equal current-state last-state))
+   ;; there's been a state change
+   (when (equal current-state 'in-common)
+ ;; we're transitioning out the +/- part of a hunk. We would
+ ;; like both sides to have the same number lines for this
+ ;; hunk, so we might need to fill one side or the other with
+ ;; empty lines.
+ (cond
+  ((> current-lines-in-plus current-lines-in-minus)
+   

[elpa] master 548ad25 19/22: diffview.el: Remove unnecessary html

2016-08-03 Thread Stefan Monnier
branch: master
commit 548ad255c7dab07586538defa1a0137d86441621
Author: Mitchel Humpherys 
Commit: Mitchel Humpherys 

diffview.el: Remove unnecessary html

(Now that make-readme-markdown knows how to work with image links)
---
 README.md   |9 +
 diffview.el |9 +
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index 018825a..c82dfdb 100644
--- a/README.md
+++ b/README.md
@@ -28,10 +28,11 @@ The following functions are provided for launching a 
side-by-side diff:
 ### Screenshots
 
 
-Before:
-https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-before.png;>
-After:
-https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-after.png;>
+Before:
+https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-before.png;>
+
+After:
+https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-after.png;>
 
 ### Function Documentation
 
diff --git a/diffview.el b/diffview.el
index e38da44..4b5b337 100644
--- a/diffview.el
+++ b/diffview.el
@@ -42,10 +42,11 @@
 ;;
 ;;; Screenshots:
 ;;
-;; Before:
-;; https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-before.png;>
-;; After:
-;; https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-after.png;>
+;; Before:
+;; 
https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-before.png
+;;
+;; After:
+;; 
https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-after.png
 ;;
 ;;; Code:
 



[elpa] master 4be8d94 17/22: Revert "Regenerate README.md (now includes MELPA stable badge)"

2016-08-03 Thread Stefan Monnier
branch: master
commit 4be8d941c43caebaa078d5674ba521d4edee8969
Author: Mitchel Humpherys 
Commit: Mitchel Humpherys 

Revert "Regenerate README.md (now includes MELPA stable badge)"

This reverts commit 214ec5945c315f81907e91637204bc4632090a48.

diffview isn't actually listed on MELPA stable yet.
---
 README.md |1 -
 1 file changed, 1 deletion(-)

diff --git a/README.md b/README.md
index 970b032..018825a 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,6 @@
 ---
 [![License 
GPLv3](https://img.shields.io/badge/license-GPL_v3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.html)
 
[![MELPA](http://melpa.org/packages/diffview-badge.svg)](http://melpa.org/#/diffview)
-[![MELPA](http://stable.melpa.org/packages/diffview-badge.svg)](http://stable.melpa.org/#/diffview)
 
 Render a unified diff (top/bottom) in an easy-to-comprehend side-by-side
 format.  This comes in handy for reading patches from mailing lists (or



[elpa] master 9029356 08/22: Update documentation

2016-08-03 Thread Stefan Monnier
branch: master
commit 9029356ed0b33f4b50f3ae7d5f327fe487008859
Author: Mitchel Humpherys 
Commit: Mitchel Humpherys 

Update documentation
---
 Makefile|8 
 README.md   |   40 
 diffview.el |   47 ---
 3 files changed, 64 insertions(+), 31 deletions(-)

diff --git a/Makefile b/Makefile
new file mode 100644
index 000..d2403cf
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,8 @@
+README.md: make-readme-markdown.el diffview.el
+   emacs --script $< < diffview.el >$@ 2>/dev/null
+
+make-readme-markdown.el:
+   wget -q -O $@ 
https://raw.github.com/mgalgs/make-readme-markdown/master/make-readme-markdown.el
+
+.INTERMEDIATE: make-readme-markdown.el
+.PHONY: README.md
diff --git a/README.md b/README.md
index 11807e5..59fc3a2 100644
--- a/README.md
+++ b/README.md
@@ -1,34 +1,58 @@
-Commentary
-==
+## diffview.el
+*View diffs in side-by-side format*
+
+---
+[![License 
GPL3](https://img.shields.io/badge/license-GPL_3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.html)
 
 Take a plain ol' diff and view it in an easier-to-comprehend
 side-by-side format. This comes in handy for ready patches from
 mailing lists (or from whencever you might acquire them).
 
-Installation
-
+### Installation
+
 
 Put this file on your load-path and do:
 
 (require 'diffview)
 
-Use
-===
+### Usage
+
 
 The following functions are provided:
 
 * `diffview-current` : Opens the current buffer with `diffview`
 * `diffview-region` : Opens the current region with `diffview`
+* `diffview-message` : Opens the current email message with `diffview`
 
 
-Screenshots
-===
+### Screenshots
+
 
 Before:
 https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-before.png;>
 After:
 https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-after.png;>
 
+### Function Documentation
+
+
+ `(diffview-current)`
+
+Parses the content of the current buffer as a diff and opens
+  the result in a side-by-side view
+
+ `(diffview-region)`
+
+Parses the content of the current buffer as a diff and opens
+  the result in a side-by-side view
+
+ `(diffview-message)`
+
+Parses the content of the current buffer (assumed to be a
+  message (i.e. in `Article` mode)) as a diff and opens the
+  result in a side-by-side view
+
+-
 
 Markdown README file generated by
 https://github.com/mgalgs/make-readme-markdown;>make-readme-markdown.el
diff --git a/diffview.el b/diffview.el
index 88ed98d..45e421f 100644
--- a/diffview.el
+++ b/diffview.el
@@ -53,7 +53,7 @@
 
 (require 'message)
 
-(defun diffview/print-all-lines-to-buffer (lines buffer-name)
+(defun diffview--print-all-lines-to-buffer (lines buffer-name)
   "Prints each line in `LINES' to a buffer named `BUFFER-NAME'
   with an intervening \n between each line"
   (let ((old-temp-buffer (get-buffer buffer-name)))
@@ -65,18 +65,18 @@
   (dolist (line lines)
(insert line "\n")
 
-(defvar diffview/minus-bufname "*side-by-side-1*")
-(defvar diffview/plus-bufname "*side-by-side-2*")
-(defvar diffview/saved-wincfg nil)
-(defvar diffview/regexp-is-plus-line "^\\+\\([^+]\\{1\\}\\|$\\)"
+(defvar diffview--minus-bufname "*side-by-side-1*")
+(defvar diffview--plus-bufname "*side-by-side-2*")
+(defvar diffview--saved-wincfg nil)
+(defvar diffview--regexp-is-plus-line "^\\+\\([^+]\\{1\\}\\|$\\)"
   "a + followed by one non + or the end of the line")
-(defvar diffview/regexp-is-minus-line "^-\\([^-]\\{1\\}\\|$\\)"
+(defvar diffview--regexp-is-minus-line "^-\\([^-]\\{1\\}\\|$\\)"
   "a - followed by one non - or the end of the line")
 
-(defun diffview/view-string (input-string)
+(defun diffview--view-string (input-string)
   "Parses `INPUT-STRING' as a diff and opens the result in a
 side-by-side view"
-  (setq diffview/saved-wincfg (current-window-configuration))
+  (setq diffview--saved-wincfg (current-window-configuration))
   (delete-other-windows)
   (let (plus-lines
minus-lines
@@ -89,11 +89,11 @@ side-by-side view"
(all-lines (split-string input-string "\n")))
 (dolist (line all-lines)
   (cond
-   ((string-match diffview/regexp-is-plus-line line)
+   ((string-match diffview--regexp-is-plus-line line)
(push line plus-lines)
(setq current-state 'in-plus)
(setq current-lines-in-plus (1+ current-lines-in-plus)))
-   ((string-match diffview/regexp-is-minus-line line)
+   ((string-match diffview--regexp-is-minus-line line)
(push line minus-lines)
(setq current-state 'in-minus)
(setq current-lines-in-minus (1+ current-lines-in-minus)))
@@ -132,17 +132,17 @@ side-by-side view"
 
   (setq last-state current-state))
 
-(diffview/print-all-lines-to-buffer (reverse minus-lines) 
diffview/minus-bufname)
-(diffview/print-all-lines-to-buffer (reverse plus-lines) 
diffview/plus-bufname)
+

[elpa] master e321c3d 09/22: Improve clarity of some docs

2016-08-03 Thread Stefan Monnier
branch: master
commit e321c3d6a7db3ce74e6b9dae565b66f6354b89a6
Author: Mitchel Humpherys 
Commit: Mitchel Humpherys 

Improve clarity of some docs

I can haz understand you?
---
 README.md   |   17 ++---
 diffview.el |   17 ++---
 2 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/README.md b/README.md
index 59fc3a2..1e8851d 100644
--- a/README.md
+++ b/README.md
@@ -4,9 +4,9 @@
 ---
 [![License 
GPL3](https://img.shields.io/badge/license-GPL_3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.html)
 
-Take a plain ol' diff and view it in an easier-to-comprehend
-side-by-side format. This comes in handy for ready patches from
-mailing lists (or from whencever you might acquire them).
+Render a unified diff (top/bottom) in an easy-to-comprehend side-by-side
+format. This comes in handy for reading patches from mailing lists (or
+from whencever you might acquire them).
 
 ### Installation
 
@@ -15,14 +15,17 @@ Put this file on your load-path and do:
 
 (require 'diffview)
 
+(MELPA installation coming soon...)
+
 ### Usage
 
 
-The following functions are provided:
+The following functions are provided for launching a side-by-side diff:
 
-* `diffview-current` : Opens the current buffer with `diffview`
-* `diffview-region` : Opens the current region with `diffview`
-* `diffview-message` : Opens the current email message with `diffview`
+* `diffview-current` : View the current diff buffer side-by-side
+* `diffview-region` : View the current diff region side-by-side
+* `diffview-message` : View the current email message (which presumably
+   contains a patch) side-by-side
 
 
 ### Screenshots
diff --git a/diffview.el b/diffview.el
index 45e421f..9e149da 100644
--- a/diffview.el
+++ b/diffview.el
@@ -23,9 +23,9 @@
 ;;; Commentary:
 ;; [![License 
GPL3](https://img.shields.io/badge/license-GPL_3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.html)
 ;;
-;; Take a plain ol' diff and view it in an easier-to-comprehend
-;; side-by-side format. This comes in handy for ready patches from
-;; mailing lists (or from whencever you might acquire them).
+;; Render a unified diff (top/bottom) in an easy-to-comprehend side-by-side
+;; format. This comes in handy for reading patches from mailing lists (or
+;; from whencever you might acquire them).
 ;;
 ;;; Installation:
 ;;
@@ -33,13 +33,16 @@
 ;;
 ;; (require 'diffview)
 ;;
+;; (MELPA installation coming soon...)
+;;
 ;;; Usage:
 ;;
-;; The following functions are provided:
+;; The following functions are provided for launching a side-by-side diff:
 ;;
-;; o `diffview-current` : Opens the current buffer with `diffview`
-;; o `diffview-region` : Opens the current region with `diffview`
-;; o `diffview-message` : Opens the current email message with `diffview`
+;; o `diffview-current` : View the current diff buffer side-by-side
+;; o `diffview-region` : View the current diff region side-by-side
+;; o `diffview-message` : View the current email message (which presumably
+;;contains a patch) side-by-side
 ;;
 ;;
 ;;; Screenshots:



[elpa] master 031b709 21/22: diffview.el: Add `Maintainer' pseudo-header

2016-08-03 Thread Stefan Monnier
branch: master
commit 031b70913e755c5e55222680f80185032a7d1728
Author: Mitchel Humpherys 
Commit: Mitchel Humpherys 

diffview.el: Add `Maintainer' pseudo-header
---
 diffview.el |1 +
 1 file changed, 1 insertion(+)

diff --git a/diffview.el b/diffview.el
index 4b5b337..06bbf42 100644
--- a/diffview.el
+++ b/diffview.el
@@ -3,6 +3,7 @@
 ;; Copyright (C) 2013-2015, Mitchel Humpherys
 
 ;; Author: Mitchel Humpherys 
+;; Maintainer: Mitchel Humpherys 
 ;; Keywords: convenience, diff
 ;; Version: 1.0
 ;; URL: https://github.com/mgalgs/diffview-mode



[elpa] master dd42c87 14/22: Regenerate README.md (now includes MELPA badge)

2016-08-03 Thread Stefan Monnier
branch: master
commit dd42c87f1d30d2f77c769633490c524363f9dee6
Author: Mitchel Humpherys 
Commit: Mitchel Humpherys 

Regenerate README.md (now includes MELPA badge)
---
 README.md |1 +
 1 file changed, 1 insertion(+)

diff --git a/README.md b/README.md
index e060bad..018825a 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,7 @@
 
 ---
 [![License 
GPLv3](https://img.shields.io/badge/license-GPL_v3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.html)
+[![MELPA](http://melpa.org/packages/diffview-badge.svg)](http://melpa.org/#/diffview)
 
 Render a unified diff (top/bottom) in an easy-to-comprehend side-by-side
 format.  This comes in handy for reading patches from mailing lists (or



[elpa] master 5baa699 02/22: add screenshots

2016-08-03 Thread Stefan Monnier
branch: master
commit 5baa69931ebd27ee5122da69fd97080dcedcff5a
Author: Mitchel Humpherys 
Commit: Mitchel Humpherys 

add screenshots
---
 README.md   |9 +
 diffview.el |   10 +-
 screenshots/diffview-after.png  |  Bin 0 -> 199810 bytes
 screenshots/diffview-before.png |  Bin 0 -> 184048 bytes
 4 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 3d61877..da539e7 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,15 @@ The following functions are provided:
 * `diffview-current` : Opens the current buffer with `diffview`
 * `diffview-region` : Opens the current region with `diffview`
 
+
+Screenshots
+===
+
+Before:
+https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-before.png;>
+After:
+https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-after.png;>
+
 
 Markdown README file generated by
 https://github.com/mgalgs/make-readme-markdown;>make-readme-markdown.el
diff --git a/diffview.el b/diffview.el
index 34af32c..aed24bb 100644
--- a/diffview.el
+++ b/diffview.el
@@ -29,7 +29,7 @@
 ;;
 ;; Put this file on your load-path and do:
 ;;
-;;`   (require 'diffview)
+;; (require 'diffview)
 ;;
 ;;; Use:
 ;;
@@ -38,6 +38,14 @@
 ;; o `diffview-current` : Opens the current buffer with `diffview`
 ;; o `diffview-region` : Opens the current region with `diffview`
 ;;
+;;
+;;; Screenshots:
+;;
+;; Before:
+;; https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-before.png;>
+;; After:
+;; https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-after.png;>
+;;
 ;;; Code
 
 
diff --git a/screenshots/diffview-after.png b/screenshots/diffview-after.png
new file mode 100644
index 000..a59d9b5
Binary files /dev/null and b/screenshots/diffview-after.png differ
diff --git a/screenshots/diffview-before.png b/screenshots/diffview-before.png
new file mode 100644
index 000..b33fca7
Binary files /dev/null and b/screenshots/diffview-before.png differ



[elpa] master 32bb19a 20/22: README.md: Re-generate (now includes MELPA stable badge)

2016-08-03 Thread Stefan Monnier
branch: master
commit 32bb19afdb5b0bd6b998692efb20e20a59d3af9b
Author: Mitchel Humpherys 
Commit: Mitchel Humpherys 

README.md: Re-generate (now includes MELPA stable badge)
---
 README.md |1 +
 1 file changed, 1 insertion(+)

diff --git a/README.md b/README.md
index c82dfdb..d64002d 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,7 @@
 ---
 [![License 
GPLv3](https://img.shields.io/badge/license-GPL_v3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.html)
 
[![MELPA](http://melpa.org/packages/diffview-badge.svg)](http://melpa.org/#/diffview)
+[![MELPA 
Stable](http://stable.melpa.org/packages/diffview-badge.svg)](http://stable.melpa.org/#/diffview)
 
 Render a unified diff (top/bottom) in an easy-to-comprehend side-by-side
 format.  This comes in handy for reading patches from mailing lists (or



[elpa] master 8220a31 03/22: improve documentation

2016-08-03 Thread Stefan Monnier
branch: master
commit 8220a31d7b5de085ce53bd70f62bc8f6c990339c
Author: Mitchel Humpherys 
Commit: Mitchel Humpherys 

improve documentation
---
 README.md   |6 +++---
 diffview.el |6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index da539e7..11807e5 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
 Commentary
 ==
 
-View a diff in a side-by-side format. This comes in handy for ready
-patches from mailing lists (or from whencever you might acquire
-them).
+Take a plain ol' diff and view it in an easier-to-comprehend
+side-by-side format. This comes in handy for ready patches from
+mailing lists (or from whencever you might acquire them).
 
 Installation
 
diff --git a/diffview.el b/diffview.el
index aed24bb..3c45ee0 100644
--- a/diffview.el
+++ b/diffview.el
@@ -21,9 +21,9 @@
 
 ;;; Commentary:
 ;;
-;; View a diff in a side-by-side format. This comes in handy for ready
-;; patches from mailing lists (or from whencever you might acquire
-;; them).
+;; Take a plain ol' diff and view it in an easier-to-comprehend
+;; side-by-side format. This comes in handy for ready patches from
+;; mailing lists (or from whencever you might acquire them).
 ;;
 ;;; Installation:
 ;;



[elpa] master a156d34 07/22: set up some more reasonable autoloads

2016-08-03 Thread Stefan Monnier
branch: master
commit a156d34dba967412b6b464c8ebefcc5f6a98b95f
Author: Mitchel Humpherys 
Commit: Mitchel Humpherys 

set up some more reasonable autoloads
---
 diffview.el |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/diffview.el b/diffview.el
index 4657459..88ed98d 100644
--- a/diffview.el
+++ b/diffview.el
@@ -33,12 +33,13 @@
 ;;
 ;; (require 'diffview)
 ;;
-;;; Use:
+;;; Usage:
 ;;
 ;; The following functions are provided:
 ;;
 ;; o `diffview-current` : Opens the current buffer with `diffview`
 ;; o `diffview-region` : Opens the current region with `diffview`
+;; o `diffview-message` : Opens the current email message with `diffview`
 ;;
 ;;
 ;;; Screenshots:
@@ -147,18 +148,21 @@ side-by-side view"
 
 (scroll-all-mode)))
 
+;;;###autoload
 (defun diffview-current ()
   "Parses the content of the current buffer as a diff and opens
   the result in a side-by-side view"
   (interactive)
   (diffview/view-string (buffer-string)))
 
+;;;###autoload
 (defun diffview-region ()
   "Parses the content of the current buffer as a diff and opens
   the result in a side-by-side view"
   (interactive)
   (diffview/view-string (buffer-substring (point) (mark
 
+;;;###autoload
 (defun diffview-message ()
   "Parses the content of the current buffer (assumed to be a
   message (i.e. in `Article' mode)) as a diff and opens the
@@ -177,7 +181,6 @@ side-by-side view"
 
 ;;; diffview-mode ;;;
 
-;;;###autoload
 (define-derived-mode diffview-mode special-mode "Diffview"
   "Mode for viewing diffs side-by-side"
   (setq font-lock-defaults '(diff-font-lock-keywords t nil nil nil 
(font-lock-multiline . nil



[elpa] master 63f00b4 13/22: Add MELPA installation instructions

2016-08-03 Thread Stefan Monnier
branch: master
commit 63f00b4a3494874a04066d46b9f57ce5c0f73628
Author: Mitchel Humpherys 
Commit: Mitchel Humpherys 

Add MELPA installation instructions
---
 README.md   |6 +-
 diffview.el |6 +-
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/README.md b/README.md
index 93a56e4..e060bad 100644
--- a/README.md
+++ b/README.md
@@ -11,11 +11,7 @@ from whencever you might acquire them).
 ### Installation
 
 
-Put this file on your load-path and do:
-
-(require 'diffview)
-
-(MELPA installation coming soon...)
+M-x package-install diffview
 
 ### Usage
 
diff --git a/diffview.el b/diffview.el
index 983f9a4..46bf81a 100644
--- a/diffview.el
+++ b/diffview.el
@@ -28,11 +28,7 @@
 ;;
 ;;; Installation:
 ;;
-;; Put this file on your load-path and do:
-;;
-;; (require 'diffview)
-;;
-;; (MELPA installation coming soon...)
+;; M-x package-install diffview
 ;;
 ;;; Usage:
 ;;



[elpa] master 1ba9c74 04/22: Add GPLv3 badge

2016-08-03 Thread Stefan Monnier
branch: master
commit 1ba9c74bfc3303dde76464925fc668cfb6077be1
Author: Mitchel Humpherys 
Commit: Mitchel Humpherys 

Add GPLv3 badge
---
 diffview.el |1 +
 1 file changed, 1 insertion(+)

diff --git a/diffview.el b/diffview.el
index 3c45ee0..2449b05 100644
--- a/diffview.el
+++ b/diffview.el
@@ -20,6 +20,7 @@
 ;; along with this program.  If not, see .
 
 ;;; Commentary:
+;; [![License 
GPL3](https://img.shields.io/badge/license-GPL_3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.html)
 ;;
 ;; Take a plain ol' diff and view it in an easier-to-comprehend
 ;; side-by-side format. This comes in handy for ready patches from



[elpa] master 214ec59 16/22: Regenerate README.md (now includes MELPA stable badge)

2016-08-03 Thread Stefan Monnier
branch: master
commit 214ec5945c315f81907e91637204bc4632090a48
Author: Mitchel Humpherys 
Commit: Mitchel Humpherys 

Regenerate README.md (now includes MELPA stable badge)
---
 README.md |1 +
 1 file changed, 1 insertion(+)

diff --git a/README.md b/README.md
index 018825a..970b032 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,7 @@
 ---
 [![License 
GPLv3](https://img.shields.io/badge/license-GPL_v3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.html)
 
[![MELPA](http://melpa.org/packages/diffview-badge.svg)](http://melpa.org/#/diffview)
+[![MELPA](http://stable.melpa.org/packages/diffview-badge.svg)](http://stable.melpa.org/#/diffview)
 
 Render a unified diff (top/bottom) in an easy-to-comprehend side-by-side
 format.  This comes in handy for reading patches from mailing lists (or



[elpa] master c762e64 11/22: Use emacs quotes

2016-08-03 Thread Stefan Monnier
branch: master
commit c762e64509d1fd01617e3273a78a61ee5a77aaa0
Author: Mitchel Humpherys 
Commit: Mitchel Humpherys 

Use emacs quotes

indent-hints knows how to convert them to markdown anyways.
---
 diffview.el |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/diffview.el b/diffview.el
index 874775d..075efad 100644
--- a/diffview.el
+++ b/diffview.el
@@ -39,9 +39,9 @@
 ;;
 ;; The following functions are provided for launching a side-by-side diff:
 ;;
-;; o `diffview-current` : View the current diff buffer side-by-side
-;; o `diffview-region` : View the current diff region side-by-side
-;; o `diffview-message` : View the current email message (which presumably
+;; o `diffview-current' : View the current diff buffer side-by-side
+;; o `diffview-region' : View the current diff region side-by-side
+;; o `diffview-message' : View the current email message (which presumably
 ;;contains a patch) side-by-side
 ;;
 ;;



[elpa] master c4c7eb3: * packages/sml-mode/sml-mode.el (sml-tyvarseq-re): Backtrack less (bug#24205)

2016-08-14 Thread Stefan Monnier
branch: master
commit c4c7eb33396f0617742cfa5e14edd41f2e79084a
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* packages/sml-mode/sml-mode.el (sml-tyvarseq-re): Backtrack less 
(bug#24205)
---
 packages/sml-mode/sml-mode.el |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/packages/sml-mode/sml-mode.el b/packages/sml-mode/sml-mode.el
index e94b571..f4adf11 100644
--- a/packages/sml-mode/sml-mode.el
+++ b/packages/sml-mode/sml-mode.el
@@ -257,8 +257,8 @@ notion of \"the end of an outline\".")
   (defconst sml-id-re "\\sw\\(?:\\sw\\|\\s_\\)*"))
 
 (defconst sml-tyvarseq-re
-  (concat "\\(?:\\(?:'+" sml-id-re "\\|(\\(?:[,']\\|" sml-id-re
-  "\\|\\s-\\)+)\\)\\s-+\\)?"))
+  (concat "\\(?:\\(?:'+" sml-id-re "\\|(\\(?:[,' \t\n]+" sml-id-re
+  "\\)+)\\)\\s-+\\)?"))
 
 ;;; Font-lock settings 
 



[elpa] master f49409b: * nlinum.el: Add highlighting of the current line

2016-07-20 Thread Stefan Monnier
branch: master
commit f49409b7721d600f8a51f893f69fd73382bee0e2
Author: Kaushal Modi <kaushal.m...@gmail.com>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

* nlinum.el: Add highlighting of the current line

(nlinum): New group.
(nlinum-highlight-current-line): New defcustom.
(nlinum-current-line): New face.
(nlinum--current-line): New var.
(nlinum-format-function): Use them.
(nlinum--current-line-update): New function.
(nlinum-mode): Use it.
---
 packages/nlinum/nlinum.el |   90 +++--
 1 file changed, 78 insertions(+), 12 deletions(-)

diff --git a/packages/nlinum/nlinum.el b/packages/nlinum/nlinum.el
index 98c9cbc..358cad4 100644
--- a/packages/nlinum/nlinum.el
+++ b/packages/nlinum/nlinum.el
@@ -1,6 +1,6 @@
 ;;; nlinum.el --- Show line numbers in the margin  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2012, 2014, 2015  Free Software Foundation, Inc.
+;; Copyright (C) 2012, 2014, 2015, 2016  Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <monn...@iro.umontreal.ca>
 ;; Keywords: convenience
@@ -26,6 +26,11 @@
 
 ;;; News:
 
+;; v1.7:
+;; - Add ability to highlight current line number.
+;; - New custom variable `nlinum-highlight-current-line' and
+;;   face `nlinum-current-line'.
+
 ;; v1.3:
 ;; - New custom variable `nlinum-format'.
 ;; - Change in calling convention of `nlinum-format-function'.
@@ -36,11 +41,33 @@
 
 ;;; Code:
 
-(require 'linum);For its face.
+(require 'linum);For its face
+
+(defgroup nlinum nil
+  "Show line numbers in the margin, (hopefully) more efficiently."
+  :group 'convenience
+  :group 'linum
+  :prefix "nlinum")
+
+(defcustom nlinum-highlight-current-line nil
+  ;; FIXME: It would be good to enable it by default, but only once we make it
+  ;; work right with multiple-windows.
+  "Whether the current line number should be highlighted.
+When non-nil, the current line number is highlighted in `nlinum-current-line'
+face."
+  :type 'boolean)
+
+(defface nlinum-current-line
+  '((t :inherit linum :weight bold))
+  "Face for displaying current line.")
 
 (defvar nlinum--width 2)
 (make-variable-buffer-local 'nlinum--width)
 
+(defvar nlinum--current-line 0
+  "Store current line number.")
+(make-variable-buffer-local 'nlinum--current-line)
+
 ;; (defvar nlinum--desc "")
 
 ;;;###autoload
@@ -53,9 +80,10 @@ if ARG is omitted or nil.
 Linum mode is a buffer-local minor mode."
   :lighter nil ;; (" NLinum" nlinum--desc)
   (jit-lock-unregister #'nlinum--region)
-  (remove-hook 'window-configuration-change-hook #'nlinum--setup-window t)
-  (remove-hook 'text-scale-mode-hook #'nlinum--setup-window t)
-  (remove-hook 'after-change-functions #'nlinum--after-change t)
+  (remove-hook 'window-configuration-change-hook #'nlinum--setup-window :local)
+  (remove-hook 'text-scale-mode-hook #'nlinum--setup-window :local)
+  (remove-hook 'after-change-functions #'nlinum--after-change :local)
+  (remove-hook 'post-command-hook #'nlinum--current-line-update :local)
   (kill-local-variable 'nlinum--line-number-cache)
   (remove-overlays (point-min) (point-max) 'nlinum t)
   ;; (kill-local-variable 'nlinum--ol-counter)
@@ -64,10 +92,13 @@ Linum mode is a buffer-local minor mode."
 ;; FIXME: Another approach would be to make the mode permanent-local,
 ;; which might indeed be preferable.
 (add-hook 'change-major-mode-hook (lambda () (nlinum-mode -1)))
-(add-hook 'text-scale-mode-hook #'nlinum--setup-window nil t)
+(add-hook 'text-scale-mode-hook #'nlinum--setup-window nil :local)
 (add-hook 'window-configuration-change-hook #'nlinum--setup-window nil t)
-(add-hook 'after-change-functions #'nlinum--after-change nil t)
-(jit-lock-register #'nlinum--region t))
+(add-hook 'after-change-functions #'nlinum--after-change nil :local)
+(if nlinum-highlight-current-line
+(add-hook 'post-command-hook #'nlinum--current-line-update nil :local)
+  (remove-hook 'post-command-hook #'nlinum--current-line-update :local))
+(jit-lock-register #'nlinum--region :contextual))
   (nlinum--setup-windows))
 
 (defun nlinum--face-height (face)
@@ -131,6 +162,34 @@ Linum mode is a buffer-local minor mode."
  (point-min) (point-max) '(fontified)
   (current-buffer)))
 
+(defun nlinum--current-line-update ()
+  "Update current line number."
+  (let ((last-line nlinum--current-line))
+(setq nlinum--current-line (save-excursion
+ (forward-line 0)
+ (nlinum--line-number-at-pos)))
+
+(let ((line-diff (- last-line nlinum--current-line))
+  beg end)
+  ;; Remove the text properties only if the current line has changed.
+  (when (not (zerop line-diff))
+(if (natnump line-di

<    3   4   5   6   7   8   9   10   11   12   >