Subject: 30.0.93; wrong indentation with pathnames in lisp-mode

From: Timo Myyrä <[email-masked]>
Date: Wed, 02 Apr 2025 22:48:11 +0300

Lisp-mode seems does not seem to indent Common Lisp pathname short hands
correctly. When creating a file called foo.lisp and defining two
dynamic variables, the ones using sharpsign reader macro for pathname
are not indented correctly:

(defvar *test-1* "/tmp/"
  "This is a comment.")

(defvar *test-2* #p"/tmp/"
        "This is a comment.")

I would have expected the second form to be indented in the same way as
the first one.

In GNU Emacs 30.0.93 (build 1, x86_64-unknown-openbsd, X toolkit, cairo
 version 1.18.2, Xaw3d scroll bars) of 2024-12-28 built on
 asteroid.bittivirhe.fi
Windowing system distributor 'The X.Org Foundation', version 11.0.12101016
System Description: OpenBSD asteroid.bittivirhe.fi 7.7 GENERIC.MP#610 amd64

Configured using:
 'configure --build=amd64-unknown-openbsd
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/30.0.93/site-lisp:/usr/local/share/emacs/site-lisp
 --without-sound --with-x-toolkit=athena --prefix=/usr/local
 --sysconfdir=/etc --mandir=/usr/local/man --infodir=/usr/local/info
 --localstatedir=/var --disable-silent-rules --disable-gtk-doc
 'CFLAGS=-O2 -pipe -g' CPPFLAGS=-I/usr/local/include
 'LDFLAGS=-L/usr/local/lib -g''

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LCMS2
LIBOTF LIBXML2 M17N_FLT MODULES NOTIFY KQUEUE PDUMPER PNG RSVG SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XAW3D XDBE XIM
XINPUT2 XPM LUCID ZLIB

Important settings:
  locale-coding-system: nil

Major mode: Lisp

Minor modes in effect:
  sly-stickers-shortcut-mode: t
  sly-stickers-mode: t
  sly-trace-dialog-shortcut-mode: t
  sly-autodoc-mode: t
  bug-reference-prog-mode: t
  subword-mode: t
  electric-pair-mode: t
  whitespace-mode: t
  delete-selection-mode: t
  recentf-mode: t
  savehist-mode: t
  global-log4sly-mode: t
  log4sly-mode: t
  sly-editing-mode: t
  sly-mode: t
  sly-symbol-completion-mode: t
  which-function-mode: t
  minibuffer-electric-default-mode: t
  minibuffer-depth-indicate-mode: t
  vertico-mode: t
  global-corfu-mode: t
  corfu-mode: t
  marginalia-mode: t
  org-roam-db-autosync-mode: t
  save-place-mode: t
  winner-mode: t
  TeX-PDF-mode: t
  repeat-mode: t
  global-so-long-mode: t
  pixel-scroll-precision-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  context-menu-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  minibuffer-regexp-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
~/git/vc-got/vc-got hides /home/tmy/.config/emacs/elpa/vc-got-1.2/vc-got
/home/tmy/.config/emacs/elpa/transient-20241004.1739/transient hides /usr/local/share/emacs/30.0.93/lisp/transient
/home/tmy/.config/emacs/elpa/bind-key-20230203.2004/bind-key hides /usr/local/share/emacs/30.0.93/lisp/bind-key
/home/tmy/.config/emacs/elpa/use-package-20230426.2324/use-package hides /usr/local/share/emacs/30.0.93/lisp/use-package/use-package
/home/tmy/.config/emacs/elpa/use-package-20230426.2324/use-package-lint hides /usr/local/share/emacs/30.0.93/lisp/use-package/use-package-lint
/home/tmy/.config/emacs/elpa/use-package-20230426.2324/use-package-jump hides /usr/local/share/emacs/30.0.93/lisp/use-package/use-package-jump
/home/tmy/.config/emacs/elpa/use-package-20230426.2324/use-package-ensure hides /usr/local/share/emacs/30.0.93/lisp/use-package/use-package-ensure
/home/tmy/.config/emacs/elpa/use-package-20230426.2324/use-package-diminish hides /usr/local/share/emacs/30.0.93/lisp/use-package/use-package-diminish
/home/tmy/.config/emacs/elpa/use-package-20230426.2324/use-package-delight hides /usr/local/share/emacs/30.0.93/lisp/use-package/use-package-delight
/home/tmy/.config/emacs/elpa/use-package-20230426.2324/use-package-core hides /usr/local/share/emacs/30.0.93/lisp/use-package/use-package-core
/home/tmy/.config/emacs/elpa/use-package-20230426.2324/use-package-bind-key hides /usr/local/share/emacs/30.0.93/lisp/use-package/use-package-bind-key
/home/tmy/.config/emacs/elpa/eglot-20221020.1010/eglot hides /usr/local/share/emacs/30.0.93/lisp/progmodes/eglot

Features:
(shadow emacsbug tramp-cache shortdoc comp-common cl-print cl-indent
inf-lisp face-remap tabify man ol-eww eww ol-rmail ol-mhe ol-irc ol-info
ol-gnus nnselect ol-docview doc-view ol-bbdb ol-w3m ol-doi org-link-doi
flyspell ispell view cperl-mode easy-kill misearch multi-isearch
sly-fancy sly-tramp sly-indentation sly-cl-indent sly-stickers pulse
hi-lock sly-trace-dialog sly-fontifying-fu sly-package-fu sly-scratch
sly-fancy-trace sly-fancy-inspector sly-mrepl sly-autodoc sly-parse
tramp-cmds orderless dired-aux gnus-dired tex-info texinfo
texinfo-loaddefs mule-util time-stamp go-eldoc go-mode find-file ffap
gnus-draft gnus-fun gnus-html help-fns radix-tree autoconf autoconf-mode
make-mode nroff-mode smerge-mode diff cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs flow-fill shr-color
color qp sort smiley gnus-cite mail-extr textsec uni-scripts
idna-mapping ucs-normalize uni-confusable textsec-check gnus-async
gnus-bcklg gnus-ml disp-table nndraft nnmh utf-7 nnfolder epa-file
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art
mm-uu mml2015 mm-view mml-smime smime dig nntp gnus-cache gnus-sum shr
pixel-fill kinsoku svg gnus-group gnus-undo gnus-start gnus-dbus
gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int
gnus-range gnus-win mm-archive vc-hg vc-git diff-mode track-changes
vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc-got log-view vc-dir ewoc
log-edit pcvs-util add-log vc-annotate vc vc-dispatcher bug-reference
cap-words superword subword elec-pair whitespace delsel recentf
tree-widget savehist init init-local init-programming log4sly sly
sly-completion sly-buttons sly-messages sly-common apropos etags
fileloop arc-mode archive-mode hyperspec log4cl which-func imenu
init-files init-completion minibuf-eldef mb-depth vertico corfu
marginalia init-web init-email mm-url gnus nnheader range init-org
org-ref org-ref-core openalex request autorevert org-ref-glossary
org-ref-bibtex sgml-mode facemenu dom avy doi-utils message sendmail
yank-media rfc822 mml mml-sec epa derived gnus-util mm-decode mm-bodies
mm-encode mailabbrev mail-utils gmm-utils mailheader org-ref-utils
org-ref-export citeproc citeproc-itemgetters citeproc-cite
citeproc-biblatex citeproc-bibtex ol-bibtex citeproc-subbibs
citeproc-sort citeproc-name citeproc-formatters citeproc-proc
citeproc-disamb citeproc-itemdata citeproc-generic-elements
citeproc-macro citeproc-choose citeproc-date citeproc-number rst
citeproc-context citeproc-prange citeproc-style citeproc-locale
citeproc-term citeproc-rt citeproc-lib citeproc-s queue ox-org ox-odt
rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse
nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar org-agenda
ox-html table ox-ascii ox-publish ox org-ref-misc-links
org-ref-label-link org-ref-ref-links org-ref-citation-links xref
org-ref-bibliography-links hydra advice lv bibtex-completion filenotify
biblio biblio-download biblio-dissemin biblio-ieee biblio-hal
biblio-dblp biblio-crossref biblio-arxiv timezone biblio-doi biblio-core
let-alist url-queue url-file ido hl-line parsebib bibtex f s cl-extra
org-roam-dailies org-roam-migrate org-roam-log org-roam-mode
org-roam-capture org-roam-id org-roam-node org-roam-db
emacsql-sqlite-builtin sqlite org-roam-utils org-roam-compat org-roam
org-capture org-element org-persist avl-tree org-attach org-id
org-refile org-element-ast inline ob-shell org ob ob-tangle ob-ref
ob-lob ob-table ob-exp org-macro org-src sh-script smie treesit
executable ob-comint org-pcomplete org-list org-footnote org-entities
noutline outline org-version ob-emacs-lisp ob-core ob-eval org-cycle
org-table ol org-fold org-fold-core org-keys oc org-loaddefs find-func
suomalainen-kalenteri cal-menu calendar cal-loaddefs org-compat
emacsql-sqlite emacsql-sqlite-common emacsql emacsql-compiler
magit-section cursor-sensor compat dash org-faces org-macs init-shell
em-smart esh-mode esh-var esh-cmd generator esh-ext esh-opt esh-proc
esh-io esh-arg esh-module esh-module-loaddefs esh-util init-session
saveplace tramp-sh tramp rx trampver tramp-integration files-x
tramp-message help-mode tramp-compat xdg shell pcomplete parse-time
iso8601 time-date tramp-loaddefs init-calendar time init-visual
modus-vivendi-theme modus-themes winner init-text pdf-tools cus-edit
cus-load wid-edit pdf-view bookmark pp jka-compr pdf-cache pdf-info tq
pdf-util format-spec pdf-macs image-mode dired dired-loaddefs exif
preview reporter desktop frameset latex easy-mmode edmacro kmacro
latex-flymake flymake project compile text-property-search comint
ansi-osc ansi-color warnings thingatpt tex-ispell tex-style tex dbus xml
crm texmathp auctex init-general repeat so-long pixel-scroll cua-base
ring diminish finder-inf gnutls network-stream url-cache url-http
url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr url-gw nsm puny epg rfc6068 epg-config
afternoon-theme-autoloads ample-theme-autoloads ansible-autoloads
auctex-autoloads tex-site cider-autoloads clojure-mode-autoloads
corfu-autoloads darktooth-theme-autoloads dired-du-autoloads
dired-duplicates-autoloads dired-preview-autoloads disk-usage-autoloads
eglot-autoloads elfeed-autoloads embark-autoloads emms-autoloads
flymake-eslint-autoloads geiser-guile-autoloads geiser-autoloads
gited-autoloads go-mode-autoloads gptel-autoloads
gruvbox-theme-autoloads autothemer-autoloads keepass-mode-autoloads
listen-autoloads llm-autoloads magit-autoloads pcase
marginalia-autoloads markdown-mode-autoloads moe-theme-autoloads
nov-autoloads esxml-autoloads kv-autoloads orderless-autoloads
org-caldav-autoloads org-contacts-autoloads org-download-autoloads
async-autoloads org-jira-autoloads org-mind-map-autoloads
org-modern-autoloads org-present-autoloads org-ref-autoloads
citeproc-autoloads bibtex-completion-autoloads biblio-autoloads
biblio-core-autoloads avy-autoloads hydra-autoloads lv-autoloads
htmlize-autoloads org-roam-autoloads emacsql-autoloads
org-super-agenda-autoloads org-timeblock-autoloads org-vcard-autoloads
ox-pandoc-autoloads ht-autoloads package-lint-autoloads
parsebib-autoloads parseedn-autoloads parseclj-autoloads
pdf-tools-autoloads persist-autoloads php-mode-autoloads
plantuml-mode-autoloads plz-event-source-autoloads
plz-media-type-autoloads plz-autoloads prettier-autoloads nvm-autoloads
f-autoloads iter2-autoloads quack-autoloads request-autoloads
restclient-autoloads sesman-autoloads sly-autoloads
string-inflection-autoloads suomalainen-kalenteri-autoloads
tablist-autoloads taxy-magit-section-autoloads taxy-autoloads
magit-section-autoloads transient-autoloads ts-autoloads dash-autoloads
ts-comint-autoloads typescript-mode-autoloads use-package-autoloads
bind-key-autoloads vcl-mode-autoloads vertico-autoloads
visual-fill-column-autoloads vundo-autoloads web-mode-autoloads
weyland-yutani-theme-autoloads wgrep-autoloads info
with-editor-autoloads x509-mode-autoloads yaml-mode-autoloads
zenburn-theme-autoloads package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs icons password-cache json subr-x map byte-opt
gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl
tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list
replace newcomment text-mode lisp-mode prog-mode register page tab-bar
menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse
jit-lock font-lock syntax font-core term/tty-colors frame minibuffer
nadvice seq simple cl-generic indonesian philippine cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop
case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind kqueue lcms2 dynamic-setting system-font-setting
font-render-setting cairo x-toolkit xinput2 x multi-tty move-toolbar
make-network-process emacs)

Memory information:
((conses 16 1309836 120777) (symbols 48 62561 3)
 (strings 32 301872 17459) (string-bytes 1 10234988) (vectors 16 132619)
 (vector-slots 8 1518571 108344) (floats 8 1199 10785)
 (intervals 56 21044 2390) (buffers 992 75))