unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Set LaTeX-math-abbrev-prefix
@ 2008-06-23  9:10 Florian.Lindner
  2008-06-23 12:56 ` Kevin Rodgers
  2008-06-23 16:52 ` Ralf Angeli
  0 siblings, 2 replies; 5+ messages in thread
From: Florian.Lindner @ 2008-06-23  9:10 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

I try to set this variable to another value which is easier to reach
on my keyboard.

(add-hook 'LaTeX-mode-hook
	  (lambda ()
	    (local-set-key (kbd "RET") 'reindent-then-newline-and-indent)
	    (local-set-key (kbd "C-c SPC") 'LaTeX-math-mode)
	    (setq LaTeX-math-abbrev-prefix (kbd "#"))))

C-h v says it has the correct value but it does not work. It also
says:
"Setting this variable directly does not take effect; use M-x
customize."

However I would prefer not using customize. How can I set this
variable manually?

Thanks,

Florian


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Set LaTeX-math-abbrev-prefix
  2008-06-23  9:10 Set LaTeX-math-abbrev-prefix Florian.Lindner
@ 2008-06-23 12:56 ` Kevin Rodgers
  2008-06-23 16:52 ` Ralf Angeli
  1 sibling, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2008-06-23 12:56 UTC (permalink / raw)
  To: help-gnu-emacs

Florian.Lindner@xgm.de wrote:
> Hello,
> 
> I try to set this variable to another value which is easier to reach
> on my keyboard.
> 
> (add-hook 'LaTeX-mode-hook
> 	  (lambda ()
> 	    (local-set-key (kbd "RET") 'reindent-then-newline-and-indent)
> 	    (local-set-key (kbd "C-c SPC") 'LaTeX-math-mode)
> 	    (setq LaTeX-math-abbrev-prefix (kbd "#"))))
> 
> C-h v says it has the correct value but it does not work. It also
> says:
> "Setting this variable directly does not take effect; use M-x
> customize."
> 
> However I would prefer not using customize. How can I set this
> variable manually?

To set the variable interactively, use M-x customize.  To set it
programatically e.g. in a hook:

(customize-set-variable 'LaTeX-math-abbrev-prefix (kbd "#"))

-- 
Kevin Rodgers
Denver, Colorado, USA





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Set LaTeX-math-abbrev-prefix
  2008-06-23  9:10 Set LaTeX-math-abbrev-prefix Florian.Lindner
  2008-06-23 12:56 ` Kevin Rodgers
@ 2008-06-23 16:52 ` Ralf Angeli
  2008-06-23 20:31   ` Florian.Lindner
  1 sibling, 1 reply; 5+ messages in thread
From: Ralf Angeli @ 2008-06-23 16:52 UTC (permalink / raw)
  To: help-gnu-emacs

* Florian Lindner (2008-06-23) writes:

> I try to set this variable to another value which is easier to reach
> on my keyboard.
>
> (add-hook 'LaTeX-mode-hook
> 	  (lambda ()
> 	    (local-set-key (kbd "RET") 'reindent-then-newline-and-indent)

You could also customize `TeX-newline-function' as suggested by the
AUCTeX manual.

> 	    (local-set-key (kbd "C-c SPC") 'LaTeX-math-mode)
> 	    (setq LaTeX-math-abbrev-prefix (kbd "#"))))
>
> C-h v says it has the correct value but it does not work. It also
> says:
> "Setting this variable directly does not take effect; use M-x
> customize."
>
> However I would prefer not using customize. How can I set this
> variable manually?

Simply use
(setq LaTeX-math-abbrev-prefix "#")

The hint in the doc string refers to setting it in a running Emacs
session after latex.el was loaded.

-- 
Ralf


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Set LaTeX-math-abbrev-prefix
  2008-06-23 16:52 ` Ralf Angeli
@ 2008-06-23 20:31   ` Florian.Lindner
  2008-06-23 20:44     ` Ralf Angeli
  0 siblings, 1 reply; 5+ messages in thread
From: Florian.Lindner @ 2008-06-23 20:31 UTC (permalink / raw)
  To: help-gnu-emacs

On 23 Jun., 18:52, Ralf Angeli <dev.n...@caeruleus.net> wrote:
> * Florian Lindner (2008-06-23) writes:
>
> > I try to set this variable to another value which is easier to reach
> > on my keyboard.
>
> > (add-hook 'LaTeX-mode-hook
> >      (lambda ()
> >        (local-set-key (kbd "RET") 'reindent-then-newline-and-indent)
>
> You could also customize `TeX-newline-function' as suggested by the
> AUCTeX manual.

Thanks, that looks cleaner, done that.

>
> >        (local-set-key (kbd "C-c SPC") 'LaTeX-math-mode)
> >        (setq LaTeX-math-abbrev-prefix (kbd "#"))))
>
> > C-h v says it has the correct value but it does not work. It also
> > says:
> > "Setting this variable directly does not take effect; use M-x
> > customize."
>
> > However I would prefer not using customize. How can I set this
> > variable manually?
>
> Simply use
> (setq LaTeX-math-abbrev-prefix "#")

That I have also tried but does not work.
(customize-set-variable 'LaTeX-math-abbrev-prefix (kbd "#"))  like
Kevin suggested does the job.

>
> The hint in the doc string refers to setting it in a running Emacs
> session after latex.el was loaded.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Set LaTeX-math-abbrev-prefix
  2008-06-23 20:31   ` Florian.Lindner
@ 2008-06-23 20:44     ` Ralf Angeli
  0 siblings, 0 replies; 5+ messages in thread
From: Ralf Angeli @ 2008-06-23 20:44 UTC (permalink / raw)
  To: help-gnu-emacs

* Florian Lindner (2008-06-23) writes:

> On 23 Jun., 18:52, Ralf Angeli <dev.n...@caeruleus.net> wrote:
>>
>> Simply use
>> (setq LaTeX-math-abbrev-prefix "#")
>
> That I have also tried but does not work.

If you added it to the hook, don't.  In my case it works when used
without a hook.

> (customize-set-variable 'LaTeX-math-abbrev-prefix (kbd "#"))  like
> Kevin suggested does the job.

Well, yeah, but for the case at hand it is inefficient overkill.

-- 
Ralf


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-06-23 20:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-23  9:10 Set LaTeX-math-abbrev-prefix Florian.Lindner
2008-06-23 12:56 ` Kevin Rodgers
2008-06-23 16:52 ` Ralf Angeli
2008-06-23 20:31   ` Florian.Lindner
2008-06-23 20:44     ` Ralf Angeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).