#564539 paredit-el: Add to frequent values list

#564539#5
Date:
2010-01-10 03:01:26 UTC
From:
To:
(when (fboundp 'paredit-mode)
      (mapc (lambda (hook)
              (custom-add-frequent-value hook
                '(lambda ()
                   (paredit-mode +1)))
            '(lisp-mode-hook scheme-mode-hook emacs-lisp-mode-hook)))

What this does is list paredit as an option with a pretty checkbox in
the customize buffer. For example the folowing:

  M-x customize-option RET lisp-mode-hook RET

Will have an extra checkmark the user can tick to enable paredit mode in
lisp-mode buffers.

#564539#10
Date:
2010-01-10 03:38:29 UTC
From:
To:
package paredit-el
tags 564539 + wontfix
thanks

James wrote:

The existing README.Debian file states:

Having been on the receiving end of overenthusiastically-enabled modes
(e.g. cedet) on a shared system, I'm reluctant to turn paredit on by
default, even for lisp-mode.  As you say, it's easy for customize
users to disable it again, but it's more annoying with a hand-written
.emacs that's shared across a number of heterogeneous hosts.

#564539#17
Date:
2010-01-14 16:15:13 UTC
From:
To:
"Trent W. Buck" <trentbuck@gmail.com> writes:
Already read it before the original submission. See below.

I do not think you understood my suggestion. Those hooks do not enable
the mode by default, what they do is let the user choose to turn it on
by clicking a little checkbox in customize.  This suggestion does _not_
turn anything on by default.

Please reconsider.

#564539#22
Date:
2010-05-18 00:03:54 UTC
From:
To:
James <i@nixeagle.org> writes:

This sounds good to me.  I notice there's an existing
`enable-paredit-mode' which could be used and show a docstring in the
hook customize.

    (autoload 'enable-paredit-mode "paredit"
      "Turn on pseudo-structural editing of Lisp code." t)
    (custom-add-option 'lisp-mode-hook       'enable-paredit-mode)
    (custom-add-option 'scheme-mode-hook     'enable-paredit-mode)
    (custom-add-option 'emacs-lisp-mode-hook 'enable-paredit-mode)

`enable-paredit-mode' is flagged as depreciated, but it can helpfully be
kept for such use in a hook, irrespective whether it's a custom option
or not.