Michael Heerdegen schrieb am Di., 26. Dez. 2017 um 15:39 Uhr: > > Hello, > > Insert into a fresh buffer (e.g. *scratch*): > > #+begin_src emacs-lisp > `(progn > (add-to-list 'rcirc-client-commands ,(concat "/" (symbol-name command))) > (defun ,(intern (concat "rcirc-cmd-" (symbol-name command))) > (,@argument &optional process target) > ,(concat docstring "\n\nNote: If PROCESS or TARGET are nil, the > values given" > "\nby `rcirc-buffer-process' and `rcirc-target' will be > used.") > ,interactive-form > (let ((process (or process (rcirc-buffer-process))) > (target (or target rcirc-target))) > (ignore target) ; mark `target' variable as ignorable > ,@body))) > #+end_src > > (that's the body of the `defun-rcirc-command' macro in rcirc.el). Put > point after the starting backquote character, at the position of the > outermost opening paren. Then (read (current-buffer)) errors with > > | Debugger entered--Lisp error: (error "Loading `nil': old-style > backquotes detected!") > | read(#) > | [...] > > I think raising this error is not justified, as there are no old-style > backquotes there AFAIK. It's somewhat subtle, but if you skip ` there is an oldstyle backquote here. There's a comment in lread.c: Because it's more difficult to peek 2 chars ahead, a new-style ,@ can still not be used outside of a `, unless it's in the middle of a list. That is, in the construct (,@argument the ,@ is oldstyle unless the ` has been read before. > Also, the error message saying loading `nil' > failed is confusing, it took me a while to find out where I tried to > load `nil' (nowhere). > It would be reasonable and easy to remove the "Loading `nil'" part in the case where no file is being loaded. > > Finally, let me say that `read' raising such errors about old-style > backquotes, may it be justified or not, breaks "el-search" which relies > heavily on `read' at diverse buffer positions to succeed. > > That's a bummer. It means that el-search currently relies on an underspecified legacy feature. Could el-search be changed to always include reading the initial ` in such cases? Otherwise I'd accept introducing a variable to control whether oldstyle backquotes should raise an error or get interpreted as newstyle. El-search would need to adapt, though, because the newstyle interpretation is different. However, that will need to happen anyway because at some point in time (Emacs 28?) we want to get rid of oldstyle backquotes altogether.