unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] trunk r113874: lisp/frameset.el: Use gv-setter declaration.
       [not found] <E1V9b9a-000319-ID@vcs.savannah.gnu.org>
@ 2013-08-14 15:44 ` Stefan Monnier
  2013-08-14 15:47   ` Juanma Barranquero
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2013-08-14 15:44 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: emacs-devel

> +(defun frameset--prop-setter (frameset property value)
> +  "Setter function for `frameset-prop'.  Internal use only."

While "internal use" here is fine, any file that does (setf
(frameset-prop ...) ...) will end up with a call to that function in its
.elc, so you won't be able to change the function at will ;-(

That's not specific to your code, obviously, but I figured it was
worth mentioning.


        Stefan



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

* Re: [Emacs-diffs] trunk r113874: lisp/frameset.el: Use gv-setter declaration.
  2013-08-14 15:44 ` [Emacs-diffs] trunk r113874: lisp/frameset.el: Use gv-setter declaration Stefan Monnier
@ 2013-08-14 15:47   ` Juanma Barranquero
  2013-08-14 16:04     ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Juanma Barranquero @ 2013-08-14 15:47 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs developers

On Wed, Aug 14, 2013 at 5:44 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:

> While "internal use" here is fine, any file that does (setf
> (frameset-prop ...) ...) will end up with a call to that function in its
> .elc, so you won't be able to change the function at will ;-(

Well, it's simple enough that I don't expect to have to change it. The
"Internal only." bit is just a clue to the user that s/he is not
expected to call it directly.

> That's not specific to your code, obviously, but I figured it was
> worth mentioning.

Worth documenting, too.

Thanks,

   J



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

* Re: [Emacs-diffs] trunk r113874: lisp/frameset.el: Use gv-setter declaration.
  2013-08-14 15:47   ` Juanma Barranquero
@ 2013-08-14 16:04     ` Stefan Monnier
  2013-08-14 16:06       ` Juanma Barranquero
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2013-08-14 16:04 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Emacs developers

>> While "internal use" here is fine, any file that does (setf
>> (frameset-prop ...) ...) will end up with a call to that function in its
>> .elc, so you won't be able to change the function at will ;-(
> Well, it's simple enough that I don't expect to have to change it.

Actually, you can change its implementation just fine.  The problems
come when you want to change the set of args it takes, or if you want to
remove it.  You may also need to autoload it (in your case it's not
needed, but the situation would be different if the getter was
autoloaded).


        Stefan



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

* Re: [Emacs-diffs] trunk r113874: lisp/frameset.el: Use gv-setter declaration.
  2013-08-14 16:04     ` Stefan Monnier
@ 2013-08-14 16:06       ` Juanma Barranquero
  0 siblings, 0 replies; 4+ messages in thread
From: Juanma Barranquero @ 2013-08-14 16:06 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs developers

On Wed, Aug 14, 2013 at 6:04 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:

> Actually, you can change its implementation just fine.  The problems
> come when you want to change the set of args it takes, or if you want to
> remove it.

Better still. Changing the parameter profile of a setter function
surely isn't very frequent, and as for removing it, that's what
obsoleting is for ;-)

> You may also need to autoload it (in your case it's not
> needed, but the situation would be different if the getter was
> autoloaded).

Understood.

   J



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

end of thread, other threads:[~2013-08-14 16:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <E1V9b9a-000319-ID@vcs.savannah.gnu.org>
2013-08-14 15:44 ` [Emacs-diffs] trunk r113874: lisp/frameset.el: Use gv-setter declaration Stefan Monnier
2013-08-14 15:47   ` Juanma Barranquero
2013-08-14 16:04     ` Stefan Monnier
2013-08-14 16:06       ` 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).