unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18348: 24.4.50; `common-lisp-indent-function'
@ 2014-08-28 22:03 Drew Adams
  2019-10-09  1:21 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2014-08-28 22:03 UTC (permalink / raw)
  To: 18348

emacs -Q

In emacs-lisp-mode, do this:

(set (make-local-variable 'lisp-indent-function)
     'common-lisp-indent-function)

In Emacs 20, this Emacs-Lisp sexp indents correctly (IMO) to this, using
`C-M-q':

(toto beg end
      `(foo     ,bar
        keymap      ,map
        mouse-face  highlight
        help-echo   "jjjjjjjjjjjjjjjjjjjj"))

Starting with Emacs 22, it indents to this, which is bad (IMO):

(toto beg end
      `(foo     ,bar
                keymap      ,map
                mouse-face  highlight
                help-echo   "jjjjjjjjjjjjjjjjjjjj"))

If this is really what Emacs Dev prefers (why?), can you please let me
know a simple way to get the Emacs 20 indentation instead?


In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-08-15 on LEG570
Bzr revision: 117706 rgm@gnu.org-20140815043406-p5hbu97cbm7pulcn
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#18348: 24.4.50; `common-lisp-indent-function'
  2014-08-28 22:03 bug#18348: 24.4.50; `common-lisp-indent-function' Drew Adams
@ 2019-10-09  1:21 ` Lars Ingebrigtsen
  2019-10-09  1:25   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-09  1:21 UTC (permalink / raw)
  To: Drew Adams; +Cc: 18348

Drew Adams <drew.adams@oracle.com> writes:

> In emacs-lisp-mode, do this:
>
> (set (make-local-variable 'lisp-indent-function)
>      'common-lisp-indent-function)
>
> In Emacs 20, this Emacs-Lisp sexp indents correctly (IMO) to this, using
> `C-M-q':
>
> (toto beg end
>       `(foo     ,bar
>         keymap      ,map
>         mouse-face  highlight
>         help-echo   "jjjjjjjjjjjjjjjjjjjj"))
>
> Starting with Emacs 22, it indents to this, which is bad (IMO):
>
> (toto beg end
>       `(foo     ,bar
>                 keymap      ,map
>                 mouse-face  highlight
>                 help-echo   "jjjjjjjjjjjjjjjjjjjj"))
>
> If this is really what Emacs Dev prefers (why?), can you please let me
> know a simple way to get the Emacs 20 indentation instead?

I guess it looks extra awkward because of the strange way you add white
space, but I guess the mode interprets the `(foo bar ...) form as being
a function call-like structure instead of a list of pairs.

Funnily enough, if you use '(foo ,bar ...) it indents the way you want.
It seems awfully inconsistent to indent one way with ` and another way
with '.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#18348: 24.4.50; `common-lisp-indent-function'
  2019-10-09  1:21 ` Lars Ingebrigtsen
@ 2019-10-09  1:25   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-09  1:25 UTC (permalink / raw)
  To: Drew Adams; +Cc: 18348

Lars Ingebrigtsen <larsi@gnus.org> writes:

>> If this is really what Emacs Dev prefers (why?), can you please let me
>> know a simple way to get the Emacs 20 indentation instead?

I forgot about this: Set `lisp-backquote-indentation' to nil.

I think changing the default of that variable might be nice, but I guess
that train left the station a decade ago, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-09  1:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-28 22:03 bug#18348: 24.4.50; `common-lisp-indent-function' Drew Adams
2019-10-09  1:21 ` Lars Ingebrigtsen
2019-10-09  1:25   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).