* Re: How can I turn on abbrev mode by default? [not found] <mailman.1828.1066331526.21628.help-gnu-emacs@gnu.org> @ 2003-10-16 21:31 ` Micah Cowan 2003-10-16 23:44 ` Dan Anderson [not found] ` <mailman.1838.1066347910.21628.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 6+ messages in thread From: Micah Cowan @ 2003-10-16 21:31 UTC (permalink / raw) Dan Anderson <dan@mathjunkies.com> writes: > Is it possible to turn on abbrev mode by default whenever I go into > cperl-mode. i.e. whenever I do: > > M-x cperl-mode (or emacs does it when I open a perl file) > > Emacs knows to: > M-x abbrev-mode Go to the customization for cperl-mode-hook by doing: M-x customize-option RET cperl-mode-hook Then click on INS and type into the field: abbrev-mode And go save your setting. That's it! HTH, Micah ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How can I turn on abbrev mode by default? 2003-10-16 21:31 ` How can I turn on abbrev mode by default? Micah Cowan @ 2003-10-16 23:44 ` Dan Anderson 2003-10-18 19:57 ` jan [not found] ` <mailman.1914.1066445255.21628.help-gnu-emacs@gnu.org> [not found] ` <mailman.1838.1066347910.21628.help-gnu-emacs@gnu.org> 1 sibling, 2 replies; 6+ messages in thread From: Dan Anderson @ 2003-10-16 23:44 UTC (permalink / raw) Cc: help-gnu-emacs > Go to the customization for cperl-mode-hook by doing: > > M-x customize-option RET cperl-mode-hook > > Then click on INS and type into the field: > > abbrev-mode When I do that it tells me "No match". CPerlmode is installed in my .emacs.d/lisp directory. Could this be the problem? -Dan ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How can I turn on abbrev mode by default? 2003-10-16 23:44 ` Dan Anderson @ 2003-10-18 19:57 ` jan [not found] ` <mailman.1914.1066445255.21628.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 6+ messages in thread From: jan @ 2003-10-18 19:57 UTC (permalink / raw) Cc: help-gnu-emacs Dan Anderson <dan@mathjunkies.com> writes: > > Go to the customization for cperl-mode-hook by doing: > > > > M-x customize-option RET cperl-mode-hook > > > > Then click on INS and type into the field: > > > > abbrev-mode > > When I do that it tells me "No match". CPerlmode is installed in my > .emacs.d/lisp directory. Could this be the problem? Another approach is to just add this to your .emacs file. (add-hook 'hack-local-variables-hook #'(lambda () (when (eq major-mode 'cperl-mode) (abbrev-mode 1)))) But why not turn it on all the time. Abbrevs are mode sensitive anyway. It's even simpler too. (add-hook 'hack-local-variables-hook #'(lambda () (abbrev-mode 1))) -- jan ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <mailman.1914.1066445255.21628.help-gnu-emacs@gnu.org>]
* Re: How can I turn on abbrev mode by default? [not found] ` <mailman.1914.1066445255.21628.help-gnu-emacs@gnu.org> @ 2003-10-19 8:47 ` Micah Cowan 0 siblings, 0 replies; 6+ messages in thread From: Micah Cowan @ 2003-10-19 8:47 UTC (permalink / raw) jan <janmar@iprimus.com.au> writes: > Dan Anderson <dan@mathjunkies.com> writes: > > > > Go to the customization for cperl-mode-hook by doing: > > > > > > M-x customize-option RET cperl-mode-hook > > > > > > Then click on INS and type into the field: > > > > > > abbrev-mode > > > > When I do that it tells me "No match". CPerlmode is installed in my > > .emacs.d/lisp directory. Could this be the problem? > > Another approach is to just add this to your .emacs file. > > (add-hook 'hack-local-variables-hook > #'(lambda () > (when (eq major-mode 'cperl-mode) > (abbrev-mode 1)))) It seems more appropriate to do (add-hook 'cperl-mode-hook 'abbrev-mode) or maybe (add-hook 'cperl-mode-hook #'(lambda () (abbrev-mode 1))) > > But why not turn it on all the time. Abbrevs are mode sensitive > anyway. It's even simpler too. > > (add-hook 'hack-local-variables-hook > #'(lambda () (abbrev-mode 1))) If that's truly what you want... This seems too much like a shotgun-approach to me, tho': if you find yourself using it in most of your modes, then maybe having an alist of modes to either enable or disable it in might be slightly better... Just my 2¢ -Micah ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <mailman.1838.1066347910.21628.help-gnu-emacs@gnu.org>]
* Re: How can I turn on abbrev mode by default? [not found] ` <mailman.1838.1066347910.21628.help-gnu-emacs@gnu.org> @ 2003-10-17 7:18 ` Micah Cowan 0 siblings, 0 replies; 6+ messages in thread From: Micah Cowan @ 2003-10-17 7:18 UTC (permalink / raw) Dan Anderson <dan@mathjunkies.com> writes: > > Go to the customization for cperl-mode-hook by doing: > > > > M-x customize-option RET cperl-mode-hook > > > > Then click on INS and type into the field: > > > > abbrev-mode > > When I do that it tells me "No match". CPerlmode is installed in my > .emacs.d/lisp directory. Could this be the problem? Hm. Try adding (load "cperl-mode") near the top of your .emacs (assuming .emacs.d is in your load-path), and evaluate it. Does that help? -Micah ^ permalink raw reply [flat|nested] 6+ messages in thread
* How can I turn on abbrev mode by default? @ 2003-10-16 19:11 Dan Anderson 0 siblings, 0 replies; 6+ messages in thread From: Dan Anderson @ 2003-10-16 19:11 UTC (permalink / raw) Is it possible to turn on abbrev mode by default whenever I go into cperl-mode. i.e. whenever I do: M-x cperl-mode (or emacs does it when I open a perl file) Emacs knows to: M-x abbrev-mode THanks in advance, Dan ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-10-19 8:47 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <mailman.1828.1066331526.21628.help-gnu-emacs@gnu.org> 2003-10-16 21:31 ` How can I turn on abbrev mode by default? Micah Cowan 2003-10-16 23:44 ` Dan Anderson 2003-10-18 19:57 ` jan [not found] ` <mailman.1914.1066445255.21628.help-gnu-emacs@gnu.org> 2003-10-19 8:47 ` Micah Cowan [not found] ` <mailman.1838.1066347910.21628.help-gnu-emacs@gnu.org> 2003-10-17 7:18 ` Micah Cowan 2003-10-16 19:11 Dan Anderson
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.