Skip to content

Commit

Permalink
Add fixes for Emacs 29 (#276)
Browse files Browse the repository at this point in the history
* Fix warnings reported with Emacs29 snapshot

* Disable vc feature for ert testings
  • Loading branch information
10sr authored Oct 23, 2022
1 parent 541298a commit 44bcfcf
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions editorconfig-core-handle.el
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ If CONF is not found return nil."
)
(while (not (eq (point) point-max))
(setq line
(buffer-substring-no-properties (point-at-bol)
(point-at-eol)))
(buffer-substring-no-properties (line-beginning-position)
(line-end-position)))
(setq line
(replace-regexp-in-string "\\(^\\| \\)\\(#\\|;\\).*$"
""
Expand Down
8 changes: 4 additions & 4 deletions editorconfig.el
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ your init.el:
Possible known values are:
* `editorconfig-core-get-properties-hash' (default)
* `editorconfig-core-get-properties-hash\\=' (default)
* Always use built-in Emacs-Lisp implementation to get properties
* `editorconfig-get-properties'
* Use `editorconfig-get-properties-from-exec' when
* Use `editorconfig-get-properties-from-exec\\=' when
`editorconfig-exec-path' executable is found, otherwise
use `editorconfig-core-get-properties-hash'
* `editorconfig-get-properties-from-exec'
use `editorconfig-core-get-properties-hash\\='
* `editorconfig-get-properties-from-exec\\='
* Get properties by executing EditorConfig executable"
:type 'function
:group 'editorconfig)
Expand Down
2 changes: 2 additions & 0 deletions ert-tests/editorconfig-core-handle.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
(defconst fixtures (concat (file-name-directory load-file-name)
"fixtures/"))

(set-variable 'vc-handled-backends nil)

(ert-deftest test-editorconfig-core-handle ()
;; handle.ini
(let* ((conf (concat fixtures
Expand Down
1 change: 1 addition & 0 deletions ert-tests/editorconfig-core.el
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(require 'editorconfig-core)

(set-variable 'vc-handled-backends nil)

(ert-deftest test-editorconfig-core--get-handles ()
(let* ((fixtures (concat default-directory
Expand Down
1 change: 1 addition & 0 deletions ert-tests/editorconfig-fnmatch.el
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(require 'editorconfig-fnmatch)

(set-variable 'vc-handled-backends nil)

(ert-deftest test-editorconfig-fnmatch-p ()
(let ((cases-t
Expand Down
2 changes: 2 additions & 0 deletions ert-tests/editorconfig.el
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
(require 'editorconfig)

(set-variable 'vc-handled-backends nil)

(defun display-warning (type message &optional level buffer-name)
"When testing overwrite this function to throw error when called."
(unless (eq level :debug)
Expand Down
2 changes: 2 additions & 0 deletions ert-tests/metadata.el
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
(require 'package)

(set-variable 'vc-handled-backends nil)

(defvar metadata-el-files nil)

(ert-deftest test-metadata ()
Expand Down

0 comments on commit 44bcfcf

Please sign in to comment.