[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)
+(diffview--print-all-lines-to-buffer (reverse m

[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 da412da 15/22: Makefile: Proper local build support

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

Makefile: Proper local build support
---
 Makefile |5 +
 1 file changed, 5 insertions(+)

diff --git a/Makefile b/Makefile
index 8031cc2..a422376 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,13 @@
 README.md: make-readme-markdown.el diffview.el
emacs --script $< < diffview.el >$@
 
+ifeq ($(LOCAL),1)
+make-readme-markdown.el:
+   cp -v ../make-readme-markdown/make-readme-markdown.el .
+else
 make-readme-markdown.el:
wget -q -O $@ 
https://raw.github.com/mgalgs/make-readme-markdown/master/make-readme-markdown.el
+endif
 
 .INTERMEDIATE: make-readme-markdown.el
 .PHONY: README.md



[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 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 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)
+   ;; need to fill minus
+   (setq tmp-line (pop minus-lines))
+ 

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

2016-08-03 Thread Stefan Monnier
branch: master
commit d50a05d81c72003813022697ca7000a87ec30f7d
Author: Stefan Monnier 
Commit: Stefan Monnier 

* 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 
 ;; Maintainer: Mitchel Humpherys 



[elpa] master e30def7 22/22: Add 'packages/diffview/' from commit '031b70913e755c5e55222680f80185032a7d1728'

2016-08-03 Thread Stefan Monnier
branch: master
commit e30def702b08dc9ed7ed116553d9ad23916d
Merge: 431bb44 031b709
Author: Stefan Monnier 
Commit: Stefan Monnier 

Add 'packages/diffview/' from commit 
'031b70913e755c5e55222680f80185032a7d1728'

git-subtree-dir: packages/diffview
git-subtree-mainline: 431bb447c523ed2114d7989a7127d2fd864f62b6
git-subtree-split: 031b70913e755c5e55222680f80185032a7d1728
---
 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(+)

diff --git a/packages/diffview/Makefile b/packages/diffview/Makefile
new file mode 100644
index 000..a422376
--- /dev/null
+++ b/packages/diffview/Makefile
@@ -0,0 +1,13 @@
+README.md: make-readme-markdown.el diffview.el
+   emacs --script $< < diffview.el >$@
+
+ifeq ($(LOCAL),1)
+make-readme-markdown.el:
+   cp -v ../make-readme-markdown/make-readme-markdown.el .
+else
+make-readme-markdown.el:
+   wget -q -O $@ 
https://raw.github.com/mgalgs/make-readme-markdown/master/make-readme-markdown.el
+endif
+
+.INTERMEDIATE: make-readme-markdown.el
+.PHONY: README.md
diff --git a/packages/diffview/README.md b/packages/diffview/README.md
new file mode 100644
index 000..d64002d
--- /dev/null
+++ b/packages/diffview/README.md
@@ -0,0 +1,59 @@
+## diffview.el
+*View diffs in side-by-side format*
+
+---
+[![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
+from whencever you might acquire them).
+
+### Installation
+
+
+M-x package-install diffview
+
+### Usage
+
+
+The following functions are provided for launching a side-by-side diff:
+
+* `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
+
+
+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)`
+
+Show current diff buffer in a side-by-side view.
+
+ `(diffview-region)`
+
+Show current diff region in a side-by-side view.
+
+ `(diffview-message)`
+
+Show `message-mode` buffer in a side-by-side view.
+
+This is useful for reading patches from mailing lists.
+
+-
+
+Markdown README file generated by
+https://github.com/mgalgs/make-readme-markdown";>make-readme-markdown.el
+
diff --git a/packages/diffview/diffview.el b/packages/diffview/diffview.el
new file mode 100644
index 000..06bbf42
--- /dev/null
+++ b/packages/diffview/diffview.el
@@ -0,0 +1,200 @@
+;;; diffview.el --- View diffs in side-by-side format
+
+;; 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
+
+;; 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:
+;;
+;; 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:
+;;
+;; M-x package-install diffview
+;;
+;;; Usage:
+;;
+;; 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
+;;contains a patch) side-by-side
+;;
+;;
+;;; Screenshots:
+;;
+;; Before:
+;; 
https://raw.github.

[elpa] master d94ebf7 10/22: Fix some `checkdoc' warnings

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

Fix some `checkdoc' warnings
---
 README.md   |   14 ++
 diffview.el |   26 +++---
 2 files changed, 17 insertions(+), 23 deletions(-)

diff --git a/README.md b/README.md
index 1e8851d..d3297ef 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
 [![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
+format.  This comes in handy for reading patches from mailing lists (or
 from whencever you might acquire them).
 
 ### Installation
@@ -41,19 +41,17 @@ After:
 
  `(diffview-current)`
 
-Parses the content of the current buffer as a diff and opens
-  the result in a side-by-side view
+Show current diff buffer 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
+Show current diff region 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
+Show `message-mode` buffer in a side-by-side view.
+
+This is useful for reading patches from mailing lists.
 
 -
 
diff --git a/diffview.el b/diffview.el
index 9e149da..874775d 100644
--- a/diffview.el
+++ b/diffview.el
@@ -24,7 +24,7 @@
 ;; [![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
+;; format.  This comes in handy for reading patches from mailing lists (or
 ;; from whencever you might acquire them).
 ;;
 ;;; Installation:
@@ -57,8 +57,7 @@
 (require 'message)
 
 (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"
+  "Prints each line in `LINES' to a buffer named `BUFFER-NAME'."
   (let ((old-temp-buffer (get-buffer buffer-name)))
 ;; (with-output-to-temp-buffer buffer-name
 (when old-temp-buffer
@@ -72,13 +71,12 @@
 (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")
+  "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")
+  "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"
+  "Displays `INPUT-STRING' (a diff) in a side-by-side view."
   (setq diffview--saved-wincfg (current-window-configuration))
   (delete-other-windows)
   (let (plus-lines
@@ -153,23 +151,21 @@ side-by-side view"
 
 ;;;###autoload
 (defun diffview-current ()
-  "Parses the content of the current buffer as a diff and opens
-  the result in a side-by-side view"
+  "Show current diff buffer 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"
+  "Show current diff region 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
-  result in a side-by-side view"
+  "Show `message-mode' buffer in a side-by-side view.
+
+This is useful for reading patches from mailing lists."
   (interactive)
   (let (beg end)
 (save-excursion
@@ -190,7 +186,7 @@ side-by-side view"
   (setq font-lock-defaults '(diff-font-lock-keywords t nil nil nil 
(font-lock-multiline . nil
 
 (defun diffview--quit ()
-  "Quit diffview and clean up diffview buffers"
+  "Quit diffview and clean up diffview buffers."
   (interactive)
   (delete-other-windows)
   (scroll-all-mode 0)



[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 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 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 471dc36 18/22: diffview.el: Version bump (1.0)

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

diffview.el: Version bump (1.0)
---
 diffview.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/diffview.el b/diffview.el
index 46bf81a..e38da44 100644
--- a/diffview.el
+++ b/diffview.el
@@ -4,7 +4,7 @@
 
 ;; Author: Mitchel Humpherys 
 ;; Keywords: convenience, diff
-;; Version: 0.1
+;; Version: 1.0
 ;; URL: https://github.com/mgalgs/diffview-mode
 
 ;; This program is free software; you can redistribute it and/or modify



[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 a275e71: Improve poker-hand-value performance by 25%

2016-08-03 Thread Mario Lang
branch: master
commit a275e71c6ef8e3ece445d53582491fc606304d1b
Author: Mario Lang 
Commit: Mario Lang 

Improve poker-hand-value performance by 25%

Avoid unnecessary calls to poker-card-suit in flush check.
---
 packages/poker/poker.el |   13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/packages/poker/poker.el b/packages/poker/poker.el
index c908bb6..61888ae 100644
--- a/packages/poker/poker.el
+++ b/packages/poker/poker.el
@@ -109,11 +109,16 @@ The highest possible value is therefore #x8CBA98 and the 
lowest is #x053210."
 (eq (nth 1 ranks) 3))
(setq ranks '(3 2 1 0 0)))
  (eq (- (nth 0 ranks) (nth 4 ranks)) 4)))
-   (flush (not (cdr (delete-dups (mapcar #'poker-card-suit 
hand))
+   (flush (let ((suit (poker-card-suit (car hand)))
+(tail (cdr hand)))
+(while (and tail
+(eq suit (poker-card-suit (car tail
+  (setq tail (cdr tail)))
+(not tail
(cond ((and straight flush) #x80)
- (straight #x40)
- (flush #x50)
- (t 0
+ (straight #x40)
+ (flush#x50)
+ (t  0
 ((equal rank-counts '(2 2 1)) #x20)
 ((equal rank-counts '(3 1 1)) #x30)
 ((equal rank-counts '(3 2)) #x60)



[elpa] master c2b86af 5/5: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa

2016-08-03 Thread Rocky Bernstein
branch: master
commit c2b86afdf5df89981ff740520c3ac3a976c9a445
Merge: 20947cb a275e71
Author: rocky 
Commit: rocky 

Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa
---
 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
 packages/el-search/el-search.el   |   13 ++
 packages/poker/poker.el   |   13 +-
 7 files changed, 294 insertions(+), 4 deletions(-)

diff --git a/packages/diffview/Makefile b/packages/diffview/Makefile
new file mode 100644
index 000..a422376
--- /dev/null
+++ b/packages/diffview/Makefile
@@ -0,0 +1,13 @@
+README.md: make-readme-markdown.el diffview.el
+   emacs --script $< < diffview.el >$@
+
+ifeq ($(LOCAL),1)
+make-readme-markdown.el:
+   cp -v ../make-readme-markdown/make-readme-markdown.el .
+else
+make-readme-markdown.el:
+   wget -q -O $@ 
https://raw.github.com/mgalgs/make-readme-markdown/master/make-readme-markdown.el
+endif
+
+.INTERMEDIATE: make-readme-markdown.el
+.PHONY: README.md
diff --git a/packages/diffview/README.md b/packages/diffview/README.md
new file mode 100644
index 000..d64002d
--- /dev/null
+++ b/packages/diffview/README.md
@@ -0,0 +1,59 @@
+## diffview.el
+*View diffs in side-by-side format*
+
+---
+[![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
+from whencever you might acquire them).
+
+### Installation
+
+
+M-x package-install diffview
+
+### Usage
+
+
+The following functions are provided for launching a side-by-side diff:
+
+* `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
+
+
+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)`
+
+Show current diff buffer in a side-by-side view.
+
+ `(diffview-region)`
+
+Show current diff region in a side-by-side view.
+
+ `(diffview-message)`
+
+Show `message-mode` buffer in a side-by-side view.
+
+This is useful for reading patches from mailing lists.
+
+-
+
+Markdown README file generated by
+https://github.com/mgalgs/make-readme-markdown";>make-readme-markdown.el
+
diff --git a/packages/diffview/diffview.el b/packages/diffview/diffview.el
new file mode 100644
index 000..2455c67
--- /dev/null
+++ b/packages/diffview/diffview.el
@@ -0,0 +1,200 @@
+;;; diffview.el --- View diffs in side-by-side format
+
+;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
+
+;; Author: Mitchel Humpherys 
+;; Maintainer: Mitchel Humpherys 
+;; Keywords: convenience, diff
+;; Version: 1.0
+;; 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
+;; 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:
+;;
+;; 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:
+;;
+;; M-x package-install diffview
+;;
+;;; Usage:
+;;
+;; 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
+;;contains a patch) side-by-side
+;;
+;;
+;;; Screenshots:
+;;
+;; Before:
+;; 
https://raw.github.com/mgalgs/diffview-mode/master/screenshots/diffview-before.png

[elpa] master d7bac58 3/5: Wrong require again.

2016-08-03 Thread Rocky Bernstein
branch: master
commit d7bac581f04756582078cd9ea45e5a28406ee05c
Author: rocky 
Commit: rocky 

Wrong require again.

Reduce warnings in remake regexp test
---
 realgud/common/helper.el   |5 +
 realgud/common/track.el|   32 
 test/test-regexp-remake.el |   27 +--
 3 files changed, 54 insertions(+), 10 deletions(-)

diff --git a/realgud/common/helper.el b/realgud/common/helper.el
index 82bc878..705100d 100644
--- a/realgud/common/helper.el
+++ b/realgud/common/helper.el
@@ -13,6 +13,7 @@
 ;; GNU General Public License for more details.
 
 (require 'cl-lib)
+(require 'cl)
 
 ;;; Miscellaneous utility functions
 (require 'load-relative)
@@ -102,3 +103,7 @@ gives:
 ;;(eval (intern var-str
 
 (provide-me "realgud-")
+
+;; Local Variables:
+;; byte-compile-warnings: (not cl-functions)
+;; End:
diff --git a/realgud/common/track.el b/realgud/common/track.el
index 971534b..f047c13 100644
--- a/realgud/common/track.el
+++ b/realgud/common/track.el
@@ -206,6 +206,10 @@ evaluating (realgud-cmdbuf-info-loc-regexp 
realgud-cmdbuf-info)"
   (realgud-cmdbuf-pat 
"brkpt-disable")
   nil)
  (setq frame-num (realgud-track-selected-frame text))
+ (if (and frame-num (not loc))
+ (setq loc (realgud-track-loc-from-selected-frame
+text cmd-mark)))
+
  (setq bp-loc (realgud-track-bp-loc text-sans-loc cmd-mark cmdbuf))
  (if bp-loc
  (let ((src-buffer (realgud-loc-goto bp-loc)))
@@ -600,6 +604,30 @@ loc-regexp pattern"
   )
 
 
+(defun realgud-track-loc-from-selected-frame(text cmd-mark &optional
+ opt-regexp opt-ignore-file-re)
+  "Return a selected frame number found in TEXT or nil if none found."
+  (if (realgud-cmdbuf?)
+  (let ((selected-frame-pat (realgud-cmdbuf-pat "selected-frame"))
+   (frame-num-regexp)
+   (ignore-file-re (or opt-ignore-file-re
+   (realgud-sget 'cmdbuf-info 'ignore-file-re
+   (if (and selected-frame-pat
+(setq frame-num-regexp (realgud-loc-pat-regexp
+selected-frame-pat)))
+   (if (string-match frame-num-regexp text)
+   (let* ((file-group (realgud-loc-pat-file-group 
selected-frame-pat))
+  (line-group (realgud-loc-pat-line-group 
selected-frame-pat))
+  (filename (match-string file-group text))
+  (lineno (string-to-number (match-string line-group 
text
+ (if (and filename lineno)
+ (realgud:file-loc-from-line filename lineno
+ cmd-mark nil nil 
ignore-file-re)
+   nil))
+ nil)
+ nil))
+nil))
+
 (defun realgud-track-termination?(text)
   "Return 't and call `realgud:terminate' we we have a termination message"
   (if (realgud-cmdbuf?)
@@ -762,3 +790,7 @@ command buffer's debugger location pattern against the line 
at PT."
 ))
 
 (provide-me "realgud-")
+
+;; Local Variables:
+;; byte-compile-warnings: (not cl-functions)
+;; End:
diff --git a/test/test-regexp-remake.el b/test/test-regexp-remake.el
index 1a3390c..1aa2748 100644
--- a/test/test-regexp-remake.el
+++ b/test/test-regexp-remake.el
@@ -7,6 +7,13 @@
 
 (test-simple-start)
 
+(eval-when-compile
+  (defvar prompt-pat) (defvar frame-pat)   (defvar frame-re)
+  (defvar loc-pat)(defvar prompt-pat)  (defvar test-text)
+  (defvar file-group) (defvar line-group)  (defvar test-pos)
+  (defvar num-pat)(defvar num-group)   (defvar realgud:remake-pat-hash)
+)
+
 (set (make-local-variable 'prompt-pat)
  (gethash "prompt" realgud:remake-pat-hash))
 (set (make-local-variable 'frame-pat)
@@ -17,7 +24,7 @@
 (prompt-match  "remake<<1>> " "1" "recursive remake %s")
 
 (note "remake debugger-backtrace")
-(setq s1
+(setq test-text
   "=>#0  Makefile.in at /tmp/Makefile:216
   #1  Makefile at /tmp/Makefile:230
 ")
@@ -31,31 +38,31 @@
 (set (make-local-variable 'line-group)
  (realgud-loc-pat-line-group frame-pat))
 
-(assert-equal 0 (string-match frame-re s1))
-(assert-equal "0" (substring s1
+(assert-equal 0 (string-match frame-re test-text))
+(assert-equal "0" (substring test-text
 (match-beginning num-group)
 (match-end num-group)))
 (assert-equal "/tmp/Makefile"
- (substring s1
+ (substring test-text
 (match-beginning file-group)
 (match-end file-group)))
 (assert-equal "216"
- (substring s1
+ (substring test-text
 (match-beginning line-group)
 (match-end line-group)))
-(set (make-local-

[elpa] master 20947cb 4/5: Merge commit 'd7bac581f04756582078cd9ea45e5a28406ee05c'

2016-08-03 Thread Rocky Bernstein
branch: master
commit 20947cb461a44f2cb4e770e95c3ede7467e70186
Merge: 05c3099 d7bac58
Author: rocky 
Commit: rocky 

Merge commit 'd7bac581f04756582078cd9ea45e5a28406ee05c'
---
 packages/realgud/realgud.el   |3 ++-
 packages/realgud/realgud/common/core.el   |   16 +
 packages/realgud/realgud/common/helper.el |5 
 packages/realgud/realgud/common/track.el  |   32 +
 packages/realgud/realgud/debugger/gdb/core.el |7 +++---
 packages/realgud/test/test-regexp-remake.el   |   27 +
 6 files changed, 72 insertions(+), 18 deletions(-)

diff --git a/packages/realgud/realgud.el b/packages/realgud/realgud.el
index 8e0fa97..b16cc48 100644
--- a/packages/realgud/realgud.el
+++ b/packages/realgud/realgud.el
@@ -24,7 +24,8 @@
 
 ;;; Commentary:
 
-;; A modular GNU Emacs front-end for interacting with external debuggers.
+;; A modular, extensible GNU Emacs front-end for interacting with
+;; external debuggers.
 ;;
 ;; Quick start: https://github.com/realgud/realgud/
 ;;
diff --git a/packages/realgud/realgud/common/core.el 
b/packages/realgud/realgud/common/core.el
index c051e26..ad5dd6a 100644
--- a/packages/realgud/realgud/common/core.el
+++ b/packages/realgud/realgud/common/core.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2010-2015 Free Software Foundation, Inc
+;; Copyright (C) 2010-2016 Free Software Foundation, Inc
 
 ;; Author: Rocky Bernstein 
 
@@ -12,7 +12,9 @@
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
 
-; (require 'term)
+;; (require 'term)
+(require 'files)
+
 (if (< emacs-major-version 24)
 (error
  "You need at least Emacs 24 or greater to run this - you have version %d"
@@ -195,10 +197,16 @@ the buffer and data associated with it are already gone."
   (message "That's all folks %s" string))
 
 (defun realgud:binary (file-name)
-"Return a priority for whether file-name is likely we can run gdb on"
-  (let ((output (shell-command-to-string (format "file %s" file-name
+  "Return a whether FILE-NAME is executable or not or very large"
+  (let* ((truename (file-chase-links file-name))
+(output (shell-command-to-string
+ (format "file %s" truename)))
+(filesize (nth 7 (file-attributes truename)))
+)
 (cond
  ((string-match "ELF" output) t)
+ ((and large-file-warning-threshold filesize
+  (> filesize large-file-warning-threshold)) t)
  ('t nil
 
 
diff --git a/packages/realgud/realgud/common/helper.el 
b/packages/realgud/realgud/common/helper.el
index 82bc878..705100d 100644
--- a/packages/realgud/realgud/common/helper.el
+++ b/packages/realgud/realgud/common/helper.el
@@ -13,6 +13,7 @@
 ;; GNU General Public License for more details.
 
 (require 'cl-lib)
+(require 'cl)
 
 ;;; Miscellaneous utility functions
 (require 'load-relative)
@@ -102,3 +103,7 @@ gives:
 ;;(eval (intern var-str
 
 (provide-me "realgud-")
+
+;; Local Variables:
+;; byte-compile-warnings: (not cl-functions)
+;; End:
diff --git a/packages/realgud/realgud/common/track.el 
b/packages/realgud/realgud/common/track.el
index 971534b..f047c13 100644
--- a/packages/realgud/realgud/common/track.el
+++ b/packages/realgud/realgud/common/track.el
@@ -206,6 +206,10 @@ evaluating (realgud-cmdbuf-info-loc-regexp 
realgud-cmdbuf-info)"
   (realgud-cmdbuf-pat 
"brkpt-disable")
   nil)
  (setq frame-num (realgud-track-selected-frame text))
+ (if (and frame-num (not loc))
+ (setq loc (realgud-track-loc-from-selected-frame
+text cmd-mark)))
+
  (setq bp-loc (realgud-track-bp-loc text-sans-loc cmd-mark cmdbuf))
  (if bp-loc
  (let ((src-buffer (realgud-loc-goto bp-loc)))
@@ -600,6 +604,30 @@ loc-regexp pattern"
   )
 
 
+(defun realgud-track-loc-from-selected-frame(text cmd-mark &optional
+ opt-regexp opt-ignore-file-re)
+  "Return a selected frame number found in TEXT or nil if none found."
+  (if (realgud-cmdbuf?)
+  (let ((selected-frame-pat (realgud-cmdbuf-pat "selected-frame"))
+   (frame-num-regexp)
+   (ignore-file-re (or opt-ignore-file-re
+   (realgud-sget 'cmdbuf-info 'ignore-file-re
+   (if (and selected-frame-pat
+(setq frame-num-regexp (realgud-loc-pat-regexp
+selected-frame-pat)))
+   (if (string-match frame-num-regexp text)
+   (let* ((file-group (realgud-loc-pat-file-group 
selected-frame-pat))
+  (line-group (realgud-loc-pat-line-group 
selected-frame-pat))
+  (filename (match-string file-group text))
+  (lineno (string-to-number (match-string line-group 
text)

[elpa] master updated (a275e71 -> c2b86af)

2016-08-03 Thread Rocky Bernstein
rocky pushed a change to branch master.

  from  a275e71   Improve poker-hand-value performance by 25%
   new  ecf1577   Avoid reading a binary as a source file
   new  573eb08   I like the word "extensible"
   new  d7bac58   Wrong require again.
   new  20947cb   Merge commit 'd7bac581f04756582078cd9ea45e5a28406ee05c'
   new  c2b86af   Merge branch 'master' of 
git.sv.gnu.org:/srv/git/emacs/elpa


Summary of changes:
 packages/realgud/realgud.el   |3 ++-
 packages/realgud/realgud/common/core.el   |   16 +
 packages/realgud/realgud/common/helper.el |5 
 packages/realgud/realgud/common/track.el  |   32 +
 packages/realgud/realgud/debugger/gdb/core.el |7 +++---
 packages/realgud/test/test-regexp-remake.el   |   27 +
 6 files changed, 72 insertions(+), 18 deletions(-)



[elpa] master ecf1577 1/5: Avoid reading a binary as a source file

2016-08-03 Thread Rocky Bernstein
branch: master
commit ecf1577499f7f331625b24b1da948c68f171fd3d
Author: rocky 
Commit: rocky 

Avoid reading a binary as a source file

* follow symlinks before running "file"
* don't find-file-noselect if file is large
---
 realgud/common/core.el   |   16 
 realgud/debugger/gdb/core.el |7 ---
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/realgud/common/core.el b/realgud/common/core.el
index c051e26..ad5dd6a 100644
--- a/realgud/common/core.el
+++ b/realgud/common/core.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2010-2015 Free Software Foundation, Inc
+;; Copyright (C) 2010-2016 Free Software Foundation, Inc
 
 ;; Author: Rocky Bernstein 
 
@@ -12,7 +12,9 @@
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
 
-; (require 'term)
+;; (require 'term)
+(require 'files)
+
 (if (< emacs-major-version 24)
 (error
  "You need at least Emacs 24 or greater to run this - you have version %d"
@@ -195,10 +197,16 @@ the buffer and data associated with it are already gone."
   (message "That's all folks %s" string))
 
 (defun realgud:binary (file-name)
-"Return a priority for whether file-name is likely we can run gdb on"
-  (let ((output (shell-command-to-string (format "file %s" file-name
+  "Return a whether FILE-NAME is executable or not or very large"
+  (let* ((truename (file-chase-links file-name))
+(output (shell-command-to-string
+ (format "file %s" truename)))
+(filesize (nth 7 (file-attributes truename)))
+)
 (cond
  ((string-match "ELF" output) t)
+ ((and large-file-warning-threshold filesize
+  (> filesize large-file-warning-threshold)) t)
  ('t nil
 
 
diff --git a/realgud/debugger/gdb/core.el b/realgud/debugger/gdb/core.el
index 22fbed3..5a36a23 100644
--- a/realgud/debugger/gdb/core.el
+++ b/realgud/debugger/gdb/core.el
@@ -17,6 +17,7 @@
 
 (eval-when-compile (require 'cl))
 
+(require 'files)
 (require 'load-relative)
 (require-relative-list '("../../common/track"
 "../../common/core"
@@ -147,15 +148,15 @@ Note that path elements have been expanded via 
`expand-file-name'.
 (defvar realgud:gdb-command-name)
 
 (defun realgud:gdb-executable (file-name)
-"Return a priority for whether file-name is likely we can run gdb on"
-  (let ((output (shell-command-to-string (format "file %s" file-name
+  "Return a priority for whether FILE-NAME is likely we can run gdb on"
+  (let ((output (shell-command-to-string
+(format "file %s" (file-chase-links file-name)
 (cond
  ((string-match "ASCII" output) 2)
  ((string-match "ELF" output) 7)
  ((string-match "executable" output) 6)
  ('t 5
 
-
 (defun realgud:gdb-suggest-invocation (&optional debugger-name)
   "Suggest a gdb command invocation. Here is the priority we use:
 * an executable file with the name of the current buffer stripped of its 
extension



[elpa] master 573eb08 2/5: I like the word "extensible"

2016-08-03 Thread Rocky Bernstein
branch: master
commit 573eb089b696dfc486e06eda42898088410db1fe
Author: rocky 
Commit: rocky 

I like the word "extensible"
---
 realgud.el |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/realgud.el b/realgud.el
index 8e0fa97..b16cc48 100644
--- a/realgud.el
+++ b/realgud.el
@@ -24,7 +24,8 @@
 
 ;;; Commentary:
 
-;; A modular GNU Emacs front-end for interacting with external debuggers.
+;; A modular, extensible GNU Emacs front-end for interacting with
+;; external debuggers.
 ;;
 ;; Quick start: https://github.com/realgud/realgud/
 ;;