惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
N
Netflix TechBlog - Medium
P
Proofpoint News Feed
D
Docker
J
Java Code Geeks
L
LangChain Blog
Microsoft Security Blog
Microsoft Security Blog
The GitHub Blog
The GitHub Blog
I
InfoQ
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
MongoDB | Blog
MongoDB | Blog
月光博客
月光博客
T
Tailwind CSS Blog
M
MIT News - Artificial intelligence
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
腾讯CDC
罗磊的独立博客
U
Unit 42
爱范儿
爱范儿
Vercel News
Vercel News
MyScale Blog
MyScale Blog

elpa/gnu.git, branch externals/auctex

* latex.el (LaTeX-what-macro): Fix chars to skip backwards. * tex-ispell.el: Consolidate regexp for tabular environments. - elpa/gnu.git ; * latex.el (LaTeX-what-macro): Fix last change. * latex.el (LaTeX-what-macro): Improve macro recognition. - elpa/gnu.git Preserve `crm--choose-completion-string' - elpa/gnu.git - GNU ELPA Accept '-' as macro modifier - elpa/gnu.git Add new styles - elpa/gnu.git ; * tex-info.el (outline-heading-alist): Silence the compiler. - elpa/gnu.git Update style/simpleicons.el to package v16.29.0 - elpa/gnu.git Update NEWS.org for new preview feature - elpa/gnu.git Robustify check for escaped math switches/togglers - elpa/gnu.git Fix custom prompt with a default-value - elpa/gnu.git Fix prompt with a default-value - elpa/gnu.git Make `TeX-listify' an obsolete alias - elpa/gnu.git Fix 'syntax-propertize because of narrowing!' error - elpa/gnu.git Update style/ltx-talk.el to class v0.6.0 - elpa/gnu.git elpa/gnu.git - GNU ELPA elpa/gnu.git - GNU ELPA elpa/gnu.git - GNU ELPA elpa/gnu.git - GNU ELPA elpa/gnu.git - GNU ELPA Return context for RefTeX also for macros - elpa/gnu.git ; Fix last change - elpa/gnu.git Add in-buffer completion for citation keys - elpa/gnu.git ; Adjust Copyright years - elpa/gnu.git Improve query of the optional float placement - elpa/gnu.git Sort predefined environment hooks - elpa/gnu.git Sort predefined hooks - elpa/gnu.git Allow additional properties for in-buffer completion - elpa/gnu.git Use ConTeXt Mark XL instead of LMTX - elpa/gnu.git
elpa/gnu.git - GNU ELPA
2026-03-21 · via elpa/gnu.git, branch externals/auctex

Lazily require buframe before use.

* preview.el (preview--buframe-error): New variable. (preview--update-buframe): Require buframe before use. (preview-visibility-style, preview-keep-stale-images, preview-at-point-placement): Add package-version. (preview-dvisvgm-command): Pass currentcolor by default.

diff --git a/preview.el b/preview.el
index b253ef889c..4d7817d12d 100644
--- a/preview.el
+++ b/preview.el

@@ -478,7 +478,8 @@ sync with the preview."

:type '(choice

(const :tag "Only at point with source" at-point)

(const :tag "Only away from point, hiding source" off-point)

- (const :tag "Both" always)))

+ (const :tag "Both" always))

+ :package-version '(auctex . "14.2.0"))

(defcustom preview-keep-stale-images nil

"Keep the last preview image visible even when the source changes.

@@ -489,7 +490,8 @@ icon. When nil, the icon appears until the refreshed image arrives.

The value of this variable is ignored when `preview-visibility-style' is

`off-point'. In that case, stale images are never retained."

:group 'preview-appearance

- :type 'boolean)

+ :type 'boolean

+ :package-version '(auctex . "14.2.0"))

(defcustom preview-at-point-placement 'before-string

"Placement of the at-point preview or icon relative to its source.

@@ -520,7 +522,8 @@ where:

(const :tag "Default" nil)

(function :tag "Position function"))

(alist :tag "Frame parameters")

- (alist :tag "Buffer parameters"))))

+ (alist :tag "Buffer parameters")))

+ :package-version '(auctex . "14.2.0"))

(defun preview-string-expand (arg &optional separator)

"Expand ARG as a string.

@@ -644,7 +647,8 @@ You may set the variable `preview-dvi*-command' to

(concat

(TeX-command-expand

(or cmd

- "dvisvgm --no-fonts %d --page=- --output=\"%m/prev%%3p.svg\""))

+ "dvisvgm --no-fonts --currentcolor --page=- %d \

+ --output=\"%m/prev%%3p.svg\""))

(format " --scale=%g " scale)))))

(defcustom preview-dvips-command

@@ -4571,10 +4575,7 @@ If not a regular release, the date of the last change.")

(insert "\n")))

(error nil)))

-;;; buframe specific

-

-;; Buframe functions, it will be assumed that buframe is installed so

-;; that it can be required.

+;;; buframe-specific functions.

(declare-function buframe-position-right-of-overlay "ext:buframe"

(frame ov &optional location))

(declare-function buframe-make-buffer "ext:buframe" (name &optional locals))

@@ -4586,61 +4587,74 @@ If not a regular release, the date of the last change.")

(declare-function buframe-find "ext:buframe"

(&optional frame-or-name buffer parent noerror))

+(defvar preview--buframe-error t

+ "When non-nil, issue a one-time error if loading buframe fails.")

+

(defun preview--update-buframe (&optional force)

"Show or hide a buframe popup depending on overlays at point.

The frame is not updated if the `buframe' property has not changed,

unless FORCE is non-nil."

- (when (featurep 'buframe)

- (let* ((frame-name "auctex-preview")

- (buf-name " *auctex-preview-buffer*")

- (old-frame (buframe-find frame-name nil nil t)))

- (if-let* ((ov (cl-find-if

- (lambda (ov) (when (overlay-get ov 'buframe) ov))

- (overlays-at (point))))

- (str (overlay-get ov 'buframe)))

- (unless (and (not force)

- old-frame

- (pcase (frame-parameter old-frame 'auctex-preview)

- (`(,o . ,s) (and (eq o ov) (eq s str)))))

- (let* ((buf (buframe-make-buffer buf-name

- (car-safe

- (cddr (cdr-safe

- preview-at-point-placement)))))

- (max-image-size

- (if (integerp max-image-size)

- max-image-size

- ;; Set the size max-image-size using the current frame

- ;; since the popup frame will be small to begin with

- (* max-image-size (frame-width)))))

- (with-current-buffer buf

- (let (buffer-read-only)

- (with-silent-modifications

- (erase-buffer)

- (insert (propertize str

- ;; Remove unnecessary properties

- 'help-echo nil

- 'keymap nil

- 'mouse-face nil))

- (goto-char (point-min)))))

- (setq old-frame

- (buframe-make

- frame-name

- (lambda (frame)

- (funcall

- (or (car-safe (cdr-safe preview-at-point-placement))

- #'buframe-position-right-of-overlay)

- frame

- ov))

- buf

- (overlay-buffer ov)

- (window-frame)

- (car-safe (cdr (cdr-safe preview-at-point-placement)))))

- (set-frame-parameter old-frame 'auctex-preview

- (cons ov str))))

- (when old-frame

- (set-frame-parameter old-frame 'auctex-preview nil)

- (buframe-disable old-frame))))))

+ (let* ((frame-name "auctex-preview")

+ (buf-name " *auctex-preview-buffer*")

+ (old-frame (and (featurep 'buframe)

+ ;; Do not autoload buframe if it is not already

+ ;; loaded.

+ (buframe-find frame-name nil nil t))))

+ (if-let* ((ov (cl-find-if

+ (lambda (ov) (when (overlay-get ov 'buframe) ov))

+ (overlays-at (point))))

+ (str (overlay-get ov 'buframe)))

+ (unless (and (not force)

+ old-frame

+ (pcase (frame-parameter old-frame 'auctex-preview)

+ (`(,o . ,s) (and (eq o ov) (eq s str)))))

+ (if (require 'buframe nil t)

+ (let* ((buf (buframe-make-buffer

+ buf-name

+ (car-safe

+ (cddr (cdr-safe

+ preview-at-point-placement)))))

+ (max-image-size

+ (if (integerp max-image-size)

+ max-image-size

+ ;; Set the size max-image-size using the current

+ ;; frame, since the popup frame will be small to

+ ;; begin with.

+ (* max-image-size (frame-width)))))

+ (with-current-buffer buf

+ (let (buffer-read-only)

+ (with-silent-modifications

+ (erase-buffer)

+ (insert (propertize str

+ ;; Remove unnecessary properties

+ 'help-echo nil

+ 'keymap nil

+ 'mouse-face nil))

+ (goto-char (point-min)))))

+ (setq old-frame

+ (buframe-make

+ frame-name

+ (lambda (frame)

+ (funcall

+ (or (car-safe (cdr-safe preview-at-point-placement))

+ #'buframe-position-right-of-overlay)

+ frame

+ ov))

+ buf

+ (overlay-buffer ov)

+ (window-frame)

+ (car-safe (cdr (cdr-safe

+ preview-at-point-placement)))))

+ (set-frame-parameter old-frame 'auctex-preview

+ (cons ov str)))

+ (when preview--buframe-error

+ (setq preview--buframe-error nil)

+ (error "buframe is unavailable for use with preview. \

+See `preview-at-point-placement'."))))

+ (when old-frame

+ (set-frame-parameter old-frame 'auctex-preview nil)

+ (buframe-disable old-frame)))))

;;;###autoload

(defun preview-report-bug () "Report a bug in the preview-latex package."