* bug#15485: add-abbrev: don't use hard-coded forward-word
@ 2013-09-29 15:40 Andreas Röhler
2019-08-15 3:29 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Röhler @ 2013-09-29 15:40 UTC (permalink / raw)
To: 15485
add-abbrev uses forward-word to catch the expansion, which isn't good for programming code.
See
http://stackoverflow.com/questions/19073674/how-can-i-add-my-personal-abbreviation-to-emmet-mode-in-emacs/19079683#19079683
Suggest to use forward-symbol instead, or still better to make if customizable:
(funcall add-abbrev-move-function
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#15485: add-abbrev: don't use hard-coded forward-word
2013-09-29 15:40 bug#15485: add-abbrev: don't use hard-coded forward-word Andreas Röhler
@ 2019-08-15 3:29 ` Lars Ingebrigtsen
2019-08-15 12:41 ` Mauro Aranda
0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2019-08-15 3:29 UTC (permalink / raw)
To: Andreas Röhler; +Cc: 15485
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
> add-abbrev uses forward-word to catch the expansion, which isn't good
> for programming code.
>
> See
>
> http://stackoverflow.com/questions/19073674/how-can-i-add-my-personal-abbreviation-to-emmet-mode-in-emacs/19079683#19079683
>
> Suggest to use forward-symbol instead, or still better to make if customizable:
(I'm going through old bug reports that have unfortunately gotten no
responses yet.)
`add-abbrev' doesn't have a doc string itself, but as all the in-tree
callers of this function says:
---
Don't use this function in a Lisp program; use `define-abbrev' instead.
---
So you probably shouldn't use this programmatically, either.
However, it's possible that the `forward-word' should perhaps be
changed, but on the other hand, abbrev.el will probably be deprecated
any year now in favour of nabbrev.el, so I don't think it's a good idea
to change anything here, and I'm closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#15485: add-abbrev: don't use hard-coded forward-word
2019-08-15 3:29 ` Lars Ingebrigtsen
@ 2019-08-15 12:41 ` Mauro Aranda
2019-08-15 14:37 ` Andreas Röhler
2019-08-15 23:50 ` Lars Ingebrigtsen
0 siblings, 2 replies; 5+ messages in thread
From: Mauro Aranda @ 2019-08-15 12:41 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 15485
[-- Attachment #1: Type: text/plain, Size: 1520 bytes --]
Hello Lars.
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>
>> add-abbrev uses forward-word to catch the expansion, which isn't good
>> for programming code.
>>
>> See
>>
>>
http://stackoverflow.com/questions/19073674/how-can-i-add-my-personal-abbreviation-to-emmet-mode-in-emacs/19079683#19079683
>>
>> Suggest to use forward-symbol instead, or still better to make if
customizable:
>
> `add-abbrev' doesn't have a doc string itself, but as all the in-tree
> callers of this function says:
>
> ---
> Don't use this function in a Lisp program; use `define-abbrev' instead.
> ---
>
> So you probably shouldn't use this programmatically, either.
I don't think the OP wanted to use `add-abbrev' in a Lisp program. What
I understand is that the problem reported arises when someone wants to
add an abbrev for a programming construct (in the example: "<?php ?>")
it is likely that `add-abbrev' won't give the entire desired
expansion.
With that being said, at least in current Emacs it is easy to add that
abbrev, by setting the mark and point properly and calling
`add-mode-abbrev' with a 0 prefix argument.
> However, it's possible that the `forward-word' should perhaps be
> changed, but on the other hand, abbrev.el will probably be deprecated
> any year now in favour of nabbrev.el, so I don't think it's a good idea
What is nabbrev.el? I did a search in what I believe are usual places,
but didn't found anything.
[-- Attachment #2: Type: text/html, Size: 2026 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#15485: add-abbrev: don't use hard-coded forward-word
2019-08-15 12:41 ` Mauro Aranda
@ 2019-08-15 14:37 ` Andreas Röhler
2019-08-15 23:50 ` Lars Ingebrigtsen
1 sibling, 0 replies; 5+ messages in thread
From: Andreas Röhler @ 2019-08-15 14:37 UTC (permalink / raw)
To: Mauro Aranda, Lars Ingebrigtsen; +Cc: 15485
[-- Attachment #1: Type: text/plain, Size: 1943 bytes --]
Hi all,
On 15.08.19 14:41, Mauro Aranda wrote:
> Hello Lars.
>
> Lars Ingebrigtsen <larsi@gnus.org <mailto:larsi@gnus.org>> writes:
>
> > Andreas Röhler <andreas.roehler@easy-emacs.de
> <mailto:andreas.roehler@easy-emacs.de>> writes:
> >
> >> add-abbrev uses forward-word to catch the expansion, which isn't good
> >> for programming code.
> >>
> >> See
> >>
> >>
> http://stackoverflow.com/questions/19073674/how-can-i-add-my-personal-abbreviation-to-emmet-mode-in-emacs/19079683#19079683
> >>
> >> Suggest to use forward-symbol instead, or still better to make if
> customizable:
> >
> > `add-abbrev' doesn't have a doc string itself, but as all the in-tree
> > callers of this function says:
> >
> > ---
> > Don't use this function in a Lisp program; use `define-abbrev' instead.
> > ---
> >
> > So you probably shouldn't use this programmatically, either.
>
> I don't think the OP wanted to use `add-abbrev' in a Lisp program. What
> I understand is that the problem reported arises when someone wants to
> add an abbrev for a programming construct (in the example: "<?php ?>")
> it is likely that `add-abbrev' won't give the entire desired
> expansion.
>
> With that being said, at least in current Emacs it is easy to add that
> abbrev, by setting the mark and point properly and calling
> `add-mode-abbrev' with a 0 prefix argument.
>
> > However, it's possible that the `forward-word' should perhaps be
> > changed, but on the other hand, abbrev.el will probably be deprecated
> > any year now in favour of nabbrev.el, so I don't think it's a good idea
>
> What is nabbrev.el? I did a search in what I believe are usual places,
> but didn't found anything.
The idea was to get rid of the restriction only word-syntax chars might
compose an abbreviation.
After all, when playing with a patched Emacs allowing all chars, it
turned out word-chars are much more easy to type, so didn't use
symbol-composed abbrevs finally.
[-- Attachment #2: Type: text/html, Size: 3334 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#15485: add-abbrev: don't use hard-coded forward-word
2019-08-15 12:41 ` Mauro Aranda
2019-08-15 14:37 ` Andreas Röhler
@ 2019-08-15 23:50 ` Lars Ingebrigtsen
1 sibling, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2019-08-15 23:50 UTC (permalink / raw)
To: Mauro Aranda; +Cc: 15485
Mauro Aranda <maurooaranda@gmail.com> writes:
> I don't think the OP wanted to use `add-abbrev' in a Lisp program. What
> I understand is that the problem reported arises when someone wants to
> add an abbrev for a programming construct (in the example: "<?php ?>")
> it is likely that `add-abbrev' won't give the entire desired
> expansion.
>
> With that being said, at least in current Emacs it is easy to add that
> abbrev, by setting the mark and point properly and calling
> `add-mode-abbrev' with a 0 prefix argument.
Ah, I see.
>> However, it's possible that the `forward-word' should perhaps be
>> changed, but on the other hand, abbrev.el will probably be deprecated
>> any year now in favour of nabbrev.el, so I don't think it's a good idea
>
> What is nabbrev.el? I did a search in what I believe are usual places,
> but didn't found anything.
Sorry, I was completely confused. Somehow I was thinking about
advice.el/nadvice.el here. :-/
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-08-15 23:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-29 15:40 bug#15485: add-abbrev: don't use hard-coded forward-word Andreas Röhler
2019-08-15 3:29 ` Lars Ingebrigtsen
2019-08-15 12:41 ` Mauro Aranda
2019-08-15 14:37 ` Andreas Röhler
2019-08-15 23:50 ` Lars Ingebrigtsen
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.