unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [nongnu] elpa/scala-mode c2a4f58643 1/2: Revert "scala-mode-indent.el: remove unused arg from `goto-block-anchor`"
       [not found] ` <20241231000431.DB05AE2FE49@vcs3.savannah.gnu.org>
@ 2024-12-31  0:08   ` Stefan Monnier
  2025-01-02 18:11     ` Konstantin Kharlamov
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2024-12-31  0:08 UTC (permalink / raw)
  To: Konstantin Kharlamov; +Cc: emacs-devel

> branch: elpa/scala-mode
> commit c2a4f58643eb505f38c8e341a29400e79f47f442
> Author: Konstantin Kharlamov <Hi-Angel@yandex.ru>
> Commit: Konstantin Kharlamov <Hi-Angel@yandex.ru>
>
>     Revert "scala-mode-indent.el: remove unused arg from `goto-block-anchor`"
[...]
> @@ -583,7 +583,7 @@ keyword, or nil if not."
>  ;;; Block
>  ;;;
>  
> -(defun scala-indent:goto-block-anchor ()
> +(defun scala-indent:goto-block-anchor (&optional point)
>    "Moves back to the point whose column will be used as the
>  anchor for calculating block indent for current point (or point
>  `point'). Returns point or (point-min) if not inside a block."

If the argument is unused, then you should rename it to `_point` which
(by convention) says explicitly that this arg is not used.


        Stefan




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

* Re: [nongnu] elpa/scala-mode c2a4f58643 1/2: Revert "scala-mode-indent.el: remove unused arg from `goto-block-anchor`"
  2024-12-31  0:08   ` [nongnu] elpa/scala-mode c2a4f58643 1/2: Revert "scala-mode-indent.el: remove unused arg from `goto-block-anchor`" Stefan Monnier
@ 2025-01-02 18:11     ` Konstantin Kharlamov
  2025-01-02 19:12       ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Konstantin Kharlamov @ 2025-01-02 18:11 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On Mon, 2024-12-30 at 19:08 -0500, Stefan Monnier wrote:
> > branch: elpa/scala-mode
> > commit c2a4f58643eb505f38c8e341a29400e79f47f442
> > Author: Konstantin Kharlamov <Hi-Angel@yandex.ru>
> > Commit: Konstantin Kharlamov <Hi-Angel@yandex.ru>
> > 
> >     Revert "scala-mode-indent.el: remove unused arg from `goto-
> > block-anchor`"
> [...]
> > @@ -583,7 +583,7 @@ keyword, or nil if not."
> >  ;;; Block
> >  ;;;
> >  
> > -(defun scala-indent:goto-block-anchor ()
> > +(defun scala-indent:goto-block-anchor (&optional point)
> >    "Moves back to the point whose column will be used as the
> >  anchor for calculating block indent for current point (or point
> >  `point'). Returns point or (point-min) if not inside a block."
> 
> If the argument is unused, then you should rename it to `_point`
> which
> (by convention) says explicitly that this arg is not used.

Oh, thank you! The reason I didn't do this is because when I tried
prefixing an optional param with underscore in some other instance, I
was getting parsing error. However, I can't reproduce it anymore, and
now that I'm trying to, I suspect it wasn't because of the underscore,
but rather because the make file in scala-mode sometimes prints `End of
file during parsing`, which I attributed to Emacs byte-compiler. The
Makefile is very poorly written (it also lacks some `.el` files and it
has broken rebuilds because it saves `.latest-build` file for some
reason and disregards the el vs elc files timestamps), so… yeah, I just
got confused.



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

* Re: [nongnu] elpa/scala-mode c2a4f58643 1/2: Revert "scala-mode-indent.el: remove unused arg from `goto-block-anchor`"
  2025-01-02 18:11     ` Konstantin Kharlamov
@ 2025-01-02 19:12       ` Stefan Monnier
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2025-01-02 19:12 UTC (permalink / raw)
  To: Konstantin Kharlamov; +Cc: emacs-devel

> Oh, thank you! The reason I didn't do this is because when I tried
> prefixing an optional param with underscore in some other instance, I
> was getting parsing error. However, I can't reproduce it anymore, and
> now that I'm trying to, I suspect it wasn't because of the underscore,
> but rather because the make file in scala-mode sometimes prints `End of
> file during parsing`, which I attributed to Emacs byte-compiler. The
> Makefile is very poorly written (it also lacks some `.el` files and it
> has broken rebuilds because it saves `.latest-build` file for some
> reason and disregards the el vs elc files timestamps), so… yeah, I just
> got confused.

Programming is all about dealing with confusion!  🙂


        Stefan




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

end of thread, other threads:[~2025-01-02 19:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <173560347147.2633946.7946382225330277437@vcs3.savannah.gnu.org>
     [not found] ` <20241231000431.DB05AE2FE49@vcs3.savannah.gnu.org>
2024-12-31  0:08   ` [nongnu] elpa/scala-mode c2a4f58643 1/2: Revert "scala-mode-indent.el: remove unused arg from `goto-block-anchor`" Stefan Monnier
2025-01-02 18:11     ` Konstantin Kharlamov
2025-01-02 19:12       ` Stefan Monnier

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