all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Removal of syntax-ppss-last
@ 2017-10-02 15:02 John Wiegley
  2017-10-02 17:04 ` Alan Mackenzie
  0 siblings, 1 reply; 5+ messages in thread
From: John Wiegley @ 2017-10-02 15:02 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: emacs-devel

Hi Dmitry,

In commit 827db6b559100153fd7dcab1ecdabd9233e906ab you removed the function
syntax-ppss-last. There are version of haskell-mode in the wild (such as the
one I'm using) which depend on this function. Is there a reason you had to
remove it entirely, or was that just code cleanup? I ask because this might
break other people, so I want to ensure it's a needed removal.

Thanks,
-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2



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

* Re: Removal of syntax-ppss-last
  2017-10-02 15:02 Removal of syntax-ppss-last John Wiegley
@ 2017-10-02 17:04 ` Alan Mackenzie
  2017-10-02 20:02   ` John Wiegley
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Mackenzie @ 2017-10-02 17:04 UTC (permalink / raw)
  To: emacs-devel; +Cc: Dmitry Gutov

Hello, John.

On Mon, Oct 02, 2017 at 11:02:10 -0400, John Wiegley wrote:
> Hi Dmitry,

I'm not Dmitry, but I was involved in the making of this patch.

> In commit 827db6b559100153fd7dcab1ecdabd9233e906ab you removed the
> function syntax-ppss-last.

There doesn't seems to be a function of that name in Emacs 25.3.  Do you
mean the _variable_ syntax-ppss-last?

> There are version of haskell-mode in the wild (such as the one I'm
> using) which depend on this function. Is there a reason you had to
> remove it entirely, or was that just code cleanup?

It was mainly code cleanup, I think.

> I ask because this might break other people, so I want to ensure it's
> a needed removal.

syntax-ppss-last was intended as an internal variable in syntax.el.  Why
was haskell-mode using it?  (If indeed it was).

> Thanks,
> -- 
> John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
> http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2

-- 
Alan Mackenzie (Nuremberg, Germany).



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

* Re: Removal of syntax-ppss-last
  2017-10-02 17:04 ` Alan Mackenzie
@ 2017-10-02 20:02   ` John Wiegley
  2017-10-03  0:48     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: John Wiegley @ 2017-10-02 20:02 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: Dmitry Gutov, emacs-devel

>>>>> "AM" == Alan Mackenzie <acm@muc.de> writes:

AM> syntax-ppss-last was intended as an internal variable in syntax.el. Why
AM> was haskell-mode using it? (If indeed it was).

Apologies for the vagueness, I'm traveling at the moment and didn't dig into
this enough fully.

Here's the function that raised the error:

(defun haskell-indentation-find-indentations ()
  (let ((ppss (syntax-ppss)))
    (cond
     ((nth 3 ppss)
      (haskell-indentation-first-indentation))
     ((nth 4 ppss)
      (if (save-excursion
            (and (skip-syntax-forward "-")
                 (eolp)
                 (not (> (forward-line 1) 0))
                 (not (nth 4 (syntax-ppss)))))
          (haskell-indentation-parse-to-indentations)
        (haskell-indentation-first-indentation)))
     (t
      (haskell-indentation-parse-to-indentations)))))

So it would seem that the byte-compiled file is referencing the variable. When
I re-evaluate the file this definition is contained in, the error goes away.

Unfortunate, but easily solved. And I don't believe we guarantee .elc
compatibility between major releases.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2



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

* Re: Removal of syntax-ppss-last
  2017-10-02 20:02   ` John Wiegley
@ 2017-10-03  0:48     ` Stefan Monnier
  2017-10-03 21:19       ` John Wiegley
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2017-10-03  0:48 UTC (permalink / raw)
  To: emacs-devel

> Unfortunate, but easily solved. And I don't believe we guarantee .elc
> compatibility between major releases.

We try to preserve backward compatibility of .elc files.
But I wonder why your code:

    (defun haskell-indentation-find-indentations ()
      (let ((ppss (syntax-ppss)))
        (cond
         ((nth 3 ppss)
          (haskell-indentation-first-indentation))
         ((nth 4 ppss)
          (if (save-excursion
                (and (skip-syntax-forward "-")
                     (eolp)
                     (not (> (forward-line 1) 0))
                     (not (nth 4 (syntax-ppss)))))
              (haskell-indentation-parse-to-indentations)
            (haskell-indentation-first-indentation)))
         (t
          (haskell-indentation-parse-to-indentations)))))

would contain syntax-ppss-last in the .elc since syntax-ppss is not
defined as defsubst or other such inlinable code.

Can you try to look more closely at where this syntax-ppss-last comes
from (maybe by disassembling the function)?


        Stefan




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

* Re: Removal of syntax-ppss-last
  2017-10-03  0:48     ` Stefan Monnier
@ 2017-10-03 21:19       ` John Wiegley
  0 siblings, 0 replies; 5+ messages in thread
From: John Wiegley @ 2017-10-03 21:19 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

SM> Can you try to look more closely at where this syntax-ppss-last comes from
SM> (maybe by disassembling the function)?

I'd be happy to, but it will have to wait until I am back home next week.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2



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

end of thread, other threads:[~2017-10-03 21:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-02 15:02 Removal of syntax-ppss-last John Wiegley
2017-10-02 17:04 ` Alan Mackenzie
2017-10-02 20:02   ` John Wiegley
2017-10-03  0:48     ` Stefan Monnier
2017-10-03 21:19       ` John Wiegley

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.