unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20547: emacs-24.5 problem with indent-mode
@ 2015-05-11 11:18 Petr Hracek
  2015-05-11 15:07 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Petr Hracek @ 2015-05-11 11:18 UTC (permalink / raw)
  To: 20547

Hi folks,

I have discovered an issue with Python indent-mode.

If I open a Python code and write 'def some_func:' and hit C-j
then emacs did not pass any indentation (e.g. 4 spaces).

When I turned of electrict-indent-mode then the issue is fixed.
I have already asked for that, I guess. But I am not pretty sure.

Did you discover this issue?

My .emacs file look like this:
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
  '(inhibit-startup-screen t))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
  )
(autoload 'rpm-spec-mode "rpm-spec-mode.el" "RPM spec mode." t)
(setq auto-mode-alist (append '(("\\.spec" . rpm-spec-mode))
                   auto-mode-alist))
(defun my-rpm-changelog-increment-version()
   (interactive)
   (goto-char (point-min))
   (let * ((max (search-forward-regexp rpm-section-regexp))
       (version (rpm-spec-field-value "Version" max)))
        (rpm-add-change-log-entry (concat "Upgrade version to " version))
        ))

-- 
Petr Hracek
Software Engineer
Developer Experience
Red Hat, Inc
Mob: +420777056169
email: phracek@redhat.com






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

* bug#20547: emacs-24.5 problem with indent-mode
  2015-05-11 11:18 bug#20547: emacs-24.5 problem with indent-mode Petr Hracek
@ 2015-05-11 15:07 ` Eli Zaretskii
  2015-05-12  9:41   ` Petr Hracek
  2015-05-12  9:50   ` Petr Hracek
  0 siblings, 2 replies; 5+ messages in thread
From: Eli Zaretskii @ 2015-05-11 15:07 UTC (permalink / raw)
  To: Petr Hracek; +Cc: 20547

> Date: Mon, 11 May 2015 13:18:16 +0200
> From: Petr Hracek <phracek@redhat.com>
> 
> I have discovered an issue with Python indent-mode.
> 
> If I open a Python code and write 'def some_func:' and hit C-j
> then emacs did not pass any indentation (e.g. 4 spaces).

I think that function is now on RET by default.  Did you try that?





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

* bug#20547: emacs-24.5 problem with indent-mode
  2015-05-11 15:07 ` Eli Zaretskii
@ 2015-05-12  9:41   ` Petr Hracek
  2015-05-12  9:50   ` Petr Hracek
  1 sibling, 0 replies; 5+ messages in thread
From: Petr Hracek @ 2015-05-12  9:41 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 20547

Hi Eli,

right. RET like Return works fine.

Thanks.

On 05/11/2015 05:07 PM, Eli Zaretskii wrote:
>> Date: Mon, 11 May 2015 13:18:16 +0200
>> From: Petr Hracek <phracek@redhat.com>
>>
>> I have discovered an issue with Python indent-mode.
>>
>> If I open a Python code and write 'def some_func:' and hit C-j
>> then emacs did not pass any indentation (e.g. 4 spaces).
> I think that function is now on RET by default.  Did you try that?


-- 
Petr Hracek
Software Engineer
Developer Experience
Red Hat, Inc
Mob: +420777056169
email: phracek@redhat.com






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

* bug#20547: emacs-24.5 problem with indent-mode
  2015-05-11 15:07 ` Eli Zaretskii
  2015-05-12  9:41   ` Petr Hracek
@ 2015-05-12  9:50   ` Petr Hracek
  2015-05-12 15:52     ` Glenn Morris
  1 sibling, 1 reply; 5+ messages in thread
From: Petr Hracek @ 2015-05-12  9:50 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 20547

On 05/11/2015 05:07 PM, Eli Zaretskii wrote:
>> Date: Mon, 11 May 2015 13:18:16 +0200
>> From: Petr Hracek <phracek@redhat.com>
>>
>> I have discovered an issue with Python indent-mode.
>>
>> If I open a Python code and write 'def some_func:' and hit C-j
>> then emacs did not pass any indentation (e.g. 4 spaces).
> I think that function is now on RET by default.  Did you try that?
Is it right, that electric-new-line-and-maybe-indent is hooked to C-j?

Based on http://emacswiki.org/emacs/AutoIndentation


-- 
Petr Hracek
Software Engineer
Developer Experience
Red Hat, Inc
Mob: +420777056169
email: phracek@redhat.com






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

* bug#20547: emacs-24.5 problem with indent-mode
  2015-05-12  9:50   ` Petr Hracek
@ 2015-05-12 15:52     ` Glenn Morris
  0 siblings, 0 replies; 5+ messages in thread
From: Glenn Morris @ 2015-05-12 15:52 UTC (permalink / raw)
  To: Petr Hracek; +Cc: 20547


See the NEWS file:

*** `electric-indent-mode' is now enabled by default.
Typing RET reindents the current line and indents the new line.
`C-j' inserts a newline but does not indent.





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

end of thread, other threads:[~2015-05-12 15:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-11 11:18 bug#20547: emacs-24.5 problem with indent-mode Petr Hracek
2015-05-11 15:07 ` Eli Zaretskii
2015-05-12  9:41   ` Petr Hracek
2015-05-12  9:50   ` Petr Hracek
2015-05-12 15:52     ` Glenn Morris

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).