aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2011-01-17 21:11:51 -0500
committerStefan Monnier2011-01-17 21:11:51 -0500
commit74a10be5d33a51e0151f8a49652cd5c8c652985c (patch)
tree5fb206715fb1b604932f9e6a9774031cef590e9c
parent9092d18633d982f1d0f514fb6fb975120cb3a472 (diff)
downloademacs-74a10be5d33a51e0151f8a49652cd5c8c652985c.tar.gz
emacs-74a10be5d33a51e0151f8a49652cd5c8c652985c.zip
* lisp/electric.el (electric-indent-post-self-insert-function):
Don't auto-indent for indent-to-left-margin, it's too often counter-productive.
-rw-r--r--lisp/ChangeLog24
-rw-r--r--lisp/electric.el6
2 files changed, 19 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3bc9ccfbf28..969b0c6997a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12011-01-18 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * electric.el (electric-indent-post-self-insert-function):
4 Don't auto-indent for indent-to-left-margin, it's too often
5 counter-productive.
6
12011-01-16 Tassilo Horn <tassilo@member.fsf.org> 72011-01-16 Tassilo Horn <tassilo@member.fsf.org>
2 8
3 * strokes.el (strokes-read-stroke): Re-fill strokes buffer with 9 * strokes.el (strokes-read-stroke): Re-fill strokes buffer with
@@ -54,12 +60,12 @@
54 60
552011-01-15 Kenichi Handa <handa@m17n.org> 612011-01-15 Kenichi Handa <handa@m17n.org>
56 62
57 * mail/rmailmm.el (rmail-mime-insert-header): Set 63 * mail/rmailmm.el (rmail-mime-insert-header):
58 rmail-mime-coding-system to a cons whose car is the last coding 64 Set rmail-mime-coding-system to a cons whose car is the last coding
59 system used to decode the header. 65 system used to decode the header.
60 (rmail-mime-find-header-encoding): New function. 66 (rmail-mime-find-header-encoding): New function.
61 (rmail-mime-insert-decoded-text): Override 67 (rmail-mime-insert-decoded-text):
62 rmail-mime-coding-system if it is a cons. 68 Override rmail-mime-coding-system if it is a cons.
63 (rmail-show-mime): If only a header part was decoded, find the 69 (rmail-show-mime): If only a header part was decoded, find the
64 coding system while ignoring mm-charset-override-alist. 70 coding system while ignoring mm-charset-override-alist.
65 71
@@ -72,8 +78,8 @@
72 * mail/rmailmm.el (rmail-mime-next-item) 78 * mail/rmailmm.el (rmail-mime-next-item)
73 (rmail-mime-previous-item): Delete them. 79 (rmail-mime-previous-item): Delete them.
74 (rmail-mime-shown-mode): Recursively call for children. 80 (rmail-mime-shown-mode): Recursively call for children.
75 (rmail-mime-hidden-mode): Delete the 2nd arg TOP. Callers 81 (rmail-mime-hidden-mode): Delete the 2nd arg TOP.
76 changed. 82 Callers changed.
77 (rmail-mime-raw-mode): Recursively call for children. 83 (rmail-mime-raw-mode): Recursively call for children.
78 (rmail-mode-map): Change mapping of tab and backtab to 84 (rmail-mode-map): Change mapping of tab and backtab to
79 forward-button and backward-button respectively. 85 forward-button and backward-button respectively.
@@ -82,7 +88,7 @@
82 (rmail-mime-update-tagline): New function. 88 (rmail-mime-update-tagline): New function.
83 (rmail-mime-insert-text): Call rmail-mime-update-tagline if the 89 (rmail-mime-insert-text): Call rmail-mime-update-tagline if the
84 body display is changed. 90 body display is changed.
85 (rmail-mime-toggle-button): Renamed from rmail-mime-image. 91 (rmail-mime-toggle-button): Rename from rmail-mime-image.
86 (rmail-mime-image): Delete this button type. 92 (rmail-mime-image): Delete this button type.
87 (rmail-mime-toggle): New button type. 93 (rmail-mime-toggle): New button type.
88 (rmail-mime-insert-bulk): Call rmail-mime-update-tagline if the 94 (rmail-mime-insert-bulk): Call rmail-mime-update-tagline if the
@@ -329,8 +335,8 @@
329 menus. Add menu item for customize-themes. 335 menus. Add menu item for customize-themes.
330 336
331 * cus-theme.el (customize-themes): 337 * cus-theme.el (customize-themes):
332 * emacs-lisp/package.el (package--list-packages): Use 338 * emacs-lisp/package.el (package--list-packages):
333 switch-to-buffer. 339 Use switch-to-buffer.
334 340
3352011-01-11 Johan Bockgård <bojohan@gnu.org> 3412011-01-11 Johan Bockgård <bojohan@gnu.org>
336 342
diff --git a/lisp/electric.el b/lisp/electric.el
index f777ac1af57..9a269a5c23d 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -221,7 +221,8 @@ Returns nil when we can't find this char."
221 (let ((before (copy-marker (1- pos) t))) 221 (let ((before (copy-marker (1- pos) t)))
222 (save-excursion 222 (save-excursion
223 (unless (memq indent-line-function 223 (unless (memq indent-line-function
224 '(indent-relative indent-relative-maybe)) 224 '(indent-relative indent-to-left-margin
225 indent-relative-maybe))
225 ;; Don't reindent the previous line if the indentation function 226 ;; Don't reindent the previous line if the indentation function
226 ;; is not a real one. 227 ;; is not a real one.
227 (goto-char before) 228 (goto-char before)
@@ -235,7 +236,8 @@ Returns nil when we can't find this char."
235 ;; Remove the trailing whitespace after indentation because 236 ;; Remove the trailing whitespace after indentation because
236 ;; indentation may (re)introduce the whitespace. 237 ;; indentation may (re)introduce the whitespace.
237 (delete-horizontal-space t)))) 238 (delete-horizontal-space t))))
238 (indent-according-to-mode)))) 239 (unless (memq indent-line-function '(indent-to-left-margin))
240 (indent-according-to-mode)))))
239 241
240;;;###autoload 242;;;###autoload
241(define-minor-mode electric-indent-mode 243(define-minor-mode electric-indent-mode