unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#29304: 26.0.90; Typos in electric.el, with patch
@ 2017-11-15  9:21 Lele Gaifax
  2017-11-15 11:58 ` bug#29304: py-indent-line comes from the external python-mode Lele Gaifax
  2017-11-18 11:47 ` bug#29304: 26.0.90; Typos in electric.el, with patch Eli Zaretskii
  0 siblings, 2 replies; 4+ messages in thread
From: Lele Gaifax @ 2017-11-15  9:21 UTC (permalink / raw)
  To: 29304

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

There are two typos in the definition of the variable
`electric-indent-functions-without-reindent' in lisp/electric.el:

- its docstring mentions a non existing `line-indent-function' instead of the
  correct `indent-line-function';

- its value contains a reference to a non existing `py-indent-line' function,
  that should really be `python-indent-line-function'.

The attached patch fixes both issues.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-typos-in-electric-indent-functions-without-reind.patch --]
[-- Type: text/x-diff, Size: 1569 bytes --]

From c340e5ef63c3bf163eb39b7db5f0c6c34814d97d Mon Sep 17 00:00:00 2001
From: Lele Gaifax <lele@metapensiero.it>
Date: Wed, 15 Nov 2017 10:01:45 +0100
Subject: [PATCH 1/2] Fix typos in electric-indent-functions-without-reindent

* lisp/electric.el (electric-indent-functions-without-reindent): Fix
  doc typo, `line-indent-function' -> `indent-line-function'; fix
  python specific indent line function name, `py-indent-line' ->
  `python-indent-line-function'.
---
 lisp/electric.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/electric.el b/lisp/electric.el
index d7929945db..6a08554ed0 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -223,11 +223,11 @@ electric-indent-inhibit
 
 (defvar electric-indent-functions-without-reindent
   '(indent-relative indent-to-left-margin indent-relative-maybe
-    py-indent-line coffee-indent-line org-indent-line yaml-indent-line
-    haskell-indentation-indent-line haskell-indent-cycle haskell-simple-indent
-    yaml-indent-line)
+    python-indent-line-function coffee-indent-line org-indent-line
+    yaml-indent-line haskell-indentation-indent-line
+    haskell-indent-cycle haskell-simple-indent yaml-indent-line)
   "List of indent functions that can't reindent.
-If `line-indent-function' is one of those, then `electric-indent-mode' will
+If `indent-line-function' is one of those, then `electric-indent-mode' will
 not try to reindent lines.  It is normally better to make the major
 mode set `electric-indent-inhibit', but this can be used as a workaround.")
 
-- 
2.15.0


[-- Attachment #3: Type: text/plain, Size: 211 bytes --]


-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it  |                 -- Fortunato Depero, 1929.

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

* bug#29304: py-indent-line comes from the external python-mode
  2017-11-15  9:21 bug#29304: 26.0.90; Typos in electric.el, with patch Lele Gaifax
@ 2017-11-15 11:58 ` Lele Gaifax
  2017-11-17  8:13   ` Andreas Röhler
  2017-11-18 11:47 ` bug#29304: 26.0.90; Typos in electric.el, with patch Eli Zaretskii
  1 sibling, 1 reply; 4+ messages in thread
From: Lele Gaifax @ 2017-11-15 11:58 UTC (permalink / raw)
  To: 29304

Further investigation reveals that the external python-mode (that is,
https://gitlab.com/python-mode-devs/python-mode) effectively implements the
`py-indent-line' function, so that was the target.

I guess the attached patch should be ignored.

The docstring typo seems real, though.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it  |                 -- Fortunato Depero, 1929.





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

* bug#29304: py-indent-line comes from the external python-mode
  2017-11-15 11:58 ` bug#29304: py-indent-line comes from the external python-mode Lele Gaifax
@ 2017-11-17  8:13   ` Andreas Röhler
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Röhler @ 2017-11-17  8:13 UTC (permalink / raw)
  To: 29304

[-- Attachment #1: Type: text/plain, Size: 583 bytes --]



On 15.11.2017 12:58, Lele Gaifax wrote:
> Further investigation reveals that the external python-mode (that is,
> https://gitlab.com/python-mode-devs/python-mode) effectively implements the
> `py-indent-line' function, so that was the target.
>
> I guess the attached patch should be ignored.
>
> The docstring typo seems real, though.

Hi Lele,

could not reproduce the bug.

BTW python-mode.el doesn't provide an electric indent at comma.
At any case it should not get in the way of python.el.
Bug reports are welcome at

https://gitlab.com/python-mode-devs/python-mode/issues



[-- Attachment #2: Type: text/html, Size: 1208 bytes --]

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

* bug#29304: 26.0.90; Typos in electric.el, with patch
  2017-11-15  9:21 bug#29304: 26.0.90; Typos in electric.el, with patch Lele Gaifax
  2017-11-15 11:58 ` bug#29304: py-indent-line comes from the external python-mode Lele Gaifax
@ 2017-11-18 11:47 ` Eli Zaretskii
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2017-11-18 11:47 UTC (permalink / raw)
  To: Lele Gaifax; +Cc: 29304-done

> From: Lele Gaifax <lele@metapensiero.it>
> Date: Wed, 15 Nov 2017 10:21:11 +0100
> 
> There are two typos in the definition of the variable
> `electric-indent-functions-without-reindent' in lisp/electric.el:
> 
> - its docstring mentions a non existing `line-indent-function' instead of the
>   correct `indent-line-function';

Fixed, thanks.





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

end of thread, other threads:[~2017-11-18 11:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-15  9:21 bug#29304: 26.0.90; Typos in electric.el, with patch Lele Gaifax
2017-11-15 11:58 ` bug#29304: py-indent-line comes from the external python-mode Lele Gaifax
2017-11-17  8:13   ` Andreas Röhler
2017-11-18 11:47 ` bug#29304: 26.0.90; Typos in electric.el, with patch Eli Zaretskii

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