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

推荐订阅源

OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
L
LINUX DO - 热门话题
Blog — PlanetScale
Blog — PlanetScale
博客园 - Franky
J
Java Code Geeks
腾讯CDC
博客园 - 聂微东
The Cloudflare Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
Last Week in AI
Last Week in AI
量子位
Stack Overflow Blog
Stack Overflow Blog
Microsoft Security Blog
Microsoft Security Blog
Google DeepMind News
Google DeepMind News
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Schneier on Security
C
CERT Recently Published Vulnerability Notes
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
有赞技术团队
有赞技术团队
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
S
Securelist
AWS News Blog
AWS News Blog
GbyAI
GbyAI
L
LINUX DO - 最新话题
大猫的无限游戏
大猫的无限游戏
Forbes - Security
Forbes - Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Attack and Defense Labs
Attack and Defense Labs
C
CXSECURITY Database RSS Feed - CXSecurity.com
Y
Y Combinator Blog
W
WeLiveSecurity
T
Threatpost
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
P
Proofpoint News Feed
D
DataBreaches.Net
博客园 - 三生石上(FineUI控件)
V
V2EX
N
News and Events Feed by Topic
Google DeepMind News
Google DeepMind News
D
Docker
The Hacker News
The Hacker News
A
About on SuperTechFans
Security Latest
Security Latest
NISL@THU
NISL@THU
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Cisco Talos Blog
Cisco Talos Blog
博客园_首页
H
Hacker News: Front Page

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 "}")))