unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [Annotation]  New package: smart-yank.el
@ 2016-05-16 23:41 Michael Heerdegen
  2016-05-17  0:38 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Heerdegen @ 2016-05-16 23:41 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 192 bytes --]

Hello,


I intend to upload the attached package "smart-yank.el" to Gnu Elpa
(does that work again btw?).

Any comments, objections, ...or something like that?  Thanks.


Regards,

Michael.



[-- Attachment #2: smart-yank.el --]
[-- Type: application/emacs-lisp, Size: 6902 bytes --]

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

* Re: [Annotation]  New package: smart-yank.el
  2016-05-16 23:41 [Annotation] New package: smart-yank.el Michael Heerdegen
@ 2016-05-17  0:38 ` Stefan Monnier
  2016-05-17  1:07   ` Michael Heerdegen
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2016-05-17  0:38 UTC (permalink / raw)
  To: emacs-devel

> I intend to upload the attached package "smart-yank.el" to Gnu Elpa
> (does that work again btw?).
> Any comments, objections, ...or something like that?  Thanks.

Sounds good to me.  See nitpicks below.


        Stefan


> (let ((r (smart-yank--stopwatch)))
>   (defun smart-yank-yank-pop (&optional arg)
[...]
> (declare-function smart-yank-yank-pop 'smart-yank)

An arguably cleaner way to get the same result would be:

   (defalias 'smart-yank-yank-pop
     (let ((r (smart-yank--stopwatch)))
       (lambda (&optional arg)
         "blabla"
         ...)))

> (define-minor-mode smart-yank-mode
[...]
>   :global t :keymap smart-yank-map

Please name the keymap `smart-yank-mode-map' and don't use the :keymap
argument at all.




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

* Re: [Annotation]  New package: smart-yank.el
  2016-05-17  0:38 ` Stefan Monnier
@ 2016-05-17  1:07   ` Michael Heerdegen
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Heerdegen @ 2016-05-17  1:07 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>    (defalias 'smart-yank-yank-pop
>      (let ((r (smart-yank--stopwatch)))
>        (lambda (&optional arg)
>          "blabla"
>          ...)))

Yes, this is a bit nicer.


> > (define-minor-mode smart-yank-mode
> [...]
> >   :global t :keymap smart-yank-map
>
> Please name the keymap `smart-yank-mode-map' [...]

Ah, that's the reason why removing the :keymap spec broke the thing when
I had tried it... ;-)


Many Thanks, Stefan!

Michael.




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

end of thread, other threads:[~2016-05-17  1:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-16 23:41 [Annotation] New package: smart-yank.el Michael Heerdegen
2016-05-17  0:38 ` Stefan Monnier
2016-05-17  1:07   ` Michael Heerdegen

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