3 Commits ba997f0cad ... dac3106e6f

Auteur SHA1 Bericht Datum
  Ryan C. Thompson dac3106e6f Compile the package in CI tests 4 jaren geleden
  Ryan C. Thompson 8be6a59a9b Fix some minor internal inconsistencies 4 jaren geleden
  Ryan C. Thompson 74841cc0cb Fix warnings and update Eldev config 4 jaren geleden
5 gewijzigde bestanden met toevoegingen van 27 en 16 verwijderingen
  1. 3 0
      .github/workflows/test.yml
  2. 1 0
      .gitignore
  3. 5 2
      Eldev
  4. 12 11
      ido-completing-read+.el
  5. 6 3
      tests-with-flx-ido/test-ido-completing-read+-with-flx-ido.el

+ 3 - 0
.github/workflows/test.yml

@@ -45,6 +45,9 @@ jobs:
     - name: Install Elisp dependencies
       run: eldev prepare test
 
+    - name: Compile the package
+      run: eldev compile
+
     - name: Run the test suite
       run: |
         eldev -p -dtT test

+ 1 - 0
.gitignore

@@ -1,3 +1,4 @@
 # Added automatically by `eldev init'.
 /.eldev
 /Eldev-local
+*-autoloads.el

+ 5 - 2
Eldev

@@ -1,18 +1,21 @@
 ;; -*- mode: emacs-lisp; lexical-binding: t; no-byte-compile: t -*-
 
+(setq eldev-main-fileset "./*.el")
+
 (eldev-use-plugin 'undercover)
+(eldev-use-plugin 'autoloads)
 
 (eldev-use-package-archive 'gnu)
 (eldev-use-package-archive 'melpa-unstable)
 
 (setq eldev-test-framework 'buttercup)
 
-(eldev-add-extra-dependencies 'test 'flx-ido)
 (eldev-add-extra-dependencies
  'test
+ 'flx-ido
+ 's
  '(:package with-simulated-input
             :version  "3.0"))
-(eldev-add-extra-dependencies 'test 's)
 
 ;; Tell checkdoc not to demand two spaces after a period.
 (setq sentence-end-double-space nil)

+ 12 - 11
ido-completing-read+.el

@@ -6,7 +6,7 @@
 ;; Author: Ryan C. Thompson <rct@thompsonclan.org>
 ;; Created: Sat Apr  4 13:41:20 2015 (-0700)
 ;; Version: 4.14
-;; Package-Requires: ((emacs "24.4") (seq "0.5") (cl-lib "0.5") (memoize "1.1"))
+;; Package-Requires: ((emacs "24.4") (seq "0.5") (memoize "1.1"))
 ;; URL: https://github.com/DarwinAwardWinner/ido-completing-read-plus
 ;; Keywords: ido, completion, convenience
 
@@ -104,7 +104,7 @@ not be updated until you restart Emacs.")
   "If non-nil, ido-cr+ will print debug info.
 
 Debug info is printed to the *Messages* buffer."
-  nil
+  :init-value nil
   :global t
   :group 'ido-completing-read-plus)
 
@@ -122,7 +122,7 @@ Arguments are identical to `message'."
 ;; silence byte-compiler warnings, despite already being declared in
 ;; ido.el.
 
-(defmacro define-ido-internal-var (symbol &optional initvalue docstring)
+(defmacro ido-cr+-define-ido-internal-var (symbol &optional initvalue docstring)
   "Declare and initialize SYMBOL an ido internal variable.
 
 This is used to suppress byte-compilation warnings about
@@ -144,11 +144,11 @@ package's variable is not safe in general, but in this case it
 should be, because ido always let-binds this variable before
 using it, so the initial value shouldn't matter.")))
 
-(define-ido-internal-var ido-context-switch-command)
-(define-ido-internal-var ido-cur-list)
-(define-ido-internal-var ido-cur-item)
-(define-ido-internal-var ido-require-match)
-(define-ido-internal-var ido-process-ignore-lists)
+(ido-cr+-define-ido-internal-var ido-context-switch-command)
+(ido-cr+-define-ido-internal-var ido-cur-list)
+(ido-cr+-define-ido-internal-var ido-cur-item)
+(ido-cr+-define-ido-internal-var ido-require-match)
+(ido-cr+-define-ido-internal-var ido-process-ignore-lists)
 
 ;; Vars and functions from flx-ido package
 (defvar flx-ido-mode)
@@ -382,8 +382,9 @@ list also takes precedence over the allow list."
   :type '(repeat (choice (symbol :tag "Function or command name")
                          (string :tag "Regexp"))))
 
-(defvaralias 'ido-cr+-nil-def-wall-of-shame 'ido-cr+-nil-def-alternate-behavior-list
-  "Functions and commands whose authors need to read the docstring for `completing-read'.
+(defvaralias 'ido-cr+-nil-def-wall-of-shame
+  'ido-cr+-nil-def-alternate-behavior-list
+  "Functions and commands that use `completing-read' improperly.
 
 Many functions that call `completing-read' are written with the
 assumption that the setting the REQUIRE-MATCH argument of
@@ -1130,7 +1131,7 @@ This has no effect unless `ido-cr+-dynamic-collection' is non-nil."
 If this mode causes problems for a function, you can customize
 when ido completion is or is not used by customizing
 `ido-cr+-disable-list'."
-  nil
+  :init-value nil
   :global t
   :group 'ido-completing-read-plus
   ;; Actually enable/disable the mode by setting

+ 6 - 3
tests-with-flx-ido/test-ido-completing-read+-with-flx-ido.el

@@ -15,6 +15,9 @@
 (require 'buttercup)
 (require 'cl-lib)
 (require 'with-simulated-input)
+(require 's)
+
+(defvar my-dynamic-collection nil)
 
 (defun collection-as-function (collection)
   "Return a function equivalent to COLLECTION.
@@ -206,9 +209,9 @@ also accept a quoted list for the sake of convenience."
         (it "should do a dynamic update when idle"
           (expect
            (with-simulated-input
-               '("h"
-                 (wsi-simulate-idle-time (1+ ido-cr+-dynamic-update-idle-time))
-                 "-ld RET")
+               ("h"
+                (wsi-simulate-idle-time (1+ ido-cr+-dynamic-update-idle-time))
+                "-ld RET")
              (ido-completing-read+ "Say something: " my-dynamic-collection))
            :to-equal
            "hello-world")