[–] swah 15y ago ↗ Isn't it dangerous to change that function if some other command/library depends on the original behavior?Why don't you just write my-zap-to-char like everyone else? :) [–] rawsyntax 15y ago ↗ It's a risk yes, but I've been using it this way for about a year and encountered no problems.I'm thinking of TIMTOWTDI, and that perhaps many people don't know about defadvice. [–] swah 15y ago ↗ I also love hooks. [–] gwern 15y ago ↗ It is dangerous in theory, yeah. Much less so if you're a package like https://secure.wikimedia.org/wikipedia/en/wiki/Emacspeak which, while almost entirely defadvice from what I've heard, doesn't modify any existing state. [–] kragen 15y ago ↗ It's a little dangerous, but Emacs users have been making numbered backups automatically since before there was RCS. Since before there was GNU Emacs actually. [–] lelele 15y ago ↗ It is dangerous only if you change the function's interface. [–] swah 15y ago ↗ Why? Its not like its a pure function. The change puts Emacs in a different state than with the original behavior...
[–] rawsyntax 15y ago ↗ It's a risk yes, but I've been using it this way for about a year and encountered no problems.I'm thinking of TIMTOWTDI, and that perhaps many people don't know about defadvice. [–] swah 15y ago ↗ I also love hooks.
[–] gwern 15y ago ↗ It is dangerous in theory, yeah. Much less so if you're a package like https://secure.wikimedia.org/wikipedia/en/wiki/Emacspeak which, while almost entirely defadvice from what I've heard, doesn't modify any existing state.
[–] kragen 15y ago ↗ It's a little dangerous, but Emacs users have been making numbered backups automatically since before there was RCS. Since before there was GNU Emacs actually.
[–] lelele 15y ago ↗ It is dangerous only if you change the function's interface. [–] swah 15y ago ↗ Why? Its not like its a pure function. The change puts Emacs in a different state than with the original behavior...
[–] swah 15y ago ↗ Why? Its not like its a pure function. The change puts Emacs in a different state than with the original behavior...
7 comments
[ 3.1 ms ] story [ 19.1 ms ] threadWhy don't you just write my-zap-to-char like everyone else? :)
I'm thinking of TIMTOWTDI, and that perhaps many people don't know about defadvice.