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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
L
LangChain Blog
雷峰网
雷峰网
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
T
Tailwind CSS Blog
V
Visual Studio Blog
博客园_首页
Apple Machine Learning Research
Apple Machine Learning Research
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 司徒正美
有赞技术团队
有赞技术团队
J
Java Code Geeks
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
B
Blog
Recent Announcements
Recent Announcements
C
Check Point Blog
MongoDB | Blog
MongoDB | Blog
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
F
Full Disclosure
Microsoft Security Blog
Microsoft Security Blog
N
Netflix TechBlog - Medium
I
InfoQ
云风的 BLOG
云风的 BLOG
量子位
D
Docker
D
DataBreaches.Net
Vercel News
Vercel News
Blog — PlanetScale
Blog — PlanetScale
宝玉的分享
宝玉的分享
V
V2EX
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Y
Y Combinator Blog
美团技术团队
小众软件
小众软件
阮一峰的网络日志
阮一峰的网络日志
博客园 - 聂微东
B
Blog RSS Feed
MyScale Blog
MyScale Blog
月光博客
月光博客
T
The Blog of Author Tim Ferriss
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
M
MIT News - Artificial intelligence
U
Unit 42
Google DeepMind News
Google DeepMind News

elpa/gnu.git, branch externals/auctex

Fix 'syntax-propertize because of narrowing!' error - elpa/gnu.git elpa/gnu.git - GNU ELPA Activate new xref backend - elpa/gnu.git elpa/gnu.git - GNU ELPA elpa/gnu.git - GNU ELPA ; Fix description about `LaTeX-expl3-syntax-table' - elpa/gnu.git Delete compat function `TeX-always' - elpa/gnu.git Fix fontification of verb macros followed by space - elpa/gnu.git elpa/gnu.git - GNU ELPA elpa/gnu.git - GNU ELPA Add new style/lineno.el - elpa/gnu.git Record workaround for autonum previews - elpa/gnu.git elpa/gnu.git - GNU ELPA Update style/eso-pic.el to package v3.0e ; * style/contract.el ("contract"): Speed up the additions. - elpa/gnu.git ; * style/contract.el ("contract"): Speed up the additions. ; * doc/faq.texi: Provide a more accessible Lisp form. (Bug#81034) - elpa/gnu.git ; * doc/faq.texi: Provide a more accessible Lisp form. (Bug#81034) ; * style/expl3.el (TeX-arg-expl3-macro): Fix docstring. - elpa/gnu.git ; * style/expl3.el (TeX-arg-expl3-macro): Fix docstring. Update style/simpleicons.el to package v16.17.0 - elpa/gnu.git Update style/simpleicons.el to package v16.17.0 elpa/gnu.git - GNU ELPA * style/contract.el ("contract"): Fix usage of \refParN. Improve matching of header end/trailer start in ConTeXt - elpa/gnu.git Improve matching of header end/trailer start in ConTeXt elpa/gnu.git - GNU ELPA Improve style/standalone.el elpa/gnu.git - GNU ELPA Update style/lua-unicode-math.el to package v0.8 Update style/babel.el to package v26.4 - elpa/gnu.git * style/babel-german.el ("babel-german"): Add missing macros. - elpa/gnu.git Update style/simpleicons.el to package v16.12.0 - elpa/gnu.git elpa/gnu.git - GNU ELPA elpa/gnu.git - GNU ELPA elpa/gnu.git - GNU ELPA elpa/gnu.git - GNU ELPA Add compatibility shim for obsolete preview option
elpa/gnu.git - GNU ELPA
David Fussne · 2026-06-13 · via elpa/gnu.git, branch externals/auctex

* bib-cite.el (bib-cite--next-ref): New helper function to replicate the behavior of the obsolete `find-tag'. (bib-find-next): Replace `find-tag' with previous.

diff --git a/bib-cite.el b/bib-cite.el
index ebcfbe63b30..864edc2e820 100644
--- a/bib-cite.el
+++ b/bib-cite.el

@@ -1,6 +1,6 @@

;; bib-cite.el - Display \cite, \ref or \label / Extract refs from BiBTeX file. -*- lexical-binding: t; -*-

-;; Copyright (C) 1994-1999, 2001, 2003-2005, 2014-2024 Free Software Foundation, Inc.

+;; Copyright (C) 1994-1999, 2001, 2003-2005, 2014-2026 Free Software Foundation, Inc.

;; Author: Peter S. Galbraith <psg@debian.org>

;; Maintainer: auctex-devel@gnu.org

@@ -593,6 +593,8 @@

(declare-function reftex-view-crossref "ext:reftex-dcr"

(&optional arg auto-how fail-quietly))

(declare-function outline-show-entry "ext:outline" ())

+(declare-function xref-quit-and-pop-marker-stack "xref" ())

+(declare-function xref-quit-and-goto-xref "xref" ())

(defgroup bib-cite nil

"bib-cite, LaTeX minor-mode to display \\cite, \\ref and \\label commands."

@@ -929,7 +931,81 @@ A TAGS file is created and used for multi-file documents under auctex."

(bib-find-label)))))

(defvar bib-cite-search-ring nil

- "Bib-cite intenal variable to hold last \\ref or \\eqref find.")

+ "Bib-cite internal variable to hold last \\ref or \\eqref find.")

+

+(defun bib-cite--next-ref (str &optional bkwd)

+ "Find the next or previous \\ref to a given \\label.

+

+STR comes from the variable `last-tag' which the command `bib-find'

+sets. Any non-nil PREV-P argument to `bib-find-next' sets BKWD here,

+producing a backward search. The search itself follows the order in the

+*xref* buffer produced by `xref-find-apropos'."

+ (if str

+ (let* (notag

+ (lino (concat (number-to-string (line-number-at-pos nil t)) ":"))

+ (file (buffer-file-name))

+ (tag (substring-no-properties str))

+ (xrtag (seq-subseq tag (1+ (seq-position tag ?{))

+ (seq-position tag ?})))

+ (re (concat bib-ref-regexpc xrtag "}"))

+ (buf (xref-find-apropos xrtag)))

+ (if bkwd

+ (with-current-buffer buf

+ (search-forward file nil t)

+ (re-search-forward "^[^[:digit:][:space:][:cntrl:]]" nil 1)

+ (beginning-of-line)

+ (condition-case nil

+ (search-backward lino)

+ (error (progn

+ (while

+ (and

+ (re-search-backward

+ (concat

+ "\\(?1:^[^[:digit:][:space:][:cntrl:]]\\)\\|"

+ "^[[:space:]]*\\(?1:[[:digit:]]+:\\)")

+ nil 1)

+ (string-match

+ "[[:digit:]]+:"

+ (match-string-no-properties 1) nil t)

+ (setq notag t)

+ (string-version-lessp

+ lino (match-string-no-properties 1))

+ (setq notag 1)))

+ (end-of-line))))

+ (unless (or (re-search-backward re nil 1) (eq notag t) (bobp))

+ (forward-line -1))

+ (condition-case nil

+ (xref-quit-and-goto-xref)

+ (user-error (progn

+ (xref-quit-and-pop-marker-stack)

+ (message "No previous occurrence of %s" re)))))

+ (with-current-buffer buf

+ (search-forward file nil t)

+ (condition-case nil

+ (search-forward lino)

+ (error (progn

+ (setq notag t)

+ (while

+ (and

+ (re-search-forward

+ (concat

+ "\\(?1:^[^[:digit:][:space:][:cntrl:]]\\)\\|"

+ "^[[:space:]]*\\(?1:[[:digit:]]+:\\)")

+ nil 1)

+ (string-match

+ "[[:digit:]]+:"

+ (match-string-no-properties 1) nil t)

+ (string-version-lessp

+ (match-string-no-properties 1) lino))))))

+ (unless notag

+ (forward-line))

+ (re-search-forward re nil 1)

+ (condition-case nil

+ (xref-quit-and-goto-xref)

+ (user-error (progn

+ (xref-quit-and-pop-marker-stack)

+ (message "No next occurrence of %s" re)))))))

+ (message "Sorry, no previous reference to find. Use bib-find?")))

(defun bib-find-next (&optional prev-p)

"Find next occurrence of a \\ref or \\eqref.

@@ -938,9 +1014,7 @@ documents, and the Emacs command `find-tag' doesn't allow to interactively

find the next occurrence of a regexp."

(interactive "P")

(if (bib-master-file) ;Multi-file document

- ;; FIXME: `find-tag' is replaced by `xref-find-definitions' in

- ;; Emacs 25.1. AUCTeX should track this change, sometime ...

- (find-tag t (if prev-p '- t) t)

+ (bib-cite--next-ref (if (boundp 'last-tag) last-tag nil) prev-p)

(if bib-cite-search-ring

;;FIXME: Should first make sure I move off initial \ref{}.

(let ((regexp (concat bib-ref-regexpc bib-cite-search-ring "}")))