I must be getting old
A little earlier this evening I got a new issue raised against boxquote.el. Apparently Emacs 29 (I'm running 28.1 as of the time of writing) is moaning about the likes of:
(setf (point) some-location-or-other)
and
(setf (buffer-string) "")
There's a whole background to why I've tended to code like that, that stems from enjoying Common Lisp, my days reading (and sometimes posting to) comp.lang.lisp, and I think some of the stuff Erik Naggum wrote back in the day. I won't get into it all now; I'm not sure I can even remember a lot of how I got there given how far back it was.
But...
Wanting to quickly get to the bottom of why the above was suddenly an issue, I dived into the NEWS file and found the following:
** Many seldom-used generalized variables have been made obsolete.
Emacs has a number of rather obscure generalized variables defined,
that, for instance, allowed you to say things like:
(setf (point-min) 4)
These never caught on and have been made obsolete. The form above,
for instance, is the same as saying
(narrow-to-region 4 (point-max))
The following generalized variables have been made obsolete:
'buffer-file-name', 'buffer-local-value', 'buffer-modified-p',
'buffer-name', 'buffer-string', 'buffer-substring', 'current-buffer',
'current-column', 'current-global-map', 'current-input-mode',
'current-local-map', 'current-window-configuration',
'default-file-modes', 'documentation-property', 'frame-height',
'frame-visible-p', 'global-key-binding', 'local-key-binding', 'mark',
'mark-marker', 'marker-position', 'mouse-position', 'point',
'point-marker', 'point-max', 'point-min', 'read-mouse-position',
'screen-height', 'screen-width', 'selected-frame', 'selected-screen',
'selected-window', 'standard-case-table', 'syntax-table',
'visited-file-modtime', 'window-height', 'window-width', and
'x-get-secondary-selection'.
As suggested above... this is my thing, this is how I coded some Elisp stuff. Look through much of my Emacs Lisp code and you'll find me setfing stuff all over the place.
Apparently my style is "obscure". Actually, I'm kinda okay with that if I'm honest.
This is going to be a bit of a pain in the arse; I'm going to have to go through a whole bunch of code and make it "less obscure", at some point.
But...
This isn't the part that had me thinking I must be getting old. Oh no. The NEWS file had another little surprise in store:
** The quickurl.el library is now obsolete.
Use 'abbrev', 'skeleton' or 'tempo' instead.
That.... that's me that is. Well, it's one of the me things. If you run about-emacs, dive into Authors, and search for my name, in any copy of GNU Emacs from the last decade or two, you'll find this:
Dave Pearson: wrote 5x5.el quickurl.el
quickurl.el was a package I wrote back in the late 1990s, back when I was a very heavy user of Usenet, and often found myself posting the same URLs in posts again and again; especially in comp.lang.clipper. As a fairly quick hack I wrote the code so that I could very quickly insert often-used URLs.
Some time later, I got an email from the FSF (I actually think it was from RMS -- but that's an mbox I've long ago lost -- or a backup of it might be in storage back in England, on a DVD), asking if I wanted to contribute it to Emacs proper. This seemed like an odd thing to add to Emacs but, sure, why the hell not?
And so I had my second contribution to a body of code I used a lot (the first being 5x5.el -- which itself was my first ever attempt at writing some non-trivial Elisp code).
So... yeah... here we are. I'm now old enough to have written some Emacs Lisp code, had it requested by the FSF for inclusion in Emacs, had it live in there for something like two decades, and then become obsolete!
References & mentions
-
…hat quickurl.el could become part of Emacs itself. I was, of course, delighted to do so. Eventually quickurl.el was declared obsolete and, while it seems to still be shipped with Emacs, it's not documented or easy to discover. In the…
-
I think I'm mostly caught up with the collection of Emacs Lisp packages that need updating and tidying, which means yesterday evening's clean-up should be one of the last (although I would like to revis…
-
…s boring when I was messing with test data. As for this update: it's the usual stuff of cleaning up deprecated uses of setf, mostly. If bioinformatics-related Emacs Lisp code written by a non-bioinformatician is your thing,…
-
…culty to play with. The only changes I've made to it in this release are the usual clean-ups of the deprecated uses of setf, plus I've added q as a binding to the quiz window to quickly quit the quiz. I might have to come b…
-
… engaging in a slow background process of cleaning up some of my Emacs Lisp packages, removing some obsoleted practices, I've given make-phony.el a little bit of attention. As well as dropping the use of setf to set poi…
-
…where I tidy up some of my old Emacs packages. This time I dug out eg.el and cleaned up some of the frowned-upon behaviour. For anyone who doesn't know it: eg.el is one of many Norton Guide readers I've written over the ye…
-
…n Melpa and tidying them up where necessary. The main thing I'll need to address is cutting back on all my old setf ways. I liked that approach to doing things, it made lots of sense and felt elegant; sadly the Emacs mai…
-
…me tidying up my ~/.emacs.d/ and has me thinking I should go back through some of my older code and clean up all that legacy nonsense. There was a time I would have said "grok" here but... well that's spoiled now. ↩ I suppose I could…
Have a comment or query about this post? Feel free to drop me a line about it.