all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Revert Emacs to version supporting cedet backticks?
       [not found] <mailman.19.1292896532.3394.help-gnu-emacs@gnu.org>
@ 2010-12-21  5:20 ` Jason Earl
  2010-12-21 16:31   ` Tassilo Horn
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Earl @ 2010-12-21  5:20 UTC (permalink / raw)
  To: help-gnu-emacs

On Mon, Dec 20 2010, Bill O'Connor wrote:

> I see that the Emacs trunk won't allow the old backticks to compile
> anymore, does anyone know what tag I could revert to so I can use
> cedet?  I promise I won't write any elisp with backticks from now on.
> :)

bzr Emacs actually includes a fairly new version of CEDET.  Does the
upstream version of CEDET use backticks?

Jason


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

* Re: Revert Emacs to version supporting cedet backticks?
  2010-12-21  5:20 ` Revert Emacs to version supporting cedet backticks? Jason Earl
@ 2010-12-21 16:31   ` Tassilo Horn
  2010-12-24 14:06     ` how to replace old-style backquotes (was: Re: Revert Emacs to version supporting cedet backticks?) Gregor Zattler
  0 siblings, 1 reply; 5+ messages in thread
From: Tassilo Horn @ 2010-12-21 16:31 UTC (permalink / raw)
  To: help-gnu-emacs

Jason Earl <jearl@notengoamigos.org> writes:

Hi Jason,

>> I see that the Emacs trunk won't allow the old backticks to compile
>> anymore, does anyone know what tag I could revert to so I can use
>> cedet?  I promise I won't write any elisp with backticks from now on.
>> :)
>
> bzr Emacs actually includes a fairly new version of CEDET.  Does the
> upstream version of CEDET use backticks?

I don't think backticks are a problem, but only the old-style stuff
deprecated for more than a decade had a bug in the current emacs bzr
HEAD.

  `(foo ,tab-width) ;; new style. ok!
    ==> (foo 2)

  (` (foo (, tab-width))) ;; old style. had a bug, but works for me...
    ==> (foo 2)

I use a very recent Emacs version, so it seems that the bug is already
fixed.

But it's still a very good idea to replace the old-style
backquotes/backticks.

Bye,
Tassilo




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

* how to replace old-style backquotes (was: Re: Revert Emacs to version supporting cedet backticks?)
  2010-12-21 16:31   ` Tassilo Horn
@ 2010-12-24 14:06     ` Gregor Zattler
  2010-12-25 21:59       ` how to replace old-style backquotes Tassilo Horn
       [not found]       ` <mailman.10.1293314405.24913.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Gregor Zattler @ 2010-12-24 14:06 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: help-gnu-emacs

Hi Tassilo,
* Tassilo Horn <tassilo@member.fsf.org> [21. Dec. 2010]:
> I don't think backticks are a problem, but only the old-style stuff
> deprecated for more than a decade had a bug in the current emacs bzr
> HEAD.
> 
>   `(foo ,tab-width) ;; new style. ok!
>     ==> (foo 2)
> 
>   (` (foo (, tab-width))) ;; old style. had a bug, but works for me...
>     ==> (foo 2)
> 
> I use a very recent Emacs version, so it seems that the bug is already
> fixed.
> 
> But it's still a very good idea to replace the old-style
> backquotes/backticks.

I have no clue about elisp but want to replace old-style with
new-style backquotes in old code I use.

Can this reliable be done by shortening every occurrence of 
(¸ like this:

  "(` ...)"  --> "`..."

and every comma-marked item like this:

  "(, ...)"  --> ",..."

or

  "(,@ ...)" --> ",@..."

?  If so the replacement could be done efficiently via a set of
Emacs macros (or elisp which I'm not capable of writing).

Or is it more complex than that?  E.g. does it matter how these
are nested or does the correct replacement depend on the actual
code (here represented as three dots)?


Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-



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

* Re: how to replace old-style backquotes
  2010-12-24 14:06     ` how to replace old-style backquotes (was: Re: Revert Emacs to version supporting cedet backticks?) Gregor Zattler
@ 2010-12-25 21:59       ` Tassilo Horn
       [not found]       ` <mailman.10.1293314405.24913.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Tassilo Horn @ 2010-12-25 21:59 UTC (permalink / raw)
  To: help-gnu-emacs

Gregor Zattler <telegraph@gmx.net> writes:

Hi Gregor,

> I have no clue about elisp but want to replace old-style with
> new-style backquotes in old code I use.
>
> Can this reliable be done by shortening every occurrence of 
> (¸ like this:
>
>   "(` ...)"  --> "`..."
>
> and every comma-marked item like this:
>
>   "(, ...)"  --> ",..."
>
> or
>
>   "(,@ ...)" --> ",@..."
>
> ?

Hm, well, I think, yes.  But don't complain at me if there is some
corner case where that simple rule is not correct.

> If so the replacement could be done efficiently via a set of Emacs
> macros (or elisp which I'm not capable of writing).

I think, especially with paredit.el, it should be quite easy to produce
a keyboard macro for doing that.

> Or is it more complex than that?  E.g. does it matter how these are
> nested

Well, yes.  Commas are only to be replaced in backquoted forms, but
since that's the only use anyway...

> or does the correct replacement depend on the actual code (here
> represented as three dots)?

Nope, it's purely syntactical.

Bye,
Tassilo




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

* Re: how to replace old-style backquotes
       [not found]       ` <mailman.10.1293314405.24913.help-gnu-emacs@gnu.org>
@ 2010-12-28  2:32         ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2010-12-28  2:32 UTC (permalink / raw)
  To: help-gnu-emacs

>> "(` ...)"  --> "`..."
>> "(, ...)"  --> ",..."
>> "(,@ ...)" --> ",@..."
> Hm, well, I think, yes.  But don't complain at me if there is some
> corner case where that simple rule is not correct.

That's right.  Another way to solve this is to use neither old- nor
new-style and simply use explicit symbol names.  I.e. add backslash
before each comma and backquote:

   (` ...)   -->  (\` ...)
   (, ...)   -->  (\, ...)
   (,@ ...)  -->  (\,@ ...)

>> Or is it more complex than that?  E.g. does it matter how these are
>> nested
> Well, yes.  Commas are only to be replaced in backquoted forms, but
> since that's the only use anyway...

Actually, while commas are usually only used within backquotes, the `
and , special syntax can also be used for other things than the
backquote macro.


        Stefan


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

end of thread, other threads:[~2010-12-28  2:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.19.1292896532.3394.help-gnu-emacs@gnu.org>
2010-12-21  5:20 ` Revert Emacs to version supporting cedet backticks? Jason Earl
2010-12-21 16:31   ` Tassilo Horn
2010-12-24 14:06     ` how to replace old-style backquotes (was: Re: Revert Emacs to version supporting cedet backticks?) Gregor Zattler
2010-12-25 21:59       ` how to replace old-style backquotes Tassilo Horn
     [not found]       ` <mailman.10.1293314405.24913.help-gnu-emacs@gnu.org>
2010-12-28  2:32         ` Stefan Monnier

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.