aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Steingold2000-11-22 20:59:39 +0000
committerSam Steingold2000-11-22 20:59:39 +0000
commiteaae8106d7be3d9ffa8e53bb5621d4dab118d5a9 (patch)
tree60d24d128cca769f4c87de86a7c1383be6e5f07d
parente053c60feb7ba152ddff83eff0a4e9f3c9c3efe6 (diff)
downloademacs-eaae8106d7be3d9ffa8e53bb5621d4dab118d5a9.tar.gz
emacs-eaae8106d7be3d9ffa8e53bb5621d4dab118d5a9.zip
* simple.el (delete-trailing-whitespace): New interactive function.
* progmodes/ada-mode.el (ada-mode): Use it instead of `ada-remove-trailing-spaces' (ada-remove-trailing-spaces): Removed. * textmodes/two-column.el (2C-merge): Recommend it in the doc. * textmodes/picture.el (picture-mode-exit): Call it instead of `picture-clean'. (picture-clean): Removed.
-rw-r--r--lisp/ChangeLog91
-rw-r--r--lisp/progmodes/ada-mode.el85
-rw-r--r--lisp/simple.el91
-rw-r--r--lisp/textmodes/picture.el11
-rw-r--r--lisp/textmodes/two-column.el4
5 files changed, 143 insertions, 139 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 622abc6944a..91f5994f0b1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,14 @@
12000-11-22 Sam Steingold <sds@gnu.org>
2
3 * simple.el (delete-trailing-whitespace): New interactive function.
4 * progmodes/ada-mode.el (ada-mode): Use it instead of
5 `ada-remove-trailing-spaces'
6 (ada-remove-trailing-spaces): Removed.
7 * textmodes/two-column.el (2C-merge): Recommend it in the doc.
8 * textmodes/picture.el (picture-mode-exit): Call it instead of
9 `picture-clean'.
10 (picture-clean): Removed.
11
12000-11-22 Gerd Moellmann <gerd@gnu.org> 122000-11-22 Gerd Moellmann <gerd@gnu.org>
2 13
3 * frame.el (show-cursor-in-non-selected-windows): Doc fix. 14 * frame.el (show-cursor-in-non-selected-windows): Doc fix.
@@ -36,12 +47,12 @@
36 * recentf.el (recentf-menu-items-for-commands) 47 * recentf.el (recentf-menu-items-for-commands)
37 (recentf-make-menu-items, recentf-make-menu-item) 48 (recentf-make-menu-items, recentf-make-menu-item)
38 (recentf-filter-changer): Added :help and :active menu-item properties. 49 (recentf-filter-changer): Added :help and :active menu-item properties.
39 50
40 (recentf-build-dir-rules, recentf-dump-variable) 51 (recentf-build-dir-rules, recentf-dump-variable)
41 (recentf-edit-list, recentf-open-files-item) 52 (recentf-edit-list, recentf-open-files-item)
42 (recentf-open-files): Replaced unnecessary `mapcar' with new 53 (recentf-open-files): Replaced unnecessary `mapcar' with new
43 built-in `mapc'. 54 built-in `mapc'.
44 55
452000-11-23 Miles Bader <miles@gnu.org> 562000-11-23 Miles Bader <miles@gnu.org>
46 57
47 * faces.el (menu): Make inverse-video on ttys too. 58 * faces.el (menu): Make inverse-video on ttys too.
@@ -66,7 +77,7 @@
662000-11-22 Andre Spiegel <spiegel@gnu.org> 772000-11-22 Andre Spiegel <spiegel@gnu.org>
67 78
68 * ediff-util.el (ediff-file-checked-out-p) 79 * ediff-util.el (ediff-file-checked-out-p)
69 (ediff-file-checked-in-p): Call vc-state instead of 80 (ediff-file-checked-in-p): Call vc-state instead of
70 vc-locking-user, which no longer exists. 81 vc-locking-user, which no longer exists.
71 82
72 * emulation/viper-util.el (viper-file-checked-in-p): Same as above. 83 * emulation/viper-util.el (viper-file-checked-in-p): Same as above.
@@ -78,7 +89,7 @@
78 89
792000-11-22 Miles Bader <miles@gnu.org> 902000-11-22 Miles Bader <miles@gnu.org>
80 91
81 * textmodes/refill.el (refill-adjust-ignorable-overlay) 92 * textmodes/refill.el (refill-adjust-ignorable-overlay)
82 (refill-fill-paragraph-at): Remove debugging code. 93 (refill-fill-paragraph-at): Remove debugging code.
83 94
84 * calendar/calendar.el (generate-calendar-window): When we don't 95 * calendar/calendar.el (generate-calendar-window): When we don't
@@ -176,18 +187,18 @@
176 187
177 * font-lock.el (java-keywords): Add MATCH-HIGHLIGHT part for 188 * font-lock.el (java-keywords): Add MATCH-HIGHLIGHT part for
178 javadoc tags. 189 javadoc tags.
179 190
1802000-11-20 Andre Spiegel <spiegel@gnu.org> 1912000-11-20 Andre Spiegel <spiegel@gnu.org>
181 192
182 * vc.el, vc-hooks.el: Undo prev change (moved functions back to 193 * vc.el, vc-hooks.el: Undo prev change (moved functions back to
183 vc.el). 194 vc.el).
184 195
185 * vc-rcs.el (vc-rcs-state): Before calling vc-workfile-unchanged-p, 196 * vc-rcs.el (vc-rcs-state): Before calling vc-workfile-unchanged-p,
186 require vc. 197 require vc.
187 198
188 * vc-cvs.el (vc-cvs-checkout): Fix bug that broke C-x v ~-style 199 * vc-cvs.el (vc-cvs-checkout): Fix bug that broke C-x v ~-style
189 checkouts. 200 checkouts.
190 201
1912000-11-20 Dave Love <fx@gnu.org> 2022000-11-20 Dave Love <fx@gnu.org>
192 203
193 * Makefile.in (DONTCOMPILE): Omit bindings.el. 204 * Makefile.in (DONTCOMPILE): Omit bindings.el.
@@ -204,15 +215,15 @@
204 215
2052000-11-19 Andre Spiegel <spiegel@gnu.org> 2162000-11-19 Andre Spiegel <spiegel@gnu.org>
206 217
207 * vc-rcs.el (vc-rcs-state): Call vc-workfile-unchanged-p only here, 218 * vc-rcs.el (vc-rcs-state): Call vc-workfile-unchanged-p only here,
208 and differentiate according to checkout model. 219 and differentiate according to checkout model.
209 (vc-rcs-fetch-master-state): Don't call vc-workfile-unchanged-p, 220 (vc-rcs-fetch-master-state): Don't call vc-workfile-unchanged-p,
210 since this function is only concerned with master state. 221 since this function is only concerned with master state.
211 222
212 * vc-hooks.el (vc-workfile-unchanged-p, 223 * vc-hooks.el (vc-workfile-unchanged-p,
213 vc-default-workfile-unchanged-p): Moved here from vc.el. 224 vc-default-workfile-unchanged-p): Moved here from vc.el.
214 225
215 * vc.el (vc-workfile-unchanged-p, 226 * vc.el (vc-workfile-unchanged-p,
216 vc-default-workfile-unchanged-p): See above. 227 vc-default-workfile-unchanged-p): See above.
217 228
2182000-11-19 Miles Bader <miles@gnu.org> 2292000-11-19 Miles Bader <miles@gnu.org>
@@ -223,12 +234,12 @@
2232000-11-18 Gerd Moellmann <gerd@gnu.org> 2342000-11-18 Gerd Moellmann <gerd@gnu.org>
224 235
225 * ps-print.el: Update copyright notice. 236 * ps-print.el: Update copyright notice.
226 237
227 * tooltip.el (tooltip-x-offset, tooltip-y-offset): New user-options. 238 * tooltip.el (tooltip-x-offset, tooltip-y-offset): New user-options.
228 (tooltip-show): Use the offsets. 239 (tooltip-show): Use the offsets.
229 240
230 * bindings.el (mode-line-modified): Fix a typo. 241 * bindings.el (mode-line-modified): Fix a typo.
231 (mode-line-toggle-modified, mode-line-widen) 242 (mode-line-toggle-modified, mode-line-widen)
232 (mode-line-abbrev-mode, mode-line-auto-fill-mode): Fix typos. 243 (mode-line-abbrev-mode, mode-line-auto-fill-mode): Fix typos.
233 244
2342000-11-17 Gerd Moellmann <gerd@gnu.org> 2452000-11-17 Gerd Moellmann <gerd@gnu.org>
@@ -255,24 +266,24 @@
255 (vc-default-check-headers): New function. 266 (vc-default-check-headers): New function.
256 267
257 * vc-{cvs,rcs,sccs}.el: Functions reordered. 268 * vc-{cvs,rcs,sccs}.el: Functions reordered.
258 269
259 * vc.el (vc-revert-buffer): Ask for confirmation if file seems 270 * vc.el (vc-revert-buffer): Ask for confirmation if file seems
260 up-to-date. 271 up-to-date.
261 (vc-do-command): In the asynchronous case, output messages only if 272 (vc-do-command): In the asynchronous case, output messages only if
262 the minibuffer is not active. 273 the minibuffer is not active.
263 274
264 * vc-cvs.el (vc-cvs-revert): Use `cvs unedit' only if 275 * vc-cvs.el (vc-cvs-revert): Use `cvs unedit' only if
265 `vc-cvs-use-edit' is on. 276 `vc-cvs-use-edit' is on.
266 (vc-cvs-checkout): When this is used for reverting the workfile, 277 (vc-cvs-checkout): When this is used for reverting the workfile,
267 make a backup of the original contents and revert to that in case 278 make a backup of the original contents and revert to that in case
268 of error. 279 of error.
269 (vc-cvs-print-log, vc-cvs-diff): Use asynchronous mode only for 280 (vc-cvs-print-log, vc-cvs-diff): Use asynchronous mode only for
270 remote repositories. 281 remote repositories.
271 282
272 * vc.el (vc-annotate): Changed handling of prefix arg; now asks 283 * vc.el (vc-annotate): Changed handling of prefix arg; now asks
273 for both version and ratio in the minibuffer. 284 for both version and ratio in the minibuffer.
274 285
275 * vc-cvs.el (vc-cvs-annotate-command): New optional arg VERSION. 286 * vc-cvs.el (vc-cvs-annotate-command): New optional arg VERSION.
276 Use vc-do-command to perform the annotation, not call-process. 287 Use vc-do-command to perform the annotation, not call-process.
277 288
2782000-11-16 Kenichi Handa <handa@etl.go.jp> 2892000-11-16 Kenichi Handa <handa@etl.go.jp>
@@ -291,7 +302,7 @@
291 302
2922000-11-16 Gerd Moellmann <gerd@gnu.org> 3032000-11-16 Gerd Moellmann <gerd@gnu.org>
293 304
294 * net/ange-ftp.el (ange-ftp-file-writable-p) 305 * net/ange-ftp.el (ange-ftp-file-writable-p)
295 (ange-ftp-file-readable-p, ange-ftp-file-executable-p): Bind 306 (ange-ftp-file-readable-p, ange-ftp-file-executable-p): Bind
296 ange-ftp-process-verbose to nil. 307 ange-ftp-process-verbose to nil.
297 308
@@ -445,7 +456,7 @@
445 available, using :enable to (de)activate them. 456 available, using :enable to (de)activate them.
446 (gud-minor-mode-map): New map. Add it to minor-mode-map-alist. 457 (gud-minor-mode-map): New map. Add it to minor-mode-map-alist.
447 (gud-mode-map): New map. 458 (gud-mode-map): New map.
448 (gud-gdb-find-file, gud-sdb-find-file, gud-dbx-find-file) 459 (gud-gdb-find-file, gud-sdb-find-file, gud-dbx-find-file)
449 (gud-xdb-find-file, gud-perldb-find-file, gud-pdb-find-file): 460 (gud-xdb-find-file, gud-perldb-find-file, gud-pdb-find-file):
450 Don't set up gud's menu (it's done by the minor-mode). 461 Don't set up gud's menu (it's done by the minor-mode).
451 (gud-minibuffer-local-map): New. 462 (gud-minibuffer-local-map): New.
@@ -651,7 +662,7 @@
651 (texinfo-update-menu-higher-regexps, texinfo-update-menu-lower-regexps) 662 (texinfo-update-menu-higher-regexps, texinfo-update-menu-lower-regexps)
652 (texinfo-update-the-node, texinfo-sequentially-update-the-node) 663 (texinfo-update-the-node, texinfo-sequentially-update-the-node)
653 (texinfo-update-menu-same-level-regexps): Update. 664 (texinfo-update-menu-same-level-regexps): Update.
654 (texinfo-update-node, texinfo-every-node-update) 665 (texinfo-update-node, texinfo-every-node-update)
655 (texinfo-sequential-node-update): Remove autoload cookie. 666 (texinfo-sequential-node-update): Remove autoload cookie.
656 667
657 * textmodes/texinfo.el (texinfo-section-list): Change majorheading. 668 * textmodes/texinfo.el (texinfo-section-list): Change majorheading.
@@ -680,7 +691,7 @@
680 (make-mode-line-mouse2-map): Rewritten. 691 (make-mode-line-mouse2-map): Rewritten.
681 (mode-line-modified, mode-line-format, minor-mode-alist): Use new 692 (mode-line-modified, mode-line-format, minor-mode-alist): Use new
682 functions so that C-h k can show something with a doc string. 693 functions so that C-h k can show something with a doc string.
683 694
684 * startup.el (fancy-splash-delay): Set to 10 seconds. 695 * startup.el (fancy-splash-delay): Set to 10 seconds.
685 (fancy-splash-max-time): New user-option. 696 (fancy-splash-max-time): New user-option.
686 (fancy-splash-stop-time): New variable. 697 (fancy-splash-stop-time): New variable.
@@ -785,20 +796,20 @@
785 * frame.el (after-setting-font-hook): Rename hooks -> hook. 796 * frame.el (after-setting-font-hook): Rename hooks -> hook.
786 (set-frame-font): Use the new name (and the old for compatibility). 797 (set-frame-font): Use the new name (and the old for compatibility).
787 798
788 * toolbar/tool-bar.el (tool-bar-mode): 799 * toolbar/tool-bar.el (tool-bar-mode):
789 * time.el (display-time-mode): 800 * time.el (display-time-mode):
790 * recentf.el (recentf-mode): 801 * recentf.el (recentf-mode):
791 * paren.el (show-paren-mode): 802 * paren.el (show-paren-mode):
792 * mwheel.el (mouse-wheel-mode): 803 * mwheel.el (mouse-wheel-mode):
793 * msb.el (msb-mode): 804 * msb.el (msb-mode):
794 * jka-compr.el (auto-compression-mode): 805 * jka-compr.el (auto-compression-mode):
795 * image-file.el (auto-image-file-mode): 806 * image-file.el (auto-image-file-mode):
796 * hl-line.el (hl-line-mode): 807 * hl-line.el (hl-line-mode):
797 * delsel.el (delete-selection-mode): 808 * delsel.el (delete-selection-mode):
798 * autoinsert.el (auto-insert-mode): 809 * autoinsert.el (auto-insert-mode):
799 * complete.el (partial-completion-mode): Drop unneeded positional args. 810 * complete.el (partial-completion-mode): Drop unneeded positional args.
800 811
801 * info.el (Info-mode): 812 * info.el (Info-mode):
802 * comint.el (comint-mode): Don't both with make-local-hook. 813 * comint.el (comint-mode): Don't both with make-local-hook.
803 814
804 * log-edit.el (log-edit-menu): New menu. 815 * log-edit.el (log-edit-menu): New menu.
@@ -839,7 +850,7 @@
839 850
8402000-11-02 Miles Bader <miles@gnu.org> 8512000-11-02 Miles Bader <miles@gnu.org>
841 852
842 * calendar/calendar.el (diary-face, calendar-today-face) 853 * calendar/calendar.el (diary-face, calendar-today-face)
843 (holiday-face): Remove dependency on `window-system'. 854 (holiday-face): Remove dependency on `window-system'.
844 855
8452000-11-02 Ken Raeburn <raeburn@gnu.org> 8562000-11-02 Ken Raeburn <raeburn@gnu.org>
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index b7099244be5..f6541832805 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -6,7 +6,7 @@
6;; Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de> 6;; Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de>
7;; Emmanuel Briot <briot@gnat.com> 7;; Emmanuel Briot <briot@gnat.com>
8;; Maintainer: Emmanuel Briot <briot@gnat.com> 8;; Maintainer: Emmanuel Briot <briot@gnat.com>
9;; Ada Core Technologies's version: $Revision: 1.34 $ 9;; Ada Core Technologies's version: $Revision: 1.35 $
10;; Keywords: languages ada 10;; Keywords: languages ada
11 11
12;; This file is not part of GNU Emacs 12;; This file is not part of GNU Emacs
@@ -1179,7 +1179,7 @@ If you use ada-xref.el:
1179 (if ada-clean-buffer-before-saving 1179 (if ada-clean-buffer-before-saving
1180 (progn 1180 (progn
1181 ;; remove all spaces at the end of lines in the whole buffer. 1181 ;; remove all spaces at the end of lines in the whole buffer.
1182 (add-hook 'local-write-file-hooks 'ada-remove-trailing-spaces) 1182 (add-hook 'local-write-file-hooks 'delete-trailing-whitespace)
1183 ;; convert all tabs to the correct number of spaces. 1183 ;; convert all tabs to the correct number of spaces.
1184 (add-hook 'local-write-file-hooks 1184 (add-hook 'local-write-file-hooks
1185 (lambda () (untabify (point-min) (point-max)))))) 1185 (lambda () (untabify (point-min) (point-max))))))
@@ -1975,7 +1975,7 @@ offset."
1975 (current-column)) 1975 (current-column))
1976 tmp-indent (cdr cur-indent)) 1976 tmp-indent (cdr cur-indent))
1977 (setq prev-indent 0 tmp-indent '())) 1977 (setq prev-indent 0 tmp-indent '()))
1978 1978
1979 (while (not (null tmp-indent)) 1979 (while (not (null tmp-indent))
1980 (cond 1980 (cond
1981 ((numberp (car tmp-indent)) 1981 ((numberp (car tmp-indent))
@@ -2025,11 +2025,11 @@ offset."
2025 ;;----------------------------- 2025 ;;-----------------------------
2026 ;; in open parenthesis, but not in parameter-list 2026 ;; in open parenthesis, but not in parameter-list
2027 ;;----------------------------- 2027 ;;-----------------------------
2028 2028
2029 ((and ada-indent-to-open-paren 2029 ((and ada-indent-to-open-paren
2030 (not (ada-in-paramlist-p)) 2030 (not (ada-in-paramlist-p))
2031 (setq column (ada-in-open-paren-p))) 2031 (setq column (ada-in-open-paren-p)))
2032 2032
2033 ;; check if we have something like this (Table_Component_Type => 2033 ;; check if we have something like this (Table_Component_Type =>
2034 ;; Source_File_Record) 2034 ;; Source_File_Record)
2035 (save-excursion 2035 (save-excursion
@@ -2047,22 +2047,22 @@ offset."
2047 2047
2048 ((not (char-after)) 2048 ((not (char-after))
2049 (ada-indent-on-previous-lines nil orgpoint orgpoint)) 2049 (ada-indent-on-previous-lines nil orgpoint orgpoint))
2050 2050
2051 ;;--------------------------- 2051 ;;---------------------------
2052 ;; starting with e 2052 ;; starting with e
2053 ;;--------------------------- 2053 ;;---------------------------
2054 2054
2055 ((= (char-after) ?e) 2055 ((= (char-after) ?e)
2056 (cond 2056 (cond
2057 2057
2058 ;; ------- end ------ 2058 ;; ------- end ------
2059 2059
2060 ((looking-at "end\\>") 2060 ((looking-at "end\\>")
2061 (let ((label 0) 2061 (let ((label 0)
2062 limit) 2062 limit)
2063 (save-excursion 2063 (save-excursion
2064 (ada-goto-matching-start 1) 2064 (ada-goto-matching-start 1)
2065 2065
2066 ;; 2066 ;;
2067 ;; found 'loop' => skip back to 'while' or 'for' 2067 ;; found 'loop' => skip back to 'while' or 'for'
2068 ;; if 'loop' is not on a separate line 2068 ;; if 'loop' is not on a separate line
@@ -2085,18 +2085,18 @@ offset."
2085 (beginning-of-line) 2085 (beginning-of-line)
2086 (if (looking-at ada-named-block-re) 2086 (if (looking-at ada-named-block-re)
2087 (setq label (- ada-label-indent)))))))) 2087 (setq label (- ada-label-indent))))))))
2088 2088
2089 (list (+ (save-excursion (back-to-indentation) (point)) label) 0)))) 2089 (list (+ (save-excursion (back-to-indentation) (point)) label) 0))))
2090 2090
2091 ;; ------ exception ---- 2091 ;; ------ exception ----
2092 2092
2093 ((looking-at "exception\\>") 2093 ((looking-at "exception\\>")
2094 (save-excursion 2094 (save-excursion
2095 (ada-goto-matching-start 1) 2095 (ada-goto-matching-start 1)
2096 (list (save-excursion (back-to-indentation) (point)) 0))) 2096 (list (save-excursion (back-to-indentation) (point)) 0)))
2097 2097
2098 ;; else 2098 ;; else
2099 2099
2100 ((looking-at "else\\>") 2100 ((looking-at "else\\>")
2101 (if (save-excursion (ada-goto-previous-word) 2101 (if (save-excursion (ada-goto-previous-word)
2102 (looking-at "\\<or\\>")) 2102 (looking-at "\\<or\\>"))
@@ -2106,7 +2106,7 @@ offset."
2106 (list (progn (back-to-indentation) (point)) 0)))) 2106 (list (progn (back-to-indentation) (point)) 0))))
2107 2107
2108 ;; elsif 2108 ;; elsif
2109 2109
2110 ((looking-at "elsif\\>") 2110 ((looking-at "elsif\\>")
2111 (save-excursion 2111 (save-excursion
2112 (ada-goto-matching-start 1 nil t) 2112 (ada-goto-matching-start 1 nil t)
@@ -2117,7 +2117,7 @@ offset."
2117 ;;--------------------------- 2117 ;;---------------------------
2118 ;; starting with w (when) 2118 ;; starting with w (when)
2119 ;;--------------------------- 2119 ;;---------------------------
2120 2120
2121 ((and (= (char-after) ?w) 2121 ((and (= (char-after) ?w)
2122 (looking-at "when\\>")) 2122 (looking-at "when\\>"))
2123 (save-excursion 2123 (save-excursion
@@ -2144,7 +2144,7 @@ offset."
2144 ;;--------------------------- 2144 ;;---------------------------
2145 ;; starting with l (loop) 2145 ;; starting with l (loop)
2146 ;;--------------------------- 2146 ;;---------------------------
2147 2147
2148 ((and (= (char-after) ?l) 2148 ((and (= (char-after) ?l)
2149 (looking-at "loop\\>")) 2149 (looking-at "loop\\>"))
2150 (setq pos (point)) 2150 (setq pos (point))
@@ -2177,7 +2177,7 @@ offset."
2177 2177
2178 ((and (= (char-after) ?i) 2178 ((and (= (char-after) ?i)
2179 (looking-at "is\\>")) 2179 (looking-at "is\\>"))
2180 2180
2181 (if (and ada-indent-is-separate 2181 (if (and ada-indent-is-separate
2182 (save-excursion 2182 (save-excursion
2183 (goto-char (match-end 0)) 2183 (goto-char (match-end 0))
@@ -2200,7 +2200,7 @@ offset."
2200 (cond 2200 (cond
2201 2201
2202 ;; ----- record ------ 2202 ;; ----- record ------
2203 2203
2204 ((looking-at "record\\>") 2204 ((looking-at "record\\>")
2205 (save-excursion 2205 (save-excursion
2206 (ada-search-ignore-string-comment 2206 (ada-search-ignore-string-comment
@@ -2223,12 +2223,12 @@ offset."
2223 (= (char-after (car pos)) ?r)) 2223 (= (char-after (car pos)) ?r))
2224 (goto-char (car pos))) 2224 (goto-char (car pos)))
2225 (setq var 'ada-indent-renames))) 2225 (setq var 'ada-indent-renames)))
2226 2226
2227 (forward-comment -1000) 2227 (forward-comment -1000)
2228 (if (= (char-before) ?\)) 2228 (if (= (char-before) ?\))
2229 (forward-sexp -1) 2229 (forward-sexp -1)
2230 (forward-word -1)) 2230 (forward-word -1))
2231 2231
2232 ;; If there is a parameter list, and we have a function declaration 2232 ;; If there is a parameter list, and we have a function declaration
2233 ;; or a access to subprogram declaration 2233 ;; or a access to subprogram declaration
2234 (let ((num-back 1)) 2234 (let ((num-back 1))
@@ -2241,13 +2241,13 @@ offset."
2241 (backward-word 1) 2241 (backward-word 1)
2242 (setq num-back 2) 2242 (setq num-back 2)
2243 (looking-at "function\\>"))))) 2243 (looking-at "function\\>")))))
2244 2244
2245 ;; The indentation depends of the value of ada-indent-return 2245 ;; The indentation depends of the value of ada-indent-return
2246 (if (<= (eval var) 0) 2246 (if (<= (eval var) 0)
2247 (list (point) (list '- var)) 2247 (list (point) (list '- var))
2248 (list (progn (backward-word num-back) (point)) 2248 (list (progn (backward-word num-back) (point))
2249 var)) 2249 var))
2250 2250
2251 ;; Else there is no parameter list, but we have a function 2251 ;; Else there is no parameter list, but we have a function
2252 ;; Only do something special if the user want to indent 2252 ;; Only do something special if the user want to indent
2253 ;; relative to the "function" keyword 2253 ;; relative to the "function" keyword
@@ -2255,11 +2255,11 @@ offset."
2255 (save-excursion (forward-word -1) 2255 (save-excursion (forward-word -1)
2256 (looking-at "function\\>"))) 2256 (looking-at "function\\>")))
2257 (list (progn (forward-word -1) (point)) var) 2257 (list (progn (forward-word -1) (point)) var)
2258 2258
2259 ;; Else... 2259 ;; Else...
2260 (ada-indent-on-previous-lines nil orgpoint orgpoint))))))) 2260 (ada-indent-on-previous-lines nil orgpoint orgpoint)))))))
2261 )) 2261 ))
2262 2262
2263 ;;-------------------------------- 2263 ;;--------------------------------
2264 ;; starting with 'o' or 'p' 2264 ;; starting with 'o' or 'p'
2265 ;; 'or' as statement-start 2265 ;; 'or' as statement-start
@@ -2295,7 +2295,7 @@ offset."
2295 ;; We must use a search-forward (even if the code is more complex), 2295 ;; We must use a search-forward (even if the code is more complex),
2296 ;; since we want to find the beginning of the comment. 2296 ;; since we want to find the beginning of the comment.
2297 (let (pos) 2297 (let (pos)
2298 2298
2299 (if (and ada-indent-align-comments 2299 (if (and ada-indent-align-comments
2300 (save-excursion 2300 (save-excursion
2301 (forward-line -1) 2301 (forward-line -1)
@@ -2309,7 +2309,7 @@ offset."
2309 (setq pos (point)))) 2309 (setq pos (point))))
2310 pos)) 2310 pos))
2311 (list (- pos 2) 0) 2311 (list (- pos 2) 0)
2312 2312
2313 ;; Else always on previous line 2313 ;; Else always on previous line
2314 (ada-indent-on-previous-lines nil orgpoint orgpoint))) 2314 (ada-indent-on-previous-lines nil orgpoint orgpoint)))
2315 2315
@@ -2338,7 +2338,7 @@ offset."
2338 ;;--------------------------------- 2338 ;;---------------------------------
2339 ;; new/abstract/separate 2339 ;; new/abstract/separate
2340 ;;--------------------------------- 2340 ;;---------------------------------
2341 2341
2342 ((looking-at "\\(new\\|abstract\\|separate\\)\\>") 2342 ((looking-at "\\(new\\|abstract\\|separate\\)\\>")
2343 (ada-indent-on-previous-lines nil orgpoint orgpoint)) 2343 (ada-indent-on-previous-lines nil orgpoint orgpoint))
2344 2344
@@ -2355,20 +2355,20 @@ offset."
2355 (while (and (not found) 2355 (while (and (not found)
2356 (ada-search-ignore-string-comment 2356 (ada-search-ignore-string-comment
2357 "\\<\\(generic\\|end\\|begin\\|package\\|procedure\\|function\\)\\>" t)) 2357 "\\<\\(generic\\|end\\|begin\\|package\\|procedure\\|function\\)\\>" t))
2358 2358
2359 ;; avoid "with procedure"... in generic parts 2359 ;; avoid "with procedure"... in generic parts
2360 (save-excursion 2360 (save-excursion
2361 (forward-word -1) 2361 (forward-word -1)
2362 (setq found (not (looking-at "with")))))) 2362 (setq found (not (looking-at "with"))))))
2363 2363
2364 (if (looking-at "generic") 2364 (if (looking-at "generic")
2365 (list (progn (back-to-indentation) (point)) 0) 2365 (list (progn (back-to-indentation) (point)) 0)
2366 (ada-indent-on-previous-lines nil orgpoint orgpoint)))) 2366 (ada-indent-on-previous-lines nil orgpoint orgpoint))))
2367 2367
2368 ;;--------------------------------- 2368 ;;---------------------------------
2369 ;; label 2369 ;; label
2370 ;;--------------------------------- 2370 ;;---------------------------------
2371 2371
2372 ((looking-at "\\(\\sw\\|_\\)+[ \t\n]*:[^=]") 2372 ((looking-at "\\(\\sw\\|_\\)+[ \t\n]*:[^=]")
2373 (if (ada-in-decl-p) 2373 (if (ada-in-decl-p)
2374 (ada-indent-on-previous-lines nil orgpoint orgpoint) 2374 (ada-indent-on-previous-lines nil orgpoint orgpoint)
@@ -2979,7 +2979,7 @@ open parenthesis."
2979 2979
2980 (setq match-dat (ada-search-prev-end-stmt)) 2980 (setq match-dat (ada-search-prev-end-stmt))
2981 (if match-dat 2981 (if match-dat
2982 2982
2983 ;; 2983 ;;
2984 ;; found a previous end-statement => check if anything follows 2984 ;; found a previous end-statement => check if anything follows
2985 ;; 2985 ;;
@@ -3000,7 +3000,7 @@ open parenthesis."
3000 (goto-char (cdr match-dat))) 3000 (goto-char (cdr match-dat)))
3001 (ada-goto-next-non-ws) 3001 (ada-goto-next-non-ws)
3002 )) 3002 ))
3003 3003
3004 ;; 3004 ;;
3005 ;; no previous end-statement => we are at the beginning of the 3005 ;; no previous end-statement => we are at the beginning of the
3006 ;; accessible part of the buffer 3006 ;; accessible part of the buffer
@@ -3248,7 +3248,7 @@ If NOERROR is non-nil, it only returns nil if no match was found."
3248 (progn 3248 (progn
3249 (setq nest-count (1- nest-count)) 3249 (setq nest-count (1- nest-count))
3250 (setq first nil))))) 3250 (setq first nil)))))
3251 3251
3252 ;; 3252 ;;
3253 ((looking-at "declare\\|generic") 3253 ((looking-at "declare\\|generic")
3254 (setq nest-count (1- nest-count)) 3254 (setq nest-count (1- nest-count))
@@ -3639,7 +3639,7 @@ Returns nil if the private is part of the package name, as in
3639 ;; Make sure this is the start of a private section (ie after 3639 ;; Make sure this is the start of a private section (ie after
3640 ;; a semicolon or just after the package declaration, but not 3640 ;; a semicolon or just after the package declaration, but not
3641 ;; after a 'type ... is private' or 'is new ... with private' 3641 ;; after a 'type ... is private' or 'is new ... with private'
3642 (progn (forward-comment -1000) 3642 (progn (forward-comment -1000)
3643 (or (= (char-before) ?\;) 3643 (or (= (char-before) ?\;)
3644 (and (forward-word -3) 3644 (and (forward-word -3)
3645 (looking-at "\\<package\\>"))))))) 3645 (looking-at "\\<package\\>")))))))
@@ -3775,17 +3775,6 @@ of the region. Otherwise, operates only on the current line."
3775;; -- Miscellaneous 3775;; -- Miscellaneous
3776;; ------------------------------------------------------------ 3776;; ------------------------------------------------------------
3777 3777
3778(defun ada-remove-trailing-spaces ()
3779 "Remove trailing spaces in the whole buffer."
3780 (interactive)
3781 (save-match-data
3782 (save-excursion
3783 (save-restriction
3784 (widen)
3785 (goto-char (point-min))
3786 (while (re-search-forward "[ \t]+$" (point-max) t)
3787 (replace-match "" nil nil))))))
3788
3789(defun ada-gnat-style () 3778(defun ada-gnat-style ()
3790 "Clean up comments, `(' and `,' for GNAT style checking switch." 3779 "Clean up comments, `(' and `,' for GNAT style checking switch."
3791 (interactive) 3780 (interactive)
@@ -4213,7 +4202,7 @@ The paragraph is indented on the first line."
4213 (goto-char (+ from 2)) 4202 (goto-char (+ from 2))
4214 (while (re-search-forward "^-- *" to t) 4203 (while (re-search-forward "^-- *" to t)
4215 (replace-match " ")) 4204 (replace-match " "))
4216 4205
4217 (goto-char (1- to)) 4206 (goto-char (1- to))
4218 (setq to (point-marker)) 4207 (setq to (point-marker))
4219 4208
@@ -4302,11 +4291,11 @@ otherwise."
4302 (setq is-body t 4291 (setq is-body t
4303 name (match-string 1 name))) 4292 name (match-string 1 name)))
4304 (setq suffixes (cdr suffixes))))) 4293 (setq suffixes (cdr suffixes)))))
4305 4294
4306 ;; If this wasn't in either list, return name itself 4295 ;; If this wasn't in either list, return name itself
4307 (if (not (or is-spec is-body)) 4296 (if (not (or is-spec is-body))
4308 name 4297 name
4309 4298
4310 ;; Else find the other possible names 4299 ;; Else find the other possible names
4311 (if is-spec 4300 (if is-spec
4312 (setq suffixes ada-body-suffixes) 4301 (setq suffixes ada-body-suffixes)
diff --git a/lisp/simple.el b/lisp/simple.el
index 3a916b843e1..47651b4b147 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -47,7 +47,7 @@
47Other major modes are defined by comparison with this one." 47Other major modes are defined by comparison with this one."
48 (interactive) 48 (interactive)
49 (kill-all-local-variables)) 49 (kill-all-local-variables))
50 50
51;; Making and deleting lines. 51;; Making and deleting lines.
52 52
53(defun newline (&optional arg) 53(defun newline (&optional arg)
@@ -132,7 +132,7 @@ In Auto Fill mode, if no numeric arg, break the preceding line if it's long."
132 (if (and (listp sticky) (not (memq 'hard sticky))) 132 (if (and (listp sticky) (not (memq 'hard sticky)))
133 (put-text-property from (point) 'rear-nonsticky 133 (put-text-property from (point) 'rear-nonsticky
134 (cons 'hard sticky))))) 134 (cons 'hard sticky)))))
135 135
136(defun open-line (arg) 136(defun open-line (arg)
137 "Insert a newline and leave point before it. 137 "Insert a newline and leave point before it.
138If there is a fill prefix and/or a left-margin, insert them on the new line 138If there is a fill prefix and/or a left-margin, insert them on the new line
@@ -184,7 +184,7 @@ With argument, join this line to following line."
184 (fixup-whitespace)))) 184 (fixup-whitespace))))
185 185
186(defalias 'join-line #'delete-indentation) ; easier to find 186(defalias 'join-line #'delete-indentation) ; easier to find
187 187
188(defun delete-blank-lines () 188(defun delete-blank-lines ()
189 "On blank line, delete all surrounding blank lines, leaving just one. 189 "On blank line, delete all surrounding blank lines, leaving just one.
190On isolated blank line, delete that one. 190On isolated blank line, delete that one.
@@ -225,6 +225,17 @@ On nonblank line, delete any immediately following blank lines."
225 (if (looking-at "^[ \t]*\n\\'") 225 (if (looking-at "^[ \t]*\n\\'")
226 (delete-region (point) (point-max))))) 226 (delete-region (point) (point-max)))))
227 227
228(defun delete-trailing-whitespace ()
229 "Delete all the trailing whitespace across the current buffer.
230All whitespace after the last non-whitespace character in a line is deleted.
231This respects narrowing, created by \\[narrow-to-region] and friends."
232 (interactive "*")
233 (save-match-data
234 (save-excursion
235 (goto-char (point-min))
236 (while (re-search-forward "\\s-+$" nil t)
237 (delete-region (match-beginning 0) (match-end 0))))))
238
228(defun newline-and-indent () 239(defun newline-and-indent ()
229 "Insert a newline, then indent according to major mode. 240 "Insert a newline, then indent according to major mode.
230Indentation is done using the value of `indent-line-function'. 241Indentation is done using the value of `indent-line-function'.
@@ -249,7 +260,7 @@ column specified by the function `current-left-margin'."
249 (indent-according-to-mode)) 260 (indent-according-to-mode))
250 (newline) 261 (newline)
251 (indent-according-to-mode)) 262 (indent-according-to-mode))
252 263
253(defun quoted-insert (arg) 264(defun quoted-insert (arg)
254 "Read next input character and insert it. 265 "Read next input character and insert it.
255This is useful for inserting control characters. 266This is useful for inserting control characters.
@@ -287,7 +298,7 @@ useful for editing binary files."
287 (while (> arg 0) 298 (while (> arg 0)
288 (insert-and-inherit char) 299 (insert-and-inherit char)
289 (setq arg (1- arg))))) 300 (setq arg (1- arg)))))
290 301
291(defun forward-to-indentation (arg) 302(defun forward-to-indentation (arg)
292 "Move forward ARG lines and position at first nonblank character." 303 "Move forward ARG lines and position at first nonblank character."
293 (interactive "p") 304 (interactive "p")
@@ -333,7 +344,7 @@ Leave one space or none, according to the context."
333 (insert ? )) 344 (insert ? ))
334 (delete-region (point) (progn (skip-chars-forward " \t") (point)))) 345 (delete-region (point) (progn (skip-chars-forward " \t") (point))))
335 346
336 347
337(defun beginning-of-buffer (&optional arg) 348(defun beginning-of-buffer (&optional arg)
338 "Move point to the beginning of the buffer; leave mark at previous position. 349 "Move point to the beginning of the buffer; leave mark at previous position.
339With arg N, put point N/10 of the way from the beginning. 350With arg N, put point N/10 of the way from the beginning.
@@ -395,7 +406,7 @@ that uses or sets the mark."
395 (push-mark (point-max) nil t) 406 (push-mark (point-max) nil t)
396 (goto-char (point-min))) 407 (goto-char (point-min)))
397 408
398 409
399;; Counting lines, one way or another. 410;; Counting lines, one way or another.
400 411
401(defun goto-line (arg) 412(defun goto-line (arg)
@@ -455,7 +466,7 @@ and the greater of them is not at the start of a line."
455 (1+ done) 466 (1+ done)
456 done))) 467 done)))
457 (- (buffer-size) (forward-line (buffer-size))))))) 468 (- (buffer-size) (forward-line (buffer-size)))))))
458 469
459(defun what-cursor-position (&optional detail) 470(defun what-cursor-position (&optional detail)
460 "Print info on cursor position (on screen and within buffer). 471 "Print info on cursor position (on screen and within buffer).
461Also describe the character after point, and give its character code 472Also describe the character after point, and give its character code
@@ -520,7 +531,7 @@ in *Help* buffer. See also the command `describe-char-after'."
520 (single-key-description char) 531 (single-key-description char)
521 (buffer-substring-no-properties (point) (1+ (point)))) 532 (buffer-substring-no-properties (point) (1+ (point))))
522 encoding-msg pos total percent col hscroll)))))) 533 encoding-msg pos total percent col hscroll))))))
523 534
524(defvar read-expression-map 535(defvar read-expression-map
525 (let ((m (make-sparse-keymap))) 536 (let ((m (make-sparse-keymap)))
526 (define-key m "\M-\t" 'lisp-complete-symbol) 537 (define-key m "\M-\t" 'lisp-complete-symbol)
@@ -560,7 +571,7 @@ Value is also consed on to front of the variable `values'."
560 nil read-expression-map t 571 nil read-expression-map t
561 'read-expression-history) 572 'read-expression-history)
562 current-prefix-arg)) 573 current-prefix-arg))
563 574
564 (if (null eval-expression-debug-on-error) 575 (if (null eval-expression-debug-on-error)
565 (setq values (cons (eval eval-expression-arg) values)) 576 (setq values (cons (eval eval-expression-arg) values))
566 (let ((old-value (make-symbol "t")) new-value) 577 (let ((old-value (make-symbol "t")) new-value)
@@ -573,7 +584,7 @@ Value is also consed on to front of the variable `values'."
573 ;; propagate that change to the global binding. 584 ;; propagate that change to the global binding.
574 (unless (eq old-value new-value) 585 (unless (eq old-value new-value)
575 (setq debug-on-error new-value)))) 586 (setq debug-on-error new-value))))
576 587
577 (let ((print-length eval-expression-print-length) 588 (let ((print-length eval-expression-print-length)
578 (print-level eval-expression-print-level)) 589 (print-level eval-expression-print-level))
579 (prin1 (car values) 590 (prin1 (car values)
@@ -631,7 +642,7 @@ to get different commands to edit and resubmit."
631 (setq command-history (cons newcmd command-history))) 642 (setq command-history (cons newcmd command-history)))
632 (eval newcmd)) 643 (eval newcmd))
633 (ding)))) 644 (ding))))
634 645
635(defvar minibuffer-history nil 646(defvar minibuffer-history nil
636 "Default minibuffer history list. 647 "Default minibuffer history list.
637This is used for all minibuffer input 648This is used for all minibuffer input
@@ -874,7 +885,7 @@ Return 0 if current buffer is not a mini-buffer."
874Return 0 if current buffer is not a mini-buffer." 885Return 0 if current buffer is not a mini-buffer."
875 (field-beginning (point-max))) 886 (field-beginning (point-max)))
876 887
877 888
878;Put this on C-x u, so we can force that rather than C-_ into startup msg 889;Put this on C-x u, so we can force that rather than C-_ into startup msg
879(defalias 'advertised-undo 'undo) 890(defalias 'advertised-undo 'undo)
880 891
@@ -1096,7 +1107,7 @@ is not *inside* the region START...END."
1096 (t 1107 (t
1097 '(0 . 0))) 1108 '(0 . 0)))
1098 '(0 . 0))) 1109 '(0 . 0)))
1099 1110
1100(defvar shell-command-history nil 1111(defvar shell-command-history nil
1101 "History list for some commands that read shell commands.") 1112 "History list for some commands that read shell commands.")
1102 1113
@@ -1227,7 +1238,7 @@ specifies the value of ERROR-BUFFER."
1227 )) 1238 ))
1228 (shell-command-on-region (point) (point) command 1239 (shell-command-on-region (point) (point) command
1229 output-buffer nil error-buffer))))))) 1240 output-buffer nil error-buffer)))))))
1230 1241
1231(defun display-message-or-buffer (message 1242(defun display-message-or-buffer (message
1232 &optional buffer-name not-this-window frame) 1243 &optional buffer-name not-this-window frame)
1233 "Display MESSAGE in the echo area if possible, otherwise in a pop-up buffer. 1244 "Display MESSAGE in the echo area if possible, otherwise in a pop-up buffer.
@@ -1456,7 +1467,7 @@ specifies the value of ERROR-BUFFER."
1456 (with-current-buffer 1467 (with-current-buffer
1457 standard-output 1468 standard-output
1458 (call-process shell-file-name nil t nil shell-command-switch command)))) 1469 (call-process shell-file-name nil t nil shell-command-switch command))))
1459 1470
1460(defvar universal-argument-map 1471(defvar universal-argument-map
1461 (let ((map (make-sparse-keymap))) 1472 (let ((map (make-sparse-keymap)))
1462 (define-key map [t] 'universal-argument-other-key) 1473 (define-key map [t] 'universal-argument-other-key)
@@ -1572,7 +1583,7 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]."
1572 unread-command-events))) 1583 unread-command-events)))
1573 (reset-this-command-lengths) 1584 (reset-this-command-lengths)
1574 (setq overriding-terminal-local-map nil)) 1585 (setq overriding-terminal-local-map nil))
1575 1586
1576;;;; Window system cut and paste hooks. 1587;;;; Window system cut and paste hooks.
1577 1588
1578(defvar interprogram-cut-function nil 1589(defvar interprogram-cut-function nil
@@ -1611,7 +1622,7 @@ current string, it is probably good enough to return nil if the string
1611is equal (according to `string=') to the last text Emacs provided.") 1622is equal (according to `string=') to the last text Emacs provided.")
1612 1623
1613 1624
1614 1625
1615;;;; The kill ring data structure. 1626;;;; The kill ring data structure.
1616 1627
1617(defvar kill-ring nil 1628(defvar kill-ring nil
@@ -1686,7 +1697,7 @@ yanking point; just return the Nth kill forward."
1686 (car ARGth-kill-element))))) 1697 (car ARGth-kill-element)))))
1687 1698
1688 1699
1689 1700
1690;;;; Commands for manipulating the kill ring. 1701;;;; Commands for manipulating the kill ring.
1691 1702
1692(defcustom kill-read-only-ok nil 1703(defcustom kill-read-only-ok nil
@@ -1804,7 +1815,7 @@ The argument is used for internal purposes; do not supply one."
1804 (setq this-command 'kill-region) 1815 (setq this-command 'kill-region)
1805 (message "If the next command is a kill, it will append")) 1816 (message "If the next command is a kill, it will append"))
1806 (setq last-command 'kill-region))) 1817 (setq last-command 'kill-region)))
1807 1818
1808;; Yanking. 1819;; Yanking.
1809 1820
1810(defun yank-pop (arg) 1821(defun yank-pop (arg)
@@ -1875,7 +1886,7 @@ See also the command \\[yank-pop]."
1875With argument, rotate that many kills forward (or backward, if negative)." 1886With argument, rotate that many kills forward (or backward, if negative)."
1876 (interactive "p") 1887 (interactive "p")
1877 (current-kill arg)) 1888 (current-kill arg))
1878 1889
1879;; Some kill commands. 1890;; Some kill commands.
1880 1891
1881;; Internal subroutine of delete-char 1892;; Internal subroutine of delete-char
@@ -1938,7 +1949,7 @@ Goes backward if ARG is negative; error if CHAR not found."
1938 (search-forward (char-to-string char) nil nil arg) 1949 (search-forward (char-to-string char) nil nil arg)
1939; (goto-char (if (> arg 0) (1- (point)) (1+ (point)))) 1950; (goto-char (if (> arg 0) (1- (point)) (1+ (point))))
1940 (point)))) 1951 (point))))
1941 1952
1942;; kill-line and its subroutines. 1953;; kill-line and its subroutines.
1943 1954
1944(defcustom kill-whole-line nil 1955(defcustom kill-whole-line nil
@@ -2048,7 +2059,7 @@ If ARG is zero, move to the beginning of the current line."
2048 (goto-char (next-single-property-change (point) 'invisible)) 2059 (goto-char (next-single-property-change (point) 'invisible))
2049 (goto-char (next-overlay-change (point)))) 2060 (goto-char (next-overlay-change (point))))
2050 (end-of-line))) 2061 (end-of-line)))
2051 2062
2052(defun insert-buffer (buffer) 2063(defun insert-buffer (buffer)
2053 "Insert after point the contents of BUFFER. 2064 "Insert after point the contents of BUFFER.
2054Puts mark after the inserted text. 2065Puts mark after the inserted text.
@@ -2130,7 +2141,7 @@ START and END specify the portion of the current buffer to be copied."
2130 (erase-buffer) 2141 (erase-buffer)
2131 (save-excursion 2142 (save-excursion
2132 (insert-buffer-substring oldbuf start end))))) 2143 (insert-buffer-substring oldbuf start end)))))
2133 2144
2134(put 'mark-inactive 'error-conditions '(mark-inactive error)) 2145(put 'mark-inactive 'error-conditions '(mark-inactive error))
2135(put 'mark-inactive 'error-message "The mark is not active now") 2146(put 'mark-inactive 'error-message "The mark is not active now")
2136 2147
@@ -2323,7 +2334,7 @@ incremental search, \\[beginning-of-buffer], and \\[end-of-buffer]."
2323 (widen)) 2334 (widen))
2324 (goto-char position) 2335 (goto-char position)
2325 (switch-to-buffer buffer))) 2336 (switch-to-buffer buffer)))
2326 2337
2327(defcustom next-line-add-newlines t 2338(defcustom next-line-add-newlines t
2328 "*If non-nil, `next-line' inserts newline to avoid `end of buffer' error." 2339 "*If non-nil, `next-line' inserts newline to avoid `end of buffer' error."
2329 :type 'boolean 2340 :type 'boolean
@@ -2387,7 +2398,7 @@ to use and more reliable (no dependence on goal column, etc.)."
2387 ((beginning-of-buffer end-of-buffer) (ding))) 2398 ((beginning-of-buffer end-of-buffer) (ding)))
2388 (line-move (- arg))) 2399 (line-move (- arg)))
2389 nil) 2400 nil)
2390 2401
2391(defcustom track-eol nil 2402(defcustom track-eol nil
2392 "*Non-nil means vertical motion starting at end of line keeps to ends of lines. 2403 "*Non-nil means vertical motion starting at end of line keeps to ends of lines.
2393This means moving to the end of each line moved onto. 2404This means moving to the end of each line moved onto.
@@ -2549,7 +2560,7 @@ The goal column is stored in the variable `goal-column'."
2549 "Goal column %d (use \\[set-goal-column] with an arg to unset it)") 2560 "Goal column %d (use \\[set-goal-column] with an arg to unset it)")
2550 goal-column)) 2561 goal-column))
2551 nil) 2562 nil)
2552 2563
2553 2564
2554(defun scroll-other-window-down (lines) 2565(defun scroll-other-window-down (lines)
2555 "Scroll the \"other window\" down. 2566 "Scroll the \"other window\" down.
@@ -2595,7 +2606,7 @@ With arg N, put point N/10 of the way from the true end."
2595 (end-of-buffer arg) 2606 (end-of-buffer arg)
2596 (recenter '(t))) 2607 (recenter '(t)))
2597 (select-window orig-window)))) 2608 (select-window orig-window))))
2598 2609
2599(defun transpose-chars (arg) 2610(defun transpose-chars (arg)
2600 "Interchange characters around point, moving forward one character. 2611 "Interchange characters around point, moving forward one character.
2601With prefix arg ARG, effect is to take character before point 2612With prefix arg ARG, effect is to take character before point
@@ -2702,7 +2713,7 @@ With argument 0, interchanges line point is in with line mark is in."
2702 (+ transpose-subr-start1 (- len1 len2)))) 2713 (+ transpose-subr-start1 (- len1 len2))))
2703 (delete-region (point) (+ (point) len1)) 2714 (delete-region (point) (+ (point) len1))
2704 (insert word2))) 2715 (insert word2)))
2705 2716
2706(defun backward-word (arg) 2717(defun backward-word (arg)
2707 "Move backward until encountering the end of a word. 2718 "Move backward until encountering the end of a word.
2708With argument, do this that many times." 2719With argument, do this that many times."
@@ -2762,7 +2773,7 @@ or adjacent to a word."
2762 (setq start (point))) 2773 (setq start (point)))
2763 (buffer-substring-no-properties start end))) 2774 (buffer-substring-no-properties start end)))
2764 (buffer-substring-no-properties start end))))) 2775 (buffer-substring-no-properties start end)))))
2765 2776
2766(defcustom fill-prefix nil 2777(defcustom fill-prefix nil
2767 "*String for filling to insert at front of new line, or nil for none. 2778 "*String for filling to insert at front of new line, or nil for none.
2768Setting this variable automatically makes it local to the current buffer." 2779Setting this variable automatically makes it local to the current buffer."
@@ -2974,7 +2985,7 @@ Just \\[universal-argument] as argument means to use the current column."
2974 (error "set-fill-column requires an explicit argument") 2985 (error "set-fill-column requires an explicit argument")
2975 (message "Fill column set to %d (was %d)" arg fill-column) 2986 (message "Fill column set to %d (was %d)" arg fill-column)
2976 (setq fill-column arg))) 2987 (setq fill-column arg)))
2977 2988
2978(defun set-selective-display (arg) 2989(defun set-selective-display (arg)
2979 "Set `selective-display' to ARG; clear it if no arg. 2990 "Set `selective-display' to ARG; clear it if no arg.
2980When the value of `selective-display' is a number > 0, 2991When the value of `selective-display' is a number > 0,
@@ -3038,7 +3049,7 @@ specialization of overwrite-mode, entered by setting the
3038 (> (prefix-numeric-value arg) 0)) 3049 (> (prefix-numeric-value arg) 0))
3039 'overwrite-mode-binary)) 3050 'overwrite-mode-binary))
3040 (force-mode-line-update)) 3051 (force-mode-line-update))
3041 3052
3042(defcustom line-number-mode t 3053(defcustom line-number-mode t
3043 "*Non-nil means display line number in mode line." 3054 "*Non-nil means display line number in mode line."
3044 :type 'boolean 3055 :type 'boolean
@@ -3251,7 +3262,7 @@ use either M-x customize or the function `set-input-mode'."
3251 :version "21.1" 3262 :version "21.1"
3252 :link '(custom-manual "Single-Byte European Support") 3263 :link '(custom-manual "Single-Byte European Support")
3253 :group 'keyboard) 3264 :group 'keyboard)
3254 3265
3255(defcustom read-mail-command 'rmail 3266(defcustom read-mail-command 'rmail
3256 "*Your preference for a mail reading package. 3267 "*Your preference for a mail reading package.
3257This is used by some keybindings which support reading mail. 3268This is used by some keybindings which support reading mail.
@@ -3427,7 +3438,7 @@ Each action has the form (FUNCTION . ARGS)."
3427 (list nil nil nil current-prefix-arg)) 3438 (list nil nil nil current-prefix-arg))
3428 (compose-mail to subject other-headers continue 3439 (compose-mail to subject other-headers continue
3429 'switch-to-buffer-other-frame yank-action send-actions)) 3440 'switch-to-buffer-other-frame yank-action send-actions))
3430 3441
3431(defvar set-variable-value-history nil 3442(defvar set-variable-value-history nil
3432 "History of values entered with `set-variable'.") 3443 "History of values entered with `set-variable'.")
3433 3444
@@ -3471,7 +3482,7 @@ in the definition is used to check that VALUE is valid."
3471 (error "Value `%S' does not match type %S of %S" 3482 (error "Value `%S' does not match type %S of %S"
3472 val (car type) var)))) 3483 val (car type) var))))
3473 (set var val)) 3484 (set var val))
3474 3485
3475;; Define the major mode for lists of completions. 3486;; Define the major mode for lists of completions.
3476 3487
3477(defvar completion-list-mode-map nil 3488(defvar completion-list-mode-map nil
@@ -3713,7 +3724,7 @@ select the completion near point.\n\n")))))
3713 (goto-char (point-min)) 3724 (goto-char (point-min))
3714 (search-forward "\n\n") 3725 (search-forward "\n\n")
3715 (forward-line 1)))) 3726 (forward-line 1))))
3716 3727
3717;; Support keyboard commands to turn on various modifiers. 3728;; Support keyboard commands to turn on various modifiers.
3718 3729
3719;; These functions -- which are not commands -- each add one modifier 3730;; These functions -- which are not commands -- each add one modifier
@@ -3779,7 +3790,7 @@ PREFIX is the string that represents this modifier in an event type symbol."
3779(define-key function-key-map [?\C-x ?@ ?a] 'event-apply-alt-modifier) 3790(define-key function-key-map [?\C-x ?@ ?a] 'event-apply-alt-modifier)
3780(define-key function-key-map [?\C-x ?@ ?S] 'event-apply-shift-modifier) 3791(define-key function-key-map [?\C-x ?@ ?S] 'event-apply-shift-modifier)
3781(define-key function-key-map [?\C-x ?@ ?c] 'event-apply-control-modifier) 3792(define-key function-key-map [?\C-x ?@ ?c] 'event-apply-control-modifier)
3782 3793
3783;;;; Keypad support. 3794;;;; Keypad support.
3784 3795
3785;;; Make the keypad keys act like ordinary typing keys. If people add 3796;;; Make the keypad keys act like ordinary typing keys. If people add
@@ -3944,7 +3955,7 @@ the front of the list of recently selected ones."
3944 3955
3945(define-key ctl-x-4-map "c" 'clone-indirect-buffer-other-window) 3956(define-key ctl-x-4-map "c" 'clone-indirect-buffer-other-window)
3946 3957
3947 3958
3948;;; Syntax stuff. 3959;;; Syntax stuff.
3949 3960
3950(defconst syntax-code-table 3961(defconst syntax-code-table
@@ -3972,12 +3983,12 @@ corresponing syntax code as it is stored in a syntax cell, and
3972can be used as value of a `syntax-table' property. 3983can be used as value of a `syntax-table' property.
3973DESCRIPTION is the descriptive string for the syntax.") 3984DESCRIPTION is the descriptive string for the syntax.")
3974 3985
3975 3986
3976;;; Misc 3987;;; Misc
3977 3988
3978(defun byte-compiling-files-p () 3989(defun byte-compiling-files-p ()
3979 "Return t if currently byte-compiling files." 3990 "Return t if currently byte-compiling files."
3980 (and (boundp 'byte-compile-current-file) 3991 (and (boundp 'byte-compile-current-file)
3981 (stringp byte-compile-current-file))) 3992 (stringp byte-compile-current-file)))
3982 3993
3983;;; simple.el ends here 3994;;; simple.el ends here
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el
index 1c6fb384063..05e5f98db91 100644
--- a/lisp/textmodes/picture.el
+++ b/lisp/textmodes/picture.el
@@ -24,7 +24,7 @@
24 24
25;;; Commentary: 25;;; Commentary:
26 26
27;; This code provides the picture-mode commands documented in the Emacs 27;; This code provides the picture-mode commands documented in the Emacs
28;; manual. The screen is treated as a semi-infinite quarter-plane with 28;; manual. The screen is treated as a semi-infinite quarter-plane with
29;; support for rectangle operations and `etch-a-sketch' character 29;; support for rectangle operations and `etch-a-sketch' character
30;; insertion in any of eight directions. 30;; insertion in any of eight directions.
@@ -735,7 +735,7 @@ With no argument strips whitespace from end of every line in Picture buffer
735 (interactive "P") 735 (interactive "P")
736 (if (not (eq major-mode 'picture-mode)) 736 (if (not (eq major-mode 'picture-mode))
737 (error "You aren't editing a Picture.") 737 (error "You aren't editing a Picture.")
738 (if (not nostrip) (picture-clean)) 738 (if (not nostrip) (delete-trailing-whitespace))
739 (setq mode-name picture-mode-old-mode-name) 739 (setq mode-name picture-mode-old-mode-name)
740 (use-local-map picture-mode-old-local-map) 740 (use-local-map picture-mode-old-local-map)
741 (setq major-mode picture-mode-old-major-mode) 741 (setq major-mode picture-mode-old-major-mode)
@@ -743,13 +743,6 @@ With no argument strips whitespace from end of every line in Picture buffer
743 (setq truncate-lines picture-mode-old-truncate-lines) 743 (setq truncate-lines picture-mode-old-truncate-lines)
744 (force-mode-line-update))) 744 (force-mode-line-update)))
745 745
746(defun picture-clean ()
747 "Eliminate whitespace at ends of lines."
748 (save-excursion
749 (goto-char (point-min))
750 (while (re-search-forward "[ \t][ \t]*$" nil t)
751 (delete-region (match-beginning 0) (point)))))
752
753(provide 'picture) 746(provide 'picture)
754 747
755;;; picture.el ends here 748;;; picture.el ends here
diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el
index 08b7c3c8288..a4c965a6966 100644
--- a/lisp/textmodes/two-column.el
+++ b/lisp/textmodes/two-column.el
@@ -363,7 +363,7 @@ first and the associated buffer to its right."
363 (generate-new-buffer (concat "2C/" (buffer-name))))) 363 (generate-new-buffer (concat "2C/" (buffer-name)))))
364 (or buffer 364 (or buffer
365 (run-hooks '2C-other-buffer-hook)))) 365 (run-hooks '2C-other-buffer-hook))))
366 366
367 (2C-mode (prog1 (point-marker) 367 (2C-mode (prog1 (point-marker)
368 (other-window -1))))) 368 (other-window -1)))))
369 369
@@ -503,7 +503,7 @@ this one, then this one becomes the left column.
503 503
504If you want `2C-separator' on empty lines in the second column, 504If you want `2C-separator' on empty lines in the second column,
505you should put just one space in them. In the final result, you can strip 505you should put just one space in them. In the final result, you can strip
506off trailing spaces with \\[beginning-of-buffer] \\[replace-regexp] [ SPC TAB ] + $ RET RET" 506off trailing spaces with \\[delete-trailing-whitespace]."
507 (interactive) 507 (interactive)
508 (and (> (car (window-edges)) 0) ; not touching left edge of screen 508 (and (> (car (window-edges)) 0) ; not touching left edge of screen
509 (eq (window-buffer (previous-window)) 509 (eq (window-buffer (previous-window))