unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* comment-line-break-function is not buffer-local
@ 2005-06-20 10:11 Juanma Barranquero
  2005-06-20 12:45 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Juanma Barranquero @ 2005-06-20 10:11 UTC (permalink / raw)


Doc for comment-line-break-function says:

(defvar comment-line-break-function 'comment-indent-new-line
[...]
Setting this variable automatically makes it local to the current buffer.")

which is not true, and it seems it never was. (It was added at
http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/simple.el.diff?r1=1.317&r2=1.318),
with the comment but no `make-variable-buffer-local' or equivalent.

What's preferable? Fixing the doc, or adding
`make-variable-buffer-local'? (I'm partial to the first option.)

-- 
                    /L/e/k/t/u

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

* Re: comment-line-break-function is not buffer-local
  2005-06-20 10:11 comment-line-break-function is not buffer-local Juanma Barranquero
@ 2005-06-20 12:45 ` Stefan Monnier
  2005-06-20 12:56   ` Juanma Barranquero
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2005-06-20 12:45 UTC (permalink / raw)
  Cc: emacs-devel

> Doc for comment-line-break-function says:
> (defvar comment-line-break-function 'comment-indent-new-line
> [...]
> Setting this variable automatically makes it local to the current buffer.")

> which is not true, and it seems it never was. (It was added at
> http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/simple.el.diff?r1=1.317&r2=1.318),
> with the comment but no `make-variable-buffer-local' or equivalent.

> What's preferable? Fixing the doc, or adding
> `make-variable-buffer-local'? (I'm partial to the first option.)

The doc is necessarily wrong, because nowadays the "automatically becomes
local when set" message is automatically added to the docstring when
applicable, so it should not be in the docstring, whether we add
a make-variable-buffer-local or not.


        Stefan

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

* Re: comment-line-break-function is not buffer-local
  2005-06-20 12:45 ` Stefan Monnier
@ 2005-06-20 12:56   ` Juanma Barranquero
  2005-06-20 13:38     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Juanma Barranquero @ 2005-06-20 12:56 UTC (permalink / raw)
  Cc: emacs-devel

> The doc is necessarily wrong, because nowadays the "automatically becomes
> local when set" message is automatically added to the docstring when
> applicable, so it should not be in the docstring, whether we add
> a make-variable-buffer-local or not.

Yes, I know that. My question is, should I respect the behavior
described in the variable's current doc, or the one implemented?
AFAICS, the few modules that use it (ada-mode.el, cc-mode.el,
sgml-mode.el) are doing

   (set (make-local-variable 'comment-line-break-function) whatever)

or equivalent. Does anyone know how does it behave on recent XEmacs?

-- 
                    /L/e/k/t/u

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

* Re: comment-line-break-function is not buffer-local
  2005-06-20 12:56   ` Juanma Barranquero
@ 2005-06-20 13:38     ` Stefan Monnier
  2005-06-20 13:42       ` Juanma Barranquero
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2005-06-20 13:38 UTC (permalink / raw)
  Cc: emacs-devel

> Yes, I know that. My question is, should I respect the behavior
> described in the variable's current doc, or the one implemented?

The safe option is to stick to the current behavior,


        Stefan

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

* Re: comment-line-break-function is not buffer-local
  2005-06-20 13:38     ` Stefan Monnier
@ 2005-06-20 13:42       ` Juanma Barranquero
  0 siblings, 0 replies; 5+ messages in thread
From: Juanma Barranquero @ 2005-06-20 13:42 UTC (permalink / raw)
  Cc: emacs-devel

> The safe option is to stick to the current behavior,

OK.

-- 
                    /L/e/k/t/u

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

end of thread, other threads:[~2005-06-20 13:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-20 10:11 comment-line-break-function is not buffer-local Juanma Barranquero
2005-06-20 12:45 ` Stefan Monnier
2005-06-20 12:56   ` Juanma Barranquero
2005-06-20 13:38     ` Stefan Monnier
2005-06-20 13:42       ` Juanma Barranquero

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).