all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [elpa] externals/brief 362d629671: Brief mode v5.88.22 release for various enhancements and bug fixes
       [not found] ` <20230129162214.20BBEC0019D@vcs2.savannah.gnu.org>
@ 2023-01-30  2:50   ` Stefan Monnier
  2023-01-30  3:01     ` Stefan Monnier
  2023-01-30  2:58   ` Stefan Monnier
  1 sibling, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2023-01-30  2:50 UTC (permalink / raw)
  To: Luke Lee; +Cc: emacs-devel

>  (eval-when-compile
> -  (require 'cl-lib)
> +  (if (version< emacs-version "27.0")
> +      (progn
> +        (require 'cl) ;; Package cl is deprecated for Emacs27+
> +        (require 'cl-macs))
> +    (require 'cl-lib))

This looks like a regression resulting from a misunderstanding.
What are you trying to do here?

The rest of the code only uses `cl-lib` functionality, so (require 'cl)
will only be useful because if it internally does (require 'cl-lib).
In Emacs<24.3, this will fail because (require 'cl) will not define the
macros that the rest of the code needs (e.g. `cl-eval-when`, `cl-loop`, ...).


        Stefan




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

* Re: [elpa] externals/brief 362d629671: Brief mode v5.88.22 release for various enhancements and bug fixes
       [not found] ` <20230129162214.20BBEC0019D@vcs2.savannah.gnu.org>
  2023-01-30  2:50   ` [elpa] externals/brief 362d629671: Brief mode v5.88.22 release for various enhancements and bug fixes Stefan Monnier
@ 2023-01-30  2:58   ` Stefan Monnier
  2023-01-30 17:07     ` 路客
  2023-01-31 15:12     ` 路客
  1 sibling, 2 replies; 7+ messages in thread
From: Stefan Monnier @ 2023-01-30  2:58 UTC (permalink / raw)
  To: Luke Lee; +Cc: emacs-devel

> branch: externals/brief
> commit 362d6296717af611be20cb56592d495c01ea7a00
> Author: Luke Lee <luke@gauss>
> Commit: Luke Lee <luke@gauss>

Please try and use a valid email as commit identifier.

> @@ -457,8 +461,9 @@
>  ;; backward compatibility issues.
>  ;;(require 'replace)
>  
> -(defconst brief-version "5.87"
> -  "The version of this Brief emulator.")
> +;;;###autoload
> +(defconst brief-version "5.88.22"
> +  "Current version of this Brief editor mode/emulator.")

Why autoload?

> -           (not (fboundp 'save-mark-and-excursion)))
> +           (not (fboundp #'save-mark-and-excursion)))

The arg to `fboundp` is a symbol not a function (e.g. it can't be
a (lambda ...) for example), so I think #' is ill-advised.
It works fine, in practice, so it's somewhat of a philosophical issue.

> +  (when (and (version<= "27.0" emacs-version)

I understand efficiency is not a major issue here, but

    (<= 27 emacs-major-version)

works just as well :-)

> -  (scroll-bar-mode -1)             ;; small border without scroll bar
> +  (when (and brief-turn-off-scroll-bar-mode
> +             (fboundp #'scroll-bar-mode))

In which circumstance could `scroll-bar-mode` not be defined?

> +    (scroll-bar-mode -1)             ;; small border without scroll bar
> +    (setq-default scroll-bar-mode -1))

According to its doc, the `scroll-bar-mode` variable can take values
`nil`, `left`, and `right`.  What do you intend to get by setting it to -1?


        Stefan




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

* Re: [elpa] externals/brief 362d629671: Brief mode v5.88.22 release for various enhancements and bug fixes
  2023-01-30  2:50   ` [elpa] externals/brief 362d629671: Brief mode v5.88.22 release for various enhancements and bug fixes Stefan Monnier
@ 2023-01-30  3:01     ` Stefan Monnier
  2023-01-30 16:53       ` 路客
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2023-01-30  3:01 UTC (permalink / raw)
  To: Luke Lee; +Cc: emacs-devel

[ Resending with a better email address.  ]

>  (eval-when-compile
> -  (require 'cl-lib)
> +  (if (version< emacs-version "27.0")
> +      (progn
> +        (require 'cl) ;; Package cl is deprecated for Emacs27+
> +        (require 'cl-macs))
> +    (require 'cl-lib))

This looks like a regression resulting from a misunderstanding.
What are you trying to do here?

The rest of the code uses only `cl-lib` functionality, so (require 'cl)
will be useful only if it internally does (require 'cl-lib).
In Emacs<24.3, this will fail because (require 'cl) will not define the
macros that the rest of the code needs (e.g. `cl-eval-when`, `cl-loop`, ...).


        Stefan




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

* Re: [elpa] externals/brief 362d629671: Brief mode v5.88.22 release for various enhancements and bug fixes
  2023-01-30  3:01     ` Stefan Monnier
@ 2023-01-30 16:53       ` 路客
  0 siblings, 0 replies; 7+ messages in thread
From: 路客 @ 2023-01-30 16:53 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

Thanks for spotting this.  Yes you are right.  My local branch
was very different from the one on ELPA and it did not use
nadvice package.  Recently I merged ELPA version back and the
code segment you highlighted was quite old and I don't even
remember what it's for, probably a transition code during the
period of transition from `xxx' to `cl-xxx' ...

I've fixed it along with an issue found on the Windows version
-- I just found that the Windows version is a convenient tool to
help me test old Emacs versions like Emacs 24.2.
Thanks.




On Mon, 30 Jan 2023 at 11:01, Stefan Monnier <monnier@iro.umontreal.ca>
wrote:

> [ Resending with a better email address.  ]
>
> >  (eval-when-compile
> > -  (require 'cl-lib)
> > +  (if (version< emacs-version "27.0")
> > +      (progn
> > +        (require 'cl) ;; Package cl is deprecated for Emacs27+
> > +        (require 'cl-macs))
> > +    (require 'cl-lib))
>
> This looks like a regression resulting from a misunderstanding.
> What are you trying to do here?
>
> The rest of the code uses only `cl-lib` functionality, so (require 'cl)
> will be useful only if it internally does (require 'cl-lib).
> In Emacs<24.3, this will fail because (require 'cl) will not define the
> macros that the rest of the code needs (e.g. `cl-eval-when`, `cl-loop`,
> ...).
>
>
>         Stefan
>
>

-- 
Best regards,
Luke Lee

[-- Attachment #2: Type: text/html, Size: 2007 bytes --]

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

* Re: [elpa] externals/brief 362d629671: Brief mode v5.88.22 release for various enhancements and bug fixes
  2023-01-30  2:58   ` Stefan Monnier
@ 2023-01-30 17:07     ` 路客
  2023-01-30 17:15       ` Stefan Monnier
  2023-01-31 15:12     ` 路客
  1 sibling, 1 reply; 7+ messages in thread
From: 路客 @ 2023-01-30 17:07 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

Sorry that I missed this email.  About the `scroll-bar-mode', I was just
trying to disable it.
Is there another way to disable it?
Thanks.


On Mon, 30 Jan 2023 at 10:58, Stefan Monnier <monnier@iro.umontreal.ca>
wrote:

> > branch: externals/brief
> > commit 362d6296717af611be20cb56592d495c01ea7a00
> > Author: Luke Lee <luke@gauss>
> > Commit: Luke Lee <luke@gauss>
>
> Please try and use a valid email as commit identifier.
>
> > @@ -457,8 +461,9 @@
> >  ;; backward compatibility issues.
> >  ;;(require 'replace)
> >
> > -(defconst brief-version "5.87"
> > -  "The version of this Brief emulator.")
> > +;;;###autoload
> > +(defconst brief-version "5.88.22"
> > +  "Current version of this Brief editor mode/emulator.")
>
> Why autoload?
>
> > -           (not (fboundp 'save-mark-and-excursion)))
> > +           (not (fboundp #'save-mark-and-excursion)))
>
> The arg to `fboundp` is a symbol not a function (e.g. it can't be
> a (lambda ...) for example), so I think #' is ill-advised.
> It works fine, in practice, so it's somewhat of a philosophical issue.
>
> > +  (when (and (version<= "27.0" emacs-version)
>
> I understand efficiency is not a major issue here, but
>
>     (<= 27 emacs-major-version)
>
> works just as well :-)
>
> > -  (scroll-bar-mode -1)             ;; small border without scroll bar
> > +  (when (and brief-turn-off-scroll-bar-mode
> > +             (fboundp #'scroll-bar-mode))
>
> In which circumstance could `scroll-bar-mode` not be defined?
>
> > +    (scroll-bar-mode -1)             ;; small border without scroll bar
> > +    (setq-default scroll-bar-mode -1))
>
> According to its doc, the `scroll-bar-mode` variable can take values
> `nil`, `left`, and `right`.  What do you intend to get by setting it to -1?
>
>
>         Stefan
>
>

-- 
Best regards,
Luke Lee

[-- Attachment #2: Type: text/html, Size: 2617 bytes --]

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

* Re: [elpa] externals/brief 362d629671: Brief mode v5.88.22 release for various enhancements and bug fixes
  2023-01-30 17:07     ` 路客
@ 2023-01-30 17:15       ` Stefan Monnier
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2023-01-30 17:15 UTC (permalink / raw)
  To: 路客; +Cc: emacs-devel

>> > -  (scroll-bar-mode -1)             ;; small border without scroll bar
>> > +  (when (and brief-turn-off-scroll-bar-mode
>> > +             (fboundp #'scroll-bar-mode))
>>
>> In which circumstance could `scroll-bar-mode` not be defined?
>>
>> > +    (scroll-bar-mode -1)             ;; small border without scroll bar
>> > +    (setq-default scroll-bar-mode -1))
>>
>> According to its doc, the `scroll-bar-mode` variable can take values
>> `nil`, `left`, and `right`.  What do you intend to get by setting it to -1?
>
> About the `scroll-bar-mode', I was just trying to disable it.
> Is there another way to disable it?

Doesn't (scroll-bar-mode -1) do that already?


        Stefan




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

* Re: [elpa] externals/brief 362d629671: Brief mode v5.88.22 release for various enhancements and bug fixes
  2023-01-30  2:58   ` Stefan Monnier
  2023-01-30 17:07     ` 路客
@ 2023-01-31 15:12     ` 路客
  1 sibling, 0 replies; 7+ messages in thread
From: 路客 @ 2023-01-31 15:12 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

> The arg to `fboundp` is a symbol not a function (e.g. it can't
> be a (lambda ...) for example)
That's a good point, modification reverted.

> (<= 27 emacs-major-version)
Nice, modified likewise.

> Doesn't (scroll-bar-mode -1) do that already?
You're right, corrected as well as some others.
Thanks!

On Mon, 30 Jan 2023 at 10:58, Stefan Monnier <monnier@iro.umontreal.ca>
wrote:

> > branch: externals/brief
> > commit 362d6296717af611be20cb56592d495c01ea7a00
> > Author: Luke Lee <luke@gauss>
> > Commit: Luke Lee <luke@gauss>
>
> Please try and use a valid email as commit identifier.
>
> > @@ -457,8 +461,9 @@
> >  ;; backward compatibility issues.
> >  ;;(require 'replace)
> >
> > -(defconst brief-version "5.87"
> > -  "The version of this Brief emulator.")
> > +;;;###autoload
> > +(defconst brief-version "5.88.22"
> > +  "Current version of this Brief editor mode/emulator.")
>
> Why autoload?
>
> > -           (not (fboundp 'save-mark-and-excursion)))
> > +           (not (fboundp #'save-mark-and-excursion)))
>
> The arg to `fboundp` is a symbol not a function (e.g. it can't be
> a (lambda ...) for example), so I think #' is ill-advised.
> It works fine, in practice, so it's somewhat of a philosophical issue.
>
> > +  (when (and (version<= "27.0" emacs-version)
>
> I understand efficiency is not a major issue here, but
>
>     (<= 27 emacs-major-version)
>
> works just as well :-)
>
> > -  (scroll-bar-mode -1)             ;; small border without scroll bar
> > +  (when (and brief-turn-off-scroll-bar-mode
> > +             (fboundp #'scroll-bar-mode))
>
> In which circumstance could `scroll-bar-mode` not be defined?
>
> > +    (scroll-bar-mode -1)             ;; small border without scroll bar
> > +    (setq-default scroll-bar-mode -1))
>
> According to its doc, the `scroll-bar-mode` variable can take values
> `nil`, `left`, and `right`.  What do you intend to get by setting it to -1?
>
>
>         Stefan
>
>

-- 
Best regards,
Luke Lee

[-- Attachment #2: Type: text/html, Size: 2823 bytes --]

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

end of thread, other threads:[~2023-01-31 15:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <167500933323.27282.16366310039274039148@vcs2.savannah.gnu.org>
     [not found] ` <20230129162214.20BBEC0019D@vcs2.savannah.gnu.org>
2023-01-30  2:50   ` [elpa] externals/brief 362d629671: Brief mode v5.88.22 release for various enhancements and bug fixes Stefan Monnier
2023-01-30  3:01     ` Stefan Monnier
2023-01-30 16:53       ` 路客
2023-01-30  2:58   ` Stefan Monnier
2023-01-30 17:07     ` 路客
2023-01-30 17:15       ` Stefan Monnier
2023-01-31 15:12     ` 路客

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.