unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 21090@debbugs.gnu.org
Subject: bug#21090: 25.0.50; `condition-case-no-debug': Please fix indentation & highlighting
Date: Mon, 20 Jul 2015 08:01:13 -0700 (PDT)	[thread overview]
Message-ID: <e380a4a2-b24d-4653-a937-55c57ff290e7@default> (raw)
In-Reply-To: <jwv380jptql.fsf-monnier+emacsbugs@gnu.org>

> do you have a recipe to reproduce this..., starting from "emacs -Q"?

Dunno whether you want to consider this a bug, as it involves
`common-lisp-indent-function'.  Perhaps you will consider it a
feature.

Anyway, the behavior changed to the current behavior in Emacs 24.1.
Before that, there was no such problem with indentation.

1. emacs -Q

2. Put this in a file foo.el, then kill the foo.el buffer or restart Emacs:

----------------8<-----------------
(defun foo ()
  ""
  (interactive)
  (condition-case-no-debug foo
      (save-excursion (goto-char 44))
    (error (error "%s" (error-message-string foo)))))
----------------8<-----------------

3. Evaluate this, then visit file foo.el.

(defun lisp-indentation-hack ()
  (unless (load-history-filename-element (load-history-regexp "cl-indent"))
    (load "cl-indent" nil t))
  (set (make-local-variable 'lisp-indent-function)
       'common-lisp-indent-function))

(add-hook 'emacs-lisp-mode-hook 'lisp-indentation-hack)

4. Put point at beginning of the `(defun....)' in foo.el, and hit `C-M-q'.

Result:

(defun foo ()
  ""
  (interactive)
  (condition-case-no-debug foo
                           (save-excursion (goto-char 44))
                           (error (error "%s" (error-message-string foo)))))

Prior to Emacs 24.1, there is no change in indentation.  Starting with
24.1, the `save-excursion' and `error' sexps are aligned with `foo'.





  reply	other threads:[~2015-07-20 15:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-18 20:07 bug#21090: 25.0.50; `condition-case-no-debug': Please fix indentation & highlighting Drew Adams
2015-07-20  0:19 ` Stefan Monnier
2015-07-20 15:01   ` Drew Adams [this message]
2015-07-20 22:54     ` Stefan Monnier
2015-07-20 23:30       ` Drew Adams
2016-04-30 21:24     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e380a4a2-b24d-4653-a937-55c57ff290e7@default \
    --to=drew.adams@oracle.com \
    --cc=21090@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).