emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 2a57b7e: Fixes: debbugs:18756


From: Glenn Morris
Subject: [Emacs-diffs] emacs-24 2a57b7e: Fixes: debbugs:18756
Date: Tue, 06 Jan 2015 18:52:27 +0000

branch: emacs-24
commit 2a57b7e5b42175031efb8b4348638a05cb1c52a2
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Fixes: debbugs:18756
    
    sh-basic-indent-line fix
    
    * lisp/progmodes/sh-script.el (sh-mode): Doc fix.
    (sh-basic-indent-line): Handle electric newline.
---
 lisp/ChangeLog              |   12 +++++++-----
 lisp/progmodes/sh-script.el |    7 +++----
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index baabc9e..73aa3e0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,19 +1,21 @@
+2015-01-06  Glenn Morris  <address@hidden>
+
+       * progmodes/sh-script.el (sh-mode): Doc fix.
+       (sh-basic-indent-line): Handle electric newline.  (Bug#18756)
+
 2014-12-14  Steve Purcell  <address@hidden>  (tiny change)
 
        * emacs-lisp/package.el (package-menu-mode): Use an extra column
-       for the "Version" column, to accomodate date-and-time-based
-       versions.
+       for the "Version" column, to accomodate date-and-time-based versions.
 
 2015-01-04  Paul Eggert  <address@hidden>
 
-       Fix dired quoting bug with "Hit`N`Hide"
-       Fixes Bug#19498.
+       Fix dired quoting bug with "Hit`N`Hide".  Fixes Bug#19498.
        * files.el (shell-quote-wildcard-pattern): Also quote "`".
 
 2015-01-04  Dmitry Gutov  <address@hidden>
 
        Unbreak `mouse-action' property in text buttons.
-
        * button.el (push-button): Fix regression from 2012-12-06.
 
 2015-01-01  Eli Zaretskii  <address@hidden>
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index d79b387..4700324 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1,7 +1,6 @@
 ;;; sh-script.el --- shell-script editing commands for Emacs  -*- 
lexical-binding:t -*-
 
-;; Copyright (C) 1993-1997, 1999, 2001-2015 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1993-1997, 1999, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: Daniel Pfeiffer <address@hidden>
 ;; Version: 2.0f
@@ -1575,7 +1574,6 @@ buffer indents as it currently is indented.
 
 
 \\[backward-delete-char-untabify]       Delete backward one position, even if 
it was a tab.
-\\[newline-and-indent]  Delete unquoted space and indent new line same as this 
one.
 \\[sh-end-of-command]   Go to end of successive commands.
 \\[sh-beginning-of-command]     Go to beginning of successive commands.
 \\[sh-set-shell]        Set this buffer's shell, and maybe its magic number.
@@ -2477,7 +2475,8 @@ Lines containing only comments are considered empty."
                    (current-column)))
        current)
     (save-excursion
-      (indent-to (if (eq this-command 'newline-and-indent)
+      (indent-to (if (or (eq this-command 'newline-and-indent)
+                         (and electric-indent-mode (eq this-command 'newline)))
                     previous
                   (if (< (current-column)
                          (setq current (progn (back-to-indentation)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]