auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX] insert \newline{}RET via keystroke


From: Stefan Pofahl
Subject: [AUCTeX] insert \newline{}RET via keystroke
Date: Fri, 05 Aug 2005 14:17:24 +0200

Hello,
I want to define the keystroke "C-RET" as:
------
   \newline{}RET
   CURSOR
------
If I define this in init.el (or .emacs):
(add-hook 'LaTeX-mode-hook 
  '(lambda nil
      ; control key bindings
      (define-key LaTeX-mode-map '[(control return)] "\\newline\n")   
      ;; newline (\f = C-f, \n = C-n)
      ;(define-key LaTeX-mode-map '"\C-RET" "\\newline\n")  
      ;; "\C-RET" = (control return); newline
    )    ) ;;end add-hook 'LaTeX-mode-hook

The result is:
-------
   \newline{CURSOR}
----------------------------
Workaround:
First define a kbd-macro, then call the macro:
(defalias 'neuezeile
  (read-kbd-macro "\\newline RET <right> RET"))
(add-hook 'LaTeX-mode-hook 
  '(lambda nil
      ; control key bindings
      (define-key LaTeX-mode-map '[(control return)] 'neuezeile)
      ;; insert \newline{}
    )    ) ;;end add-hook 'LaTeX-mode-hook

Is there an simple alternative to my workaround?
Where is a complete description of \f\t\n\r\v?

Regards, Stefan
-- 
_____________________________________________
Stefan Pofahl, 
privat: Ochsensteige 48, 89075 Ulm
Tel./Fax.: 0731 - 37 49 144





reply via email to

[Prev in Thread] Current Thread [Next in Thread]