[elpa] externals/adaptive-wrap a4c49ef: * adaptive-wrap.el: Handle non-symbol values of `face` property

2021-01-10 Thread Stefan Monnier
branch: externals/adaptive-wrap
commit a4c49ef906b0318485ae053c344fc524c2d8be7c
Author: Stefan Monnier 
Commit: Stefan Monnier 

* adaptive-wrap.el: Handle non-symbol values of `face` property

(adaptive-wrap--face-extend-p): Rename from adaptive-wrap--face-extends;
don't signal an error if passed a non-face value, and make it work for
"immediate face plist".
(adaptive-wrap--prefix-face): Make it handle the case where the `face`
property is a list of faces.
---
 adaptive-wrap.el | 34 +++---
 1 file changed, 23 insertions(+), 11 deletions(-)

diff --git a/adaptive-wrap.el b/adaptive-wrap.el
index b075b3b..3e891af 100644
--- a/adaptive-wrap.el
+++ b/adaptive-wrap.el
@@ -1,6 +1,6 @@
 ;;; adaptive-wrap.el --- Smart line-wrapping with wrap-prefix
 
-;; Copyright (C) 2011-2018  Free Software Foundation, Inc.
+;; Copyright (C) 2011-2021  Free Software Foundation, Inc.
 
 ;; Author: Stephen Berman 
 ;; Stefan Monnier 
@@ -59,16 +59,21 @@ extra indent = 2
   :group 'visual-line)
 (make-variable-buffer-local 'adaptive-wrap-extra-indent)
 
-(defun adaptive-wrap--face-extends (face)
-  (if (fboundp 'face-extend-p)
-  (face-extend-p face nil t)
-;; Before Emacs 27, faces always extended beyond EOL.  Check for a
-;; non-default background.
-(face-background face nil t)))
-
-(defun adaptive-wrap--prefix-face (fcp beg end)
+(defun adaptive-wrap--face-extend-p (face)
+  ;; Before Emacs 27, faces always extended beyond EOL, so we check for a
+  ;; non-default background instead.
+  (cond
+   ((listp face)
+(plist-get face (if (fboundp 'face-extend-p) :extend :background)))
+   ((symbolp face)
+(if (fboundp 'face-extend-p)
+(face-extend-p face nil t)
+  (face-background face nil t)
+
+(defun adaptive-wrap--prefix-face (fcp _beg end)
+  ;; If the fill-context-prefix already specifies a face, just use that.
   (cond ((get-text-property 0 'face fcp))
-;; If the last character is a newline and has a face that
+;; Else, if the last character is a newline and has a face that
 ;; extends beyond EOL, assume that this face spans the whole
 ;; line and apply it to the prefix to preserve the "block"
 ;; visual effect.
@@ -78,7 +83,14 @@ extra indent = 2
 ;; line has the diff-removed face.
 ((= (char-before end) ?\n)
  (let ((eol-face (get-text-property (1- end) 'face)))
-   (and eol-face (adaptive-wrap--face-extends eol-face) eol-face)
+   ;; `eol-face' can be a face, a "face value"
+   ;; (plist of face properties) or a list of one of those.
+   (if (or (not (consp eol-face)) (keywordp (car eol-face)))
+   ;; A single face.
+   (if (adaptive-wrap--face-extend-p eol-face) eol-face)
+ ;; A list of faces.  Keep the ones that extend beyond EOL.
+ (delq nil (mapcar (lambda (f) (if (adaptive-wrap--face-extend-p 
f) f))
+   eol-face)))
 
 (defun adaptive-wrap--prefix (fcp)
   (let ((fcp-len (string-width fcp)))



[elpa] externals/websocket 6954d08: Version 1.13.1 - removing websocket-test.el.

2021-01-10 Thread Andrew Hyatt
branch: externals/websocket
commit 6954d08eb8bac28d504a11f1fcf5d84fe16f6c51
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Version 1.13.1 - removing  websocket-test.el.

The websocket-test.el file should not be in the elpa repository. This does 
not
change the functionality at all. Those who want to run the unit tests can 
find
the tests in the websocket github repository.
---
 websocket-test.el | 730 --
 websocket.el  |   2 +-
 2 files changed, 1 insertion(+), 731 deletions(-)

diff --git a/websocket-test.el b/websocket-test.el
deleted file mode 100644
index c133272..000
--- a/websocket-test.el
+++ /dev/null
@@ -1,730 +0,0 @@
-;;; websocket-test.el --- Unit tests for the websocket layer
-
-;; Copyright (c) 2013  Free Software Foundation, Inc.
-;;
-;; Author: Andrew Hyatt 
-;; Maintainer: Andrew Hyatt 
-;;
-;; 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 2 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 GNU Emacs.  If not, see .
-
-;;; Commentary:
-;; This defines and runs ert unit tests.  You can download ert from:
-;; http://github.com/ohler/ert, it also comes with Emacs 24 and above.
-
-(require 'ert)
-(require 'websocket)
-(eval-when-compile (require 'cl))
-
-(ert-deftest websocket-genbytes-length ()
-  (loop repeat 100
-do (should (= (string-bytes (websocket-genbytes 16)) 16
-
-(ert-deftest websocket-calculate-accept ()
-  ;; This example comes straight from RFC 6455
-  (should
-   (equal "s3pPLMBiTxaQ9kYGzzhZRbK+xOo="
-  (websocket-calculate-accept "dGhlIHNhbXBsZSBub25jZQ=="
-
-(defconst websocket-test-hello "\x81\x05\x48\x65\x6c\x6c\x6f"
-  "'Hello' string example, taken from the RFC.")
-
-(defconst websocket-test-masked-hello
-  "\x81\x85\x37\xfa\x21\x3d\x7f\x9f\x4d\x51\x58"
-  "'Hello' masked string example, taken from the RFC.")
-
-(ert-deftest websocket-get-bytes ()
-  (should (equal #x5 (websocket-get-bytes "\x5" 1)))
-  (should (equal #x101 (websocket-get-bytes "\x1\x1" 2)))
-  (should (equal #xff
- (websocket-get-bytes "\x0\x0\x0\x0\x0\xFF\xFF\xFF" 8)))
-  (should-error (websocket-get-bytes "\x0\x0\x0\x1\x0\x0\x0\x1" 8)
-:type 'websocket-unparseable-frame)
-  (should-error (websocket-get-bytes "\x0\x0\x0" 3))
-  (should-error (websocket-get-bytes "\x0" 2) :type 
'websocket-unparseable-frame))
-
-(ert-deftest websocket-get-opcode ()
-  (should (equal 'text (websocket-get-opcode websocket-test-hello
-
-(ert-deftest websocket-get-payload-len ()
-  (should (equal '(5 . 1)
- (websocket-get-payload-len
-  (substring websocket-test-hello 1
-  (should (equal '(200 . 3)
- (websocket-get-payload-len
-  (bindat-pack '((:len u8) (:val u16))
-   `((:len . 126)
- (:val . 200))
-  ;; we don't want to hit up any limits even on strange emacs builds,
-  ;; so this test has a pretty small test value
-  (should (equal '(7 . 9)
- (websocket-get-payload-len
-  (bindat-pack '((:len u8) (:val vec 2 u32))
-   `((:len . 127)
- (:val . [0 7])))
-
-(ert-deftest websocket-read-frame ()
-  (should (equal (make-websocket-frame :opcode 'text :payload "Hello"
-   :length (length websocket-test-hello)
-   :completep t)
- (websocket-read-frame websocket-test-hello)))
-  (should (equal (make-websocket-frame :opcode 'text :payload "Hello"
-   :length (length websocket-test-hello)
-   :completep t)
- (websocket-read-frame (concat websocket-test-hello
-   "should-not-be-read"
-  (should (equal (make-websocket-frame :opcode 'text :payload "Hello"
-   :length (length 
websocket-test-masked-hello)
-   :completep t)
- (websocket-read-frame websocket-test-masked-hello)))
-  (should (equal (make-websocket-frame :opcode 'text :payload "Hello"
-   :length (length websocket-test-hello)
-   :completep nil)
- (websocket-read-frame
-  (concat (

[elpa] externals/org 9ea7ff5: Fix typo in f948234cb

2021-01-10 Thread ELPA Syncer
branch: externals/org
commit 9ea7ff5e2f8f9f280f8022cade62c1a3bba1478c
Author: Ihor Radchenko 
Commit: Kyle Meyer 

Fix typo in f948234cb
---
 contrib/lisp/org-contacts.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index d8c735c..2811db6 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -54,8 +54,8 @@
  Usage:
 
 ;;; How to search?
-;;; 
-;;; You can use `org-spare-tree' [C-c / p] to filter based on a
+;;;
+;;; You can use `org-sparse-tree' [C-c / p] to filter based on a
 ;;; specific property. Or other matcher on `org-sparse-tree'.
 
 ;;; Code:



[elpa] externals/adaptive-wrap 026c35f: * adaptive-wrap.el: Bump version

2021-01-10 Thread Stefan Monnier
branch: externals/adaptive-wrap
commit 026c35f59174febab2bcdb3c50fb8344c248671c
Author: Stefan Monnier 
Commit: Stefan Monnier 

* adaptive-wrap.el: Bump version

Don't require `easymenu` since we don't use it any more.
(adaptive-wrap-extra-indent): Don't make it forcefully buffer-local.
---
 adaptive-wrap.el | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/adaptive-wrap.el b/adaptive-wrap.el
index 3e891af..46ede6f 100644
--- a/adaptive-wrap.el
+++ b/adaptive-wrap.el
@@ -4,7 +4,7 @@
 
 ;; Author: Stephen Berman 
 ;; Stefan Monnier 
-;; Version: 0.7
+;; Version: 0.8
 
 ;; 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
@@ -28,8 +28,6 @@
 
 ;;; Code:
 
-(require 'easymenu)
-
 (defcustom adaptive-wrap-extra-indent 0
   "Number of extra spaces to indent in `adaptive-wrap-prefix-mode'.
 
@@ -57,7 +55,6 @@ extra indent = 2
   :type 'integer
   :safe 'integerp
   :group 'visual-line)
-(make-variable-buffer-local 'adaptive-wrap-extra-indent)
 
 (defun adaptive-wrap--face-extend-p (face)
   ;; Before Emacs 27, faces always extended beyond EOL, so we check for a