[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/objed 2274a94 02/21: Add package-lint to linting tests,
From: |
Clemens Radermacher |
Subject: |
[elpa] externals/objed 2274a94 02/21: Add package-lint to linting tests, and fix its errors/warnings |
Date: |
Sun, 17 Mar 2019 15:00:16 -0400 (EDT) |
branch: externals/objed
commit 2274a94d846b4758dce0c567342f35ea2ce10927
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>
Add package-lint to linting tests, and fix its errors/warnings
---
objed-objects.el | 11 ++++++-----
objed.el | 24 ++++++++++++------------
test/make-lint.el | 55 +++++++++++++++++++++++++++++++++----------------------
3 files changed, 51 insertions(+), 39 deletions(-)
diff --git a/objed-objects.el b/objed-objects.el
index b3f6f7e..5de5a4c 100644
--- a/objed-objects.el
+++ b/objed-objects.el
@@ -2,7 +2,10 @@
;; Copyright (C) 2018-2019 Free Software Foundation, Inc.
;; Author: Clemens Radermacher <address@hidden>
+;; Package-Requires: ((emacs "25") (cl-lib "0.5"))
+;; Version: 0.7.2
;; Maintainer: Clemens Radermacher <address@hidden>
+;; URL: https://github.com/clemera/objed
;; 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
@@ -50,9 +53,6 @@
(declare-function objed--install-advices-for "ext:objed")
-;; dyn bindings
-(defvar avy-action nil)
-(defvar avy-all-windows nil)
;; * Macros
@@ -613,7 +613,8 @@ character of the string."
(push (cons str (point)) lines)))))))
-
+(defvar avy-action)
+(defvar avy-all-windows)
(defun objed--ace-until (&optional start back)
"Get position of object using `avy'.
@@ -2307,7 +2308,7 @@ non-nil the indentation block can contain empty lines."
-(defvar comint-prompt-regexp "^")
+(defvar comint-prompt-regexp)
(declare-function comint-next-prompt "ext:comint")
(declare-function comint-previous-prompt "ext:comint")
(objed-define-object nil output
diff --git a/objed.el b/objed.el
index 1c85bbe..8a3ef54 100644
--- a/objed.el
+++ b/objed.el
@@ -380,14 +380,10 @@ To avoid loading `avy' set this var before activating
`objed-mode.'"
:type 'boolean)
-;; info for byte-comp
-(defvar ivy-sort-function-alist nil)
-(defvar which-key-replacement-alist nil)
-(defvar which-key-mode nil)
-(defvar which-key-idle-delay 1.0)
-(defvar which-key--using-top-level nil)
-(defvar avy-all-windows nil)
-(defvar avy-action nil)
+;; dyns
+(defvar which-key-idle-delay)
+(defvar which-key--using-top-level)
+(defvar which-key-replacement-alist)
(declare-function objed--exit-objed "objed" nil t)
@@ -1246,8 +1242,9 @@ or object position data."
(suggest-key-bindings . nil)
(which-key-sort-order . ,objed-which-key-order)
(which-key-replacement-alist
- . ,(append objed--wk-replacement-alist
- which-key-replacement-alist))))
+ . ,(when (bound-and-true-p which-key-replacement-alist)
+ (append objed--wk-replacement-alist
+ which-key-replacement-alist)))))
(push
(if (local-variable-p var)
(cons var (symbol-value var))
@@ -1413,7 +1410,7 @@ matches IREGEX is not displayed."
(when (and objed--which-key-avail-p
;; let the user deactivate later as well...
objed-use-which-key-if-available-p
- which-key-mode
+ (bound-and-true-p which-key-mode)
(or nowait (sit-for which-key-idle-delay)))
(prog1 t
(setq which-key--using-top-level desc)
@@ -2007,6 +2004,8 @@ textual content of an object via the content object."
(force-mode-line-update)))
+(defvar avy-all-windows)
+(defvar avy-action)
(defun objed-ace ()
"Jump to an object with `avy'."
(interactive)
@@ -2030,6 +2029,7 @@ textual content of an object via the content object."
(t
(message "No objects found."))))))
+(defvar ivy-sort-function-alist)
(defun objed-occur ()
"Complete initial lines and jump to object."
(interactive)
@@ -2606,7 +2606,7 @@ With prefix argument ARG call `edit-indirect-region' if
(apply 'narrow-to-region (objed--current)))))))
-(defvar eval-sexp-fu-flash-mode nil)
+(defvar eval-sexp-fu-flash-mode)
;; adapted from lispy
(defun objed--eval-func (beg end &optional replace)
"Evaluate code between BEG and END.
diff --git a/test/make-lint.el b/test/make-lint.el
index 99270ef..b2b362e 100644
--- a/test/make-lint.el
+++ b/test/make-lint.el
@@ -17,30 +17,41 @@
(kill-emacs 1)))))
-;; ;; package lint
-;; (require 'package-lint)
-;; (let ((success t))
-;; (dolist (file (file-expand-wildcards "*.el"))
-;; (with-temp-buffer
-;; (insert-file-contents file t)
-;; (emacs-lisp-mode)
-;; (let ((checking-result (package-lint-buffer)))
-;; (when checking-result
-;; (setq success nil)
-;; (message "In `%s':" file)
-;; (pcase-dolist (`(,line ,col ,type ,message) checking-result)
-;; (message " at %d:%d: %s: %s" line col type message))))))
-;; (kill-emacs (if success 0 1)))
+;; package lint
+(when (require 'package-lint nil t)
+ (define-advice package-lint--get-package-prefix (:override () objed)
+ "Use objed as prefix for all files."
+ "objed")
+ (define-advice package-lint--check-eval-after-load
+ (:override () ignore)
+ nil)
+ (define-advice package-lint--test-keyseq
+ (:override (_) ignore)
+ nil)
+ (let ((success t))
+ (dolist (file (file-expand-wildcards "*.el"))
+ (with-temp-buffer
+ (insert-file-contents file t)
+ (emacs-lisp-mode)
+ (let ((checking-result (package-lint-buffer)))
+ (when checking-result
+ (setq success nil)
+ (message "In `%s':" file)
+ (pcase-dolist (`(,line ,col ,type ,message) checking-result)
+ (message " at %d:%d: %s: %s" line col type message))))))
+ (kill-emacs (if success 0 1))))
;; elsa
-;; (require 'elsa)
-;; (defun my-elsa-run ()
-;; "Run `elsa-process-file' and output errors to stdout for flycheck."
-;; (elsa-load-config)
-;; (dolist (file (file-expand-wildcards "*.el"))
-;; (--each (reverse (oref (elsa-process-file file) errors))
-;; (princ (concat file ":" (elsa-message-format it))))))
-;; (my-elsa-run)
+;; (when (require 'elsa nil t)
+;; (defun my-elsa-run ()
+;; "Run `elsa-process-file' and output errors to stdout for flycheck."
+;; (interactive)
+;; (with-help-window (get-buffer-create "*elsa*")
+;; (elsa-load-config)
+;; (dolist (file (file-expand-wildcards "*.el"))
+;; (--each (reverse (oref (elsa-process-file file) errors))
+;; (princ (concat file ":" (elsa-message-format it)))))))
+;; (my-elsa-run))
- [elpa] externals/objed 0676656 19/21: Improve url object, (continued)
- [elpa] externals/objed 0676656 19/21: Improve url object, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 4cb9beb 21/21: Version bump, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 9689c72 17/21: Reinit after raise, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 85941b8 16/21: Add objed-execute command, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 4bb1b90 12/21: Add url object, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 7627082 13/21: Don't ignore search errors, error with not other object found msg., Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 998563a 06/21: Remove redundant :group declarations, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed e9bf605 07/21: Refactor objec-replace, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 85019a8 14/21: Add raise command, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed c9b7c2a 05/21: Fix var not defined for edit-indirect, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 2274a94 02/21: Add package-lint to linting tests, and fix its errors/warnings,
Clemens Radermacher <=
- [elpa] externals/objed 6ea0268 01/21: Buffer switch: Keep objed--object if possible, and update highlight, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 1054cd8 03/21: Compile tests like elpa does, and fix the compile errors in tests, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed f5cc1ce 15/21: Remove binding for disfunct objed repeat, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed bb5d097 11/21: Improve file object, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 96d5bc9 10/21: Add mail object, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed cc6c36f 08/21: Derive package name from current dir, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed be0cd7c 09/21: Fix identifier immediate jumping if used as last command, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 5a52e13 04/21: Remove load message, Clemens Radermacher, 2019/03/17