* bug#27815: 26.0.50; Misindentation in cl-labels
@ 2017-07-25 3:56 Kaushal Modi
2017-07-25 13:33 ` Noam Postavsky
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Kaushal Modi @ 2017-07-25 3:56 UTC (permalink / raw
To: 27815
[-- Attachment #1: Type: text/plain, Size: 4207 bytes --]
Hello,
I am able to reproduce with mis-indentation on emacs -Q:
Here is an example code:
(require 'cl-lib)
(cl-labels ((categoryp (tag)
(string-match-p "\\`@" tag)))
(categoryp "@a"))
Above is the result of selecting the whole code and C-M-\ (indent-region).
Notice that the body of `categoryp' gets indented by the name of that fn.
In GNU Emacs 26.0.50 (build 15, x86_64-pc-linux-gnu, GTK+ Version 2.24.23)
of 2017-07-24
Repository revision: 6dc5d45c542a6f9cfbcf3e37d597c9e0efb3070d
Windowing system distributor 'The X.Org Foundation', version 11.0.60900000
System Description: Red Hat Enterprise Linux Workstation release 6.6
(Santiago)
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set [3 times]
Indenting region...done
Mark set [2 times]
Indenting region...done
Entering debugger...
custom-initialize-reset: Symbol’s function definition is void: cl-labels
Quit
cl-lib
0 (#o0, #x0, ?\C-@)
Configured using:
'configure --with-modules
--prefix=/home/kmodi/usr_local/apps/6/emacs/master
'--program-transform-name=s/^ctags$/ctags_emacs/'
'CPPFLAGS=-I/home/kmodi/usr_local/6/include -I/usr/include/freetype2
-I/usr/include' 'CFLAGS=-ggdb3 -O0' 'CXXFLAGS=-ggdb3 -O0'
'LDFLAGS=-L/home/kmodi/usr_local/6/lib -L/home/kmodi/usr_local/6/lib64
-ggdb3'
PKG_CONFIG_PATH=/home/kmodi/usr_local/6/lib/pkgconfig:/home/kmodi/usr_local/6/lib64/pkgconfig:/cad/adi/apps/gnu/linux/x86_64/6/lib/pkgconfig:/cad/adi/apps/gnu/linux/x86_64/6/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:/lib/pkgconfig:/lib64/pkgconfig'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK2 X11 MODULES
Important settings:
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=none
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message subr-x puny seq dired
dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived
epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-macs
help-mode easymenu cl-print byte-opt gv bytecomp byte-compile
cl-loaddefs cl-lib cconv debug time-date mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic 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 charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)
Memory information:
((conses 16 100309 6762)
(symbols 48 20992 1)
(miscs 40 55 130)
(strings 32 29883 1489)
(string-bytes 1 810929)
(vectors 16 15235)
(vector-slots 8 511039 7728)
(floats 8 51 320)
(intervals 56 294 4)
(buffers 992 12)
(heap 1024 40368 949))
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 5639 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#27815: 26.0.50; Misindentation in cl-labels
2017-07-25 3:56 bug#27815: 26.0.50; Misindentation in cl-labels Kaushal Modi
@ 2017-07-25 13:33 ` Noam Postavsky
2021-02-05 12:12 ` Lars Ingebrigtsen
2021-09-25 1:30 ` Lars Ingebrigtsen
2 siblings, 0 replies; 4+ messages in thread
From: Noam Postavsky @ 2017-07-25 13:33 UTC (permalink / raw
To: Kaushal Modi; +Cc: 27815
tag 27815 confirmed
quit
On Mon, Jul 24, 2017 at 11:56 PM, Kaushal Modi <kaushal.modi@gmail.com> wrote:
> Hello,
>
> I am able to reproduce with mis-indentation on emacs -Q:
>
> Here is an example code:
>
> (require 'cl-lib)
> (cl-labels ((categoryp (tag)
> (string-match-p "\\`@" tag)))
> (categoryp "@a"))
>
> Above is the result of selecting the whole code and C-M-\ (indent-region).
> Notice that the body of `categoryp' gets indented by the name of that fn.
Yes, we have the similar failures with cl-flet (Bug#9622) and let
(Bug#23108). The root of the problem is that we don't have a way to
give a macro control over indentation in subexpressions of its
arguments.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#27815: 26.0.50; Misindentation in cl-labels
2017-07-25 3:56 bug#27815: 26.0.50; Misindentation in cl-labels Kaushal Modi
2017-07-25 13:33 ` Noam Postavsky
@ 2021-02-05 12:12 ` Lars Ingebrigtsen
2021-09-25 1:30 ` Lars Ingebrigtsen
2 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-05 12:12 UTC (permalink / raw
To: Kaushal Modi; +Cc: 27815
Kaushal Modi <kaushal.modi@gmail.com> writes:
> I am able to reproduce with mis-indentation on emacs -Q:
>
> Here is an example code:
>
> (require 'cl-lib)
> (cl-labels ((categoryp (tag)
> (string-match-p "\\`@" tag)))
> (categoryp "@a"))
>
> Above is the result of selecting the whole code and C-M-\ (indent-region).
> Notice that the body of `categoryp' gets indented by the name of that fn.
This has apparently changed between when this was reported and now (in
Emacs 28). But it's still wrong:
(require 'cl-lib)
(cl-labels ((categoryp (tag)
(string-match-p "\\`@" tag)))
(categoryp "@a"))
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#27815: 26.0.50; Misindentation in cl-labels
2017-07-25 3:56 bug#27815: 26.0.50; Misindentation in cl-labels Kaushal Modi
2017-07-25 13:33 ` Noam Postavsky
2021-02-05 12:12 ` Lars Ingebrigtsen
@ 2021-09-25 1:30 ` Lars Ingebrigtsen
2 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-25 1:30 UTC (permalink / raw
To: Kaushal Modi; +Cc: 27815
Kaushal Modi <kaushal.modi@gmail.com> writes:
> I am able to reproduce with mis-indentation on emacs -Q:
>
> Here is an example code:
>
> (require 'cl-lib)
> (cl-labels ((categoryp (tag)
> (string-match-p "\\`@" tag)))
> (categoryp "@a"))
This is now fixed in Emacs 28 with this commit:
commit 57dcc26e4af4e4f7812f2e287f18d36c662bf6b1 (HEAD -> master)
Author: akater <nuclearspace@gmail.com>
AuthorDate: Sat Sep 25 03:27:29 2021 +0200
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-09-25 1:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-25 3:56 bug#27815: 26.0.50; Misindentation in cl-labels Kaushal Modi
2017-07-25 13:33 ` Noam Postavsky
2021-02-05 12:12 ` Lars Ingebrigtsen
2021-09-25 1:30 ` 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.