Move some RefTeX 'setq's to major mode definition

Move two 'setq' expressions from the RefTeX label selection loop
to the body of the major mode definition, so to make it easier
to adjust the settings of the buffer via the mode hook.

* lisp/textmodes/reftex-ref.el (reftex-offer-label-menu): Move
two 'setq' expressions from here...
* lisp/textmodes/reftex-sel.el (reftex-select-label-mode): ...to
here.  (bug#77335)
This commit is contained in:
Pengji Zhang
2025-03-23 11:48:14 +08:00
committed by Arash Esbati
parent 7f1cae9637
commit 5d9a67e4bd
2 changed files with 6 additions and 6 deletions

View File

@@ -574,12 +574,6 @@ When called with 2 \\[universal-argument] prefix args, disable magic word recogn
(unless (eq major-mode 'reftex-select-label-mode)
(reftex-select-label-mode))
(cl-pushnew (current-buffer) selection-buffers)
(setq truncate-lines t)
(setq mode-line-format
(list "---- " 'mode-line-buffer-identification
" " 'global-mode-string " (" mode-name ")"
" S<" 'reftex-refstyle ">"
" -%-"))
(cond
((= 0 (buffer-size))
(let ((buffer-read-only nil))

View File

@@ -98,6 +98,12 @@ During a selection process, these are the local bindings.
\\{reftex-select-label-mode-map}"
(setq-local reftex-select-marked nil)
(setq truncate-lines t)
(setq mode-line-format
(list "---- " 'mode-line-buffer-identification
" " 'global-mode-string " (" mode-name ")"
" S<" 'reftex-refstyle ">"
" -%-"))
(when (syntax-table-p reftex-latex-syntax-table)
(set-syntax-table reftex-latex-syntax-table))
;; We do not set a local map - reftex-select-item does this.