Skip to main content
clarify first sentence
Source Link
erikstokes
  • 13k
  • 2
  • 37
  • 57

In Emacs 23, your function calls are correct (some-mode 1) was the typical way to turn on minor modes (but see this answer for the proper way to add them to the hooks). But Emacs 24 changed the rules for turning on minor modes. The argument to mode functions is no longer needed to turn the mode on anymore:

Toggle display of line numbers in the left margin (Linum mode). With a prefix argument ARG, enable Linum mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

So to simply turn on a minor mode, what you want is just #'linum-mode in your hooks.

In Emacs 23, your function calls are correct (but see this answer for the proper way to add them to the hooks). But Emacs 24 changed the rules for turning on minor modes. The argument to mode functions is no longer needed to turn the mode on anymore:

Toggle display of line numbers in the left margin (Linum mode). With a prefix argument ARG, enable Linum mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

So what you want is just #'linum-mode in your hooks.

In Emacs 23 (some-mode 1) was the typical way to turn on minor modes (but see this answer for the proper way to add them to the hooks). But Emacs 24 changed the rules for turning on minor modes. The argument to mode functions is no longer needed to turn the mode on anymore:

Toggle display of line numbers in the left margin (Linum mode). With a prefix argument ARG, enable Linum mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

So to simply turn on a minor mode, what you want is just #'linum-mode in your hooks.

correct behavior when argument is given
Source Link
erikstokes
  • 13k
  • 2
  • 37
  • 57

In Emacs 23, your function calls are correct (but see this answer for the proper way to add them to the hooks). But Emacs 24 changed the rules for turning on minor modes. The argument to mode functions doesn'tis no longer needed to turn the mode on anymore, it toggles it:

Toggle display of line numbers in the left margin (Linum mode). With a prefix argument ARG, enable Linum mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

So what you want is just #'linum-mode in your hooks.

In Emacs 23, your function calls are correct (but see this answer for the proper way to add them to the hooks). But Emacs 24 changed the rules for turning on minor modes. The argument to mode functions doesn't turn the mode on anymore, it toggles it:

Toggle display of line numbers in the left margin (Linum mode). With a prefix argument ARG, enable Linum mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

So what you want is just #'linum-mode in your hooks.

In Emacs 23, your function calls are correct (but see this answer for the proper way to add them to the hooks). But Emacs 24 changed the rules for turning on minor modes. The argument to mode functions is no longer needed to turn the mode on anymore:

Toggle display of line numbers in the left margin (Linum mode). With a prefix argument ARG, enable Linum mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

So what you want is just #'linum-mode in your hooks.

point to other answer
Source Link
erikstokes
  • 13k
  • 2
  • 37
  • 57

In Emacs 23, your code isfunction calls are correct (but see this answer for the proper way to add them to the hooks). But Emacs 24 changed the rules for turning on minor modes. The argument to mode functions doesn't turn the mode on anymore, it toggles it:

Toggle display of line numbers in the left margin (Linum mode). With a prefix argument ARG, enable Linum mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

So what you want is just 'linum#'linum-mode in your hooks.

In Emacs 23, your code is correct. But Emacs 24 changed the rules for turning on minor modes. The argument to mode functions doesn't turn the mode on anymore, it toggles it:

Toggle display of line numbers in the left margin (Linum mode). With a prefix argument ARG, enable Linum mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

So what you want is just 'linum-mode in your hooks.

In Emacs 23, your function calls are correct (but see this answer for the proper way to add them to the hooks). But Emacs 24 changed the rules for turning on minor modes. The argument to mode functions doesn't turn the mode on anymore, it toggles it:

Toggle display of line numbers in the left margin (Linum mode). With a prefix argument ARG, enable Linum mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

So what you want is just #'linum-mode in your hooks.

Source Link
erikstokes
  • 13k
  • 2
  • 37
  • 57
Loading