"William Henney" <[EMAIL PROTECTED]> writes:
> Dear AUCTeX devs,
>
> When using the "C-c C-s" (LaTeX-section) command, the user gets the
> opportunity to enter the title for the new section in the
> minibuffer. However, if input methods are enabled, then they don't
> work when entering this text. I think that the fix is to set the
> "inherit-input-method" argument to the "read-string" function.
>
> Here is a new version of LaTeX-section-title (from latex.el) that
> works how I would like in Emacs 22:
>
> (defun LaTeX-section-title ()
> "Hook to prompt for LaTeX section title.
> Insert this hook into `LaTeX-section-hook' to allow the user to change
> the title of the section inserted with `\\[LaTeX-section]."
> (setq title (read-string "Title: " nil nil title t))
> (let ((region (and (TeX-active-mark)
> (cons (region-beginning) (region-end)))))
> (when region (delete-region (car region) (cdr region)))))
>
> I've no idea if this would still work in older versions of
> emacs.
Not in XEmacs. One could use the following patch in order to have a
function TeX-read-string taking 5 arguments:
--- tex.el 11 Oct 2006 02:52:36 +0200 5.590
+++ tex.el 30 Oct 2006 20:21:14 +0100
@@ -682,6 +682,12 @@
(when (featurep 'xemacs)
+ (defun TeX-read-string (&rest args)
+ (condition-case nil
+ (apply 'read-string args)
+ (wrong-number-of-arguments
+ (apply 'read-string (nbutlast args)))))
+
(defun TeX-mark-active ()
;; In Lucid (mark) returns nil when not active.
(if zmacs-regions
@@ -766,6 +772,8 @@
(unless (featurep 'xemacs)
+ (defalias 'TeX-read-string 'read-string)
+
(defun TeX-mark-active ()
;; In FSF 19 mark-active indicates if mark is active.
mark-active)
> Other functions could probably do with a similar makeover
> (e.g., LaTeX-env-figure for the figure caption).
One would need to do a grep for read-string and replace it by a
5-argument call to TeX-read-string where appropriate. Anybody willing
to figure out where it is appropriate?
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
_______________________________________________
bug-auctex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-auctex