pkg update and first config fix
org-brain not working, add org-roam
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
;;; polymode-test-utils.el --- Testing utilities for polymode -*- lexical-binding: t -*-
|
||||
;;
|
||||
;; Copyright (C) 2018-2019, Vitalie Spinu
|
||||
;; Copyright (C) 2018-2022 Free Software Foundation, Inc.
|
||||
;; Author: Vitalie Spinu
|
||||
;; URL: https://github.com/polymode/polymode
|
||||
;;
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
(require 'ert)
|
||||
(require 'polymode)
|
||||
(require 'poly-lock)
|
||||
(eval-when-compile
|
||||
(require 'cl-lib))
|
||||
|
||||
@@ -40,9 +41,7 @@
|
||||
;; (add-hook 'after-change-major-mode-hook #'global-font-lock-mode-enable-in-buffers)
|
||||
;; (message "ACMH: %s GFL:%s" after-change-major-mode-hook global-font-lock-mode)
|
||||
|
||||
(setq ert-batch-backtrace-right-margin 200)
|
||||
(defvar pm-verbose (getenv "PM_VERBOSE"))
|
||||
|
||||
(defvar pm-verbose nil)
|
||||
(defvar pm-test-current-change-set nil)
|
||||
(defun pm-test-get-file (name)
|
||||
"Find the file with NAME from inside a poly-xyz repo.
|
||||
@@ -92,7 +91,8 @@ MODE is a quoted symbol."
|
||||
(kill-buffer *buf*))
|
||||
(with-current-buffer (get-buffer-create *buf*)
|
||||
(insert (substring-no-properties ,string))
|
||||
(funcall ,mode)
|
||||
(let ((inhibit-message (not pm-verbose)))
|
||||
(funcall ,mode))
|
||||
(setq-default indent-tabs-mode nil)
|
||||
;; In emacs 27 this is called from run-mode-hooks
|
||||
(and (bound-and-true-p syntax-propertize-function)
|
||||
@@ -152,12 +152,11 @@ MODE is a quoted symbol."
|
||||
(remove-hook 'text-mode-hook 'flyspell-mode) ;; triggers "too much reentrancy" error
|
||||
(let ((inhibit-message (not pm-verbose)))
|
||||
(funcall-interactively ',mode))
|
||||
;; (flyspell-mode -1) ;; triggers "too much reentrancy" error
|
||||
(hack-local-variables 'ignore-mode)
|
||||
(goto-char (point-min))
|
||||
,pre-form
|
||||
;; FIXME: figure this mambo-jumbo
|
||||
;; need this to activate all chunks
|
||||
(font-lock-ensure)
|
||||
(goto-char (point-min))
|
||||
(save-excursion
|
||||
(let ((font-lock-mode t))
|
||||
@@ -175,7 +174,8 @@ MODE is a quoted symbol."
|
||||
;; fontification in X either (waf?)
|
||||
(add-hook 'after-change-functions #'pm-test-invoke-fontification t t))
|
||||
(point-min) (point-max))))
|
||||
(font-lock-ensure)
|
||||
;; (font-lock-flush)
|
||||
;; (font-lock-ensure)
|
||||
,@body
|
||||
(current-buffer)))))
|
||||
|
||||
@@ -258,6 +258,8 @@ MODE is a quoted symbol."
|
||||
ALLOW-FAILED-FACES should be a list of faces on which failures
|
||||
are OK."
|
||||
(save-excursion
|
||||
(font-lock-flush)
|
||||
(font-lock-ensure)
|
||||
(pm-map-over-spans
|
||||
(lambda (span) (pm-test-span-faces span allow-failed-faces)))))
|
||||
|
||||
@@ -346,6 +348,7 @@ execution undo is called once. After each change-set
|
||||
`(kill-buffer
|
||||
(pm-test-run-on-file ,mode ,file
|
||||
(pm-test-faces)
|
||||
(set-buffer-modified-p nil)
|
||||
(dolist (cset ',change-sets)
|
||||
(let ((poly-lock-defer-after-change nil)
|
||||
(pm-test-current-change-set (caar cset)))
|
||||
@@ -356,7 +359,8 @@ execution undo is called once. After each change-set
|
||||
(undo-boundary)
|
||||
(pm-test-faces)
|
||||
(let ((inhibit-message (not pm-verbose)))
|
||||
(undo)))))))
|
||||
(when (buffer-modified-p)
|
||||
(undo))))))))
|
||||
|
||||
(defun pm-test--run-indentation-tests ()
|
||||
"Run an automatic batch of indentation tests.
|
||||
@@ -440,7 +444,8 @@ points."
|
||||
(defmacro pm-test-map-over-modes (mode file)
|
||||
`(pm-test-run-on-file ,mode ,file
|
||||
(let ((beg (point-min))
|
||||
(end (point-max)))
|
||||
(end (point-max))
|
||||
(pm-use-cache t))
|
||||
(with-buffer-prepared-for-poly-lock
|
||||
(remove-text-properties beg end '(:pm-span :pm-face)))
|
||||
(pm-map-over-modes (lambda (b e)) beg end)
|
||||
|
||||
Reference in New Issue
Block a user