From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Weiner Newsgroups: gmane.emacs.devel Subject: Re: [elpa] externals/hyperbole faa8294 2/3: Redo hyperbole-mode; new {r} HyRolo search in match buffer Date: Sun, 16 May 2021 16:12:14 -0400 Message-ID: References: <20210429035707.30958.16274@vcs0.savannah.gnu.org> <20210429035709.3DF2320D0F@vcs0.savannah.gnu.org> Reply-To: rswgnu@gmail.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000005974d605c2781943" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22027"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 16 22:14:54 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1liNA6-0005Wz-Db for ged-emacs-devel@m.gmane-mx.org; Sun, 16 May 2021 22:14:54 +0200 Original-Received: from localhost ([::1]:50028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liNA5-0004j5-EL for ged-emacs-devel@m.gmane-mx.org; Sun, 16 May 2021 16:14:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liN7z-00027g-AC for emacs-devel@gnu.org; Sun, 16 May 2021 16:12:43 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33968) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liN7z-0000F0-2t for emacs-devel@gnu.org; Sun, 16 May 2021 16:12:43 -0400 Original-Received: from mail-lf1-f49.google.com ([209.85.167.49]:38471) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1liN7y-0006VW-1R for emacs-devel@gnu.org; Sun, 16 May 2021 16:12:42 -0400 Original-Received: by mail-lf1-f49.google.com with SMTP id r5so5729387lfr.5 for ; Sun, 16 May 2021 13:12:41 -0700 (PDT) X-Gm-Message-State: AOAM532fXjozWTEoDTEFxyLbjqYta6t2zOMLyopFKkPIBhf1DOcbStt5 8tEsvKfpR1cSiO1jBzX3HCBwFtyfOTEHJww0FiE= X-Google-Smtp-Source: ABdhPJyFkeFVyVJBXpERV0nc9rCNS7/L7N9aTTBGGz5ZgjAwKH5KY5gouLwOwR8PCTbEWhsOXgjlS4pOPFvR7kI0YFY= X-Received: by 2002:ac2:598f:: with SMTP id w15mr3703752lfn.171.1621195960709; Sun, 16 May 2021 13:12:40 -0700 (PDT) In-Reply-To: X-Gmail-Original-Message-ID: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:269375 Archived-At: --0000000000005974d605c2781943 Content-Type: text/plain; charset="UTF-8" Hi Stefan: These fixes were committed awhile back: commit faa8294. Have a look. -- Bob On Thu, Apr 29, 2021 at 2:00 AM Stefan Monnier wrote: > > +(defun enable-hyperbole-mode () > > + "Enable Hyperbole global minor mode." > > + (interactive) > > The `hyperbole-mode` command already offers that functionality, so > there's no point providing this as an interactive command. > I'd recommend you use a "--" in the name and keep that function "internal". > Also please use a "hyperbole-" prefix. > > > + ;; Activate hyperbole-mode > > + (run-hooks 'hyperbole-mode-hook)) > > `define-minor-mode` runs `hyperbole-mode-hook` for you already, so this > `run-hooks` will cause the hook to be run twice in a row. > > > :keymap hyperbole-mode-map > > This argument is redundant. > > > +(if after-init-time > > + ;; Initialize Hyperbole key bindings and hooks. > > + (hyperb:init) > > + ;; Initialize after other key bindings are loaded at startup. > > + (add-hook 'after-init-hook #'hyperb:init t)) > > > > ;; !! FIXME: Loading a file should not change Emacs's behavior but we > > ;; need this here for awhile until can ensure Hyperbole users know to > > I suspect the above code and the above comment should be swapped? > > > Stefan > > --0000000000005974d605c2781943 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Stefan:

These fixes were committed awhile back: commit faa8294.=C2=A0=C2=A0Have = a look.=C2=A0 -- Bob

On Thu, Apr 29, 2021 at 2:00 AM Stefan Monnier <monnier@iro.umont= real.ca> wrote:
> +(defun enable-hyperbole-mode ()
> +=C2=A0 "Enable Hyperbole global minor mode."
> +=C2=A0 (interactive)

The `hyperbole-mode` command already offers that functionality, so
there's no point providing this as an interactive command.
I'd recommend you use a "--" in the name and keep that functi= on "internal".
Also please use a "hyperbole-" prefix.

> +=C2=A0 ;; Activate hyperbole-mode
> +=C2=A0 (run-hooks 'hyperbole-mode-hook))

`define-minor-mode` runs `hyperbole-mode-hook` for you already, so this
`run-hooks` will cause the hook to be run twice in a row.

>=C2=A0 =C2=A0 :keymap hyperbole-mode-map

This argument is redundant.

> +(if after-init-time
> +=C2=A0 =C2=A0 ;; Initialize Hyperbole key bindings and hooks.
> +=C2=A0 =C2=A0 (hyperb:init)
> +=C2=A0 ;; Initialize after other key bindings are loaded at startup.<= br> > +=C2=A0 (add-hook 'after-init-hook #'hyperb:init t))
>=C2=A0
>=C2=A0 ;; !! FIXME: Loading a file should not change Emacs's behavi= or but we
>=C2=A0 ;; need this here for awhile until can ensure Hyperbole users kn= ow to

I suspect the above code and the above comment should be swapped?


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan

--0000000000005974d605c2781943--