# HG changeset patch # User Sam Steingold # Date 974926779 0 # Node ID 9f63b158eb6b816e7eeebfbbcc25899ce0614103 # Parent 78bc77a659c835f0a30b7b53acb2e7a21f912865 * 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. diff -r 78bc77a659c8 -r 9f63b158eb6b lisp/ChangeLog --- a/lisp/ChangeLog Wed Nov 22 19:54:36 2000 +0000 +++ b/lisp/ChangeLog Wed Nov 22 20:59:39 2000 +0000 @@ -1,3 +1,14 @@ +2000-11-22 Sam Steingold + + * 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. + 2000-11-22 Gerd Moellmann * frame.el (show-cursor-in-non-selected-windows): Doc fix. @@ -36,12 +47,12 @@ * recentf.el (recentf-menu-items-for-commands) (recentf-make-menu-items, recentf-make-menu-item) (recentf-filter-changer): Added :help and :active menu-item properties. - + (recentf-build-dir-rules, recentf-dump-variable) (recentf-edit-list, recentf-open-files-item) (recentf-open-files): Replaced unnecessary `mapcar' with new built-in `mapc'. - + 2000-11-23 Miles Bader * faces.el (menu): Make inverse-video on ttys too. @@ -66,7 +77,7 @@ 2000-11-22 Andre Spiegel * ediff-util.el (ediff-file-checked-out-p) - (ediff-file-checked-in-p): Call vc-state instead of + (ediff-file-checked-in-p): Call vc-state instead of vc-locking-user, which no longer exists. * emulation/viper-util.el (viper-file-checked-in-p): Same as above. @@ -78,7 +89,7 @@ 2000-11-22 Miles Bader - * textmodes/refill.el (refill-adjust-ignorable-overlay) + * textmodes/refill.el (refill-adjust-ignorable-overlay) (refill-fill-paragraph-at): Remove debugging code. * calendar/calendar.el (generate-calendar-window): When we don't @@ -176,18 +187,18 @@ * font-lock.el (java-keywords): Add MATCH-HIGHLIGHT part for javadoc tags. - + 2000-11-20 Andre Spiegel * vc.el, vc-hooks.el: Undo prev change (moved functions back to vc.el). - * vc-rcs.el (vc-rcs-state): Before calling vc-workfile-unchanged-p, + * vc-rcs.el (vc-rcs-state): Before calling vc-workfile-unchanged-p, require vc. - - * vc-cvs.el (vc-cvs-checkout): Fix bug that broke C-x v ~-style + + * vc-cvs.el (vc-cvs-checkout): Fix bug that broke C-x v ~-style checkouts. - + 2000-11-20 Dave Love * Makefile.in (DONTCOMPILE): Omit bindings.el. @@ -204,15 +215,15 @@ 2000-11-19 Andre Spiegel - * vc-rcs.el (vc-rcs-state): Call vc-workfile-unchanged-p only here, + * vc-rcs.el (vc-rcs-state): Call vc-workfile-unchanged-p only here, and differentiate according to checkout model. (vc-rcs-fetch-master-state): Don't call vc-workfile-unchanged-p, since this function is only concerned with master state. - * vc-hooks.el (vc-workfile-unchanged-p, + * vc-hooks.el (vc-workfile-unchanged-p, vc-default-workfile-unchanged-p): Moved here from vc.el. - * vc.el (vc-workfile-unchanged-p, + * vc.el (vc-workfile-unchanged-p, vc-default-workfile-unchanged-p): See above. 2000-11-19 Miles Bader @@ -223,12 +234,12 @@ 2000-11-18 Gerd Moellmann * ps-print.el: Update copyright notice. - + * tooltip.el (tooltip-x-offset, tooltip-y-offset): New user-options. (tooltip-show): Use the offsets. * bindings.el (mode-line-modified): Fix a typo. - (mode-line-toggle-modified, mode-line-widen) + (mode-line-toggle-modified, mode-line-widen) (mode-line-abbrev-mode, mode-line-auto-fill-mode): Fix typos. 2000-11-17 Gerd Moellmann @@ -255,24 +266,24 @@ (vc-default-check-headers): New function. * vc-{cvs,rcs,sccs}.el: Functions reordered. - - * vc.el (vc-revert-buffer): Ask for confirmation if file seems + + * vc.el (vc-revert-buffer): Ask for confirmation if file seems up-to-date. - (vc-do-command): In the asynchronous case, output messages only if + (vc-do-command): In the asynchronous case, output messages only if the minibuffer is not active. - * vc-cvs.el (vc-cvs-revert): Use `cvs unedit' only if + * vc-cvs.el (vc-cvs-revert): Use `cvs unedit' only if `vc-cvs-use-edit' is on. - (vc-cvs-checkout): When this is used for reverting the workfile, - make a backup of the original contents and revert to that in case + (vc-cvs-checkout): When this is used for reverting the workfile, + make a backup of the original contents and revert to that in case of error. - (vc-cvs-print-log, vc-cvs-diff): Use asynchronous mode only for + (vc-cvs-print-log, vc-cvs-diff): Use asynchronous mode only for remote repositories. - + * vc.el (vc-annotate): Changed handling of prefix arg; now asks for both version and ratio in the minibuffer. - * vc-cvs.el (vc-cvs-annotate-command): New optional arg VERSION. + * vc-cvs.el (vc-cvs-annotate-command): New optional arg VERSION. Use vc-do-command to perform the annotation, not call-process. 2000-11-16 Kenichi Handa @@ -291,7 +302,7 @@ 2000-11-16 Gerd Moellmann - * net/ange-ftp.el (ange-ftp-file-writable-p) + * net/ange-ftp.el (ange-ftp-file-writable-p) (ange-ftp-file-readable-p, ange-ftp-file-executable-p): Bind ange-ftp-process-verbose to nil. @@ -445,7 +456,7 @@ available, using :enable to (de)activate them. (gud-minor-mode-map): New map. Add it to minor-mode-map-alist. (gud-mode-map): New map. - (gud-gdb-find-file, gud-sdb-find-file, gud-dbx-find-file) + (gud-gdb-find-file, gud-sdb-find-file, gud-dbx-find-file) (gud-xdb-find-file, gud-perldb-find-file, gud-pdb-find-file): Don't set up gud's menu (it's done by the minor-mode). (gud-minibuffer-local-map): New. @@ -651,7 +662,7 @@ (texinfo-update-menu-higher-regexps, texinfo-update-menu-lower-regexps) (texinfo-update-the-node, texinfo-sequentially-update-the-node) (texinfo-update-menu-same-level-regexps): Update. - (texinfo-update-node, texinfo-every-node-update) + (texinfo-update-node, texinfo-every-node-update) (texinfo-sequential-node-update): Remove autoload cookie. * textmodes/texinfo.el (texinfo-section-list): Change majorheading. @@ -680,7 +691,7 @@ (make-mode-line-mouse2-map): Rewritten. (mode-line-modified, mode-line-format, minor-mode-alist): Use new functions so that C-h k can show something with a doc string. - + * startup.el (fancy-splash-delay): Set to 10 seconds. (fancy-splash-max-time): New user-option. (fancy-splash-stop-time): New variable. @@ -785,20 +796,20 @@ * frame.el (after-setting-font-hook): Rename hooks -> hook. (set-frame-font): Use the new name (and the old for compatibility). - * toolbar/tool-bar.el (tool-bar-mode): - * time.el (display-time-mode): - * recentf.el (recentf-mode): - * paren.el (show-paren-mode): - * mwheel.el (mouse-wheel-mode): - * msb.el (msb-mode): - * jka-compr.el (auto-compression-mode): - * image-file.el (auto-image-file-mode): - * hl-line.el (hl-line-mode): - * delsel.el (delete-selection-mode): - * autoinsert.el (auto-insert-mode): + * toolbar/tool-bar.el (tool-bar-mode): + * time.el (display-time-mode): + * recentf.el (recentf-mode): + * paren.el (show-paren-mode): + * mwheel.el (mouse-wheel-mode): + * msb.el (msb-mode): + * jka-compr.el (auto-compression-mode): + * image-file.el (auto-image-file-mode): + * hl-line.el (hl-line-mode): + * delsel.el (delete-selection-mode): + * autoinsert.el (auto-insert-mode): * complete.el (partial-completion-mode): Drop unneeded positional args. - * info.el (Info-mode): + * info.el (Info-mode): * comint.el (comint-mode): Don't both with make-local-hook. * log-edit.el (log-edit-menu): New menu. @@ -839,7 +850,7 @@ 2000-11-02 Miles Bader - * calendar/calendar.el (diary-face, calendar-today-face) + * calendar/calendar.el (diary-face, calendar-today-face) (holiday-face): Remove dependency on `window-system'. 2000-11-02 Ken Raeburn diff -r 78bc77a659c8 -r 9f63b158eb6b lisp/progmodes/ada-mode.el --- a/lisp/progmodes/ada-mode.el Wed Nov 22 19:54:36 2000 +0000 +++ b/lisp/progmodes/ada-mode.el Wed Nov 22 20:59:39 2000 +0000 @@ -6,7 +6,7 @@ ;; Markus Heritsch ;; Emmanuel Briot ;; Maintainer: Emmanuel Briot -;; Ada Core Technologies's version: $Revision: 1.34 $ +;; Ada Core Technologies's version: $Revision: 1.35 $ ;; Keywords: languages ada ;; This file is not part of GNU Emacs @@ -1179,7 +1179,7 @@ (if ada-clean-buffer-before-saving (progn ;; remove all spaces at the end of lines in the whole buffer. - (add-hook 'local-write-file-hooks 'ada-remove-trailing-spaces) + (add-hook 'local-write-file-hooks 'delete-trailing-whitespace) ;; convert all tabs to the correct number of spaces. (add-hook 'local-write-file-hooks (lambda () (untabify (point-min) (point-max)))))) @@ -1975,7 +1975,7 @@ (current-column)) tmp-indent (cdr cur-indent)) (setq prev-indent 0 tmp-indent '())) - + (while (not (null tmp-indent)) (cond ((numberp (car tmp-indent)) @@ -2025,11 +2025,11 @@ ;;----------------------------- ;; in open parenthesis, but not in parameter-list ;;----------------------------- - + ((and ada-indent-to-open-paren (not (ada-in-paramlist-p)) (setq column (ada-in-open-paren-p))) - + ;; check if we have something like this (Table_Component_Type => ;; Source_File_Record) (save-excursion @@ -2047,22 +2047,22 @@ ((not (char-after)) (ada-indent-on-previous-lines nil orgpoint orgpoint)) - + ;;--------------------------- ;; starting with e ;;--------------------------- - + ((= (char-after) ?e) (cond ;; ------- end ------ - + ((looking-at "end\\>") (let ((label 0) limit) (save-excursion (ada-goto-matching-start 1) - + ;; ;; found 'loop' => skip back to 'while' or 'for' ;; if 'loop' is not on a separate line @@ -2085,18 +2085,18 @@ (beginning-of-line) (if (looking-at ada-named-block-re) (setq label (- ada-label-indent)))))))) - + (list (+ (save-excursion (back-to-indentation) (point)) label) 0)))) ;; ------ exception ---- - + ((looking-at "exception\\>") (save-excursion (ada-goto-matching-start 1) (list (save-excursion (back-to-indentation) (point)) 0))) ;; else - + ((looking-at "else\\>") (if (save-excursion (ada-goto-previous-word) (looking-at "\\")) @@ -2106,7 +2106,7 @@ (list (progn (back-to-indentation) (point)) 0)))) ;; elsif - + ((looking-at "elsif\\>") (save-excursion (ada-goto-matching-start 1 nil t) @@ -2117,7 +2117,7 @@ ;;--------------------------- ;; starting with w (when) ;;--------------------------- - + ((and (= (char-after) ?w) (looking-at "when\\>")) (save-excursion @@ -2144,7 +2144,7 @@ ;;--------------------------- ;; starting with l (loop) ;;--------------------------- - + ((and (= (char-after) ?l) (looking-at "loop\\>")) (setq pos (point)) @@ -2177,7 +2177,7 @@ ((and (= (char-after) ?i) (looking-at "is\\>")) - + (if (and ada-indent-is-separate (save-excursion (goto-char (match-end 0)) @@ -2200,7 +2200,7 @@ (cond ;; ----- record ------ - + ((looking-at "record\\>") (save-excursion (ada-search-ignore-string-comment @@ -2223,12 +2223,12 @@ (= (char-after (car pos)) ?r)) (goto-char (car pos))) (setq var 'ada-indent-renames))) - + (forward-comment -1000) (if (= (char-before) ?\)) (forward-sexp -1) (forward-word -1)) - + ;; If there is a parameter list, and we have a function declaration ;; or a access to subprogram declaration (let ((num-back 1)) @@ -2241,13 +2241,13 @@ (backward-word 1) (setq num-back 2) (looking-at "function\\>"))))) - + ;; The indentation depends of the value of ada-indent-return (if (<= (eval var) 0) (list (point) (list '- var)) (list (progn (backward-word num-back) (point)) var)) - + ;; Else there is no parameter list, but we have a function ;; Only do something special if the user want to indent ;; relative to the "function" keyword @@ -2255,11 +2255,11 @@ (save-excursion (forward-word -1) (looking-at "function\\>"))) (list (progn (forward-word -1) (point)) var) - + ;; Else... (ada-indent-on-previous-lines nil orgpoint orgpoint))))))) )) - + ;;-------------------------------- ;; starting with 'o' or 'p' ;; 'or' as statement-start @@ -2295,7 +2295,7 @@ ;; We must use a search-forward (even if the code is more complex), ;; since we want to find the beginning of the comment. (let (pos) - + (if (and ada-indent-align-comments (save-excursion (forward-line -1) @@ -2309,7 +2309,7 @@ (setq pos (point)))) pos)) (list (- pos 2) 0) - + ;; Else always on previous line (ada-indent-on-previous-lines nil orgpoint orgpoint))) @@ -2338,7 +2338,7 @@ ;;--------------------------------- ;; new/abstract/separate ;;--------------------------------- - + ((looking-at "\\(new\\|abstract\\|separate\\)\\>") (ada-indent-on-previous-lines nil orgpoint orgpoint)) @@ -2355,20 +2355,20 @@ (while (and (not found) (ada-search-ignore-string-comment "\\<\\(generic\\|end\\|begin\\|package\\|procedure\\|function\\)\\>" t)) - + ;; avoid "with procedure"... in generic parts (save-excursion (forward-word -1) (setq found (not (looking-at "with")))))) - + (if (looking-at "generic") (list (progn (back-to-indentation) (point)) 0) (ada-indent-on-previous-lines nil orgpoint orgpoint)))) - + ;;--------------------------------- ;; label ;;--------------------------------- - + ((looking-at "\\(\\sw\\|_\\)+[ \t\n]*:[^=]") (if (ada-in-decl-p) (ada-indent-on-previous-lines nil orgpoint orgpoint) @@ -2979,7 +2979,7 @@ (setq match-dat (ada-search-prev-end-stmt)) (if match-dat - + ;; ;; found a previous end-statement => check if anything follows ;; @@ -3000,7 +3000,7 @@ (goto-char (cdr match-dat))) (ada-goto-next-non-ws) )) - + ;; ;; no previous end-statement => we are at the beginning of the ;; accessible part of the buffer @@ -3248,7 +3248,7 @@ (progn (setq nest-count (1- nest-count)) (setq first nil))))) - + ;; ((looking-at "declare\\|generic") (setq nest-count (1- nest-count)) @@ -3639,7 +3639,7 @@ ;; Make sure this is the start of a private section (ie after ;; a semicolon or just after the package declaration, but not ;; after a 'type ... is private' or 'is new ... with private' - (progn (forward-comment -1000) + (progn (forward-comment -1000) (or (= (char-before) ?\;) (and (forward-word -3) (looking-at "\\"))))))) @@ -3775,17 +3775,6 @@ ;; -- Miscellaneous ;; ------------------------------------------------------------ -(defun ada-remove-trailing-spaces () - "Remove trailing spaces in the whole buffer." - (interactive) - (save-match-data - (save-excursion - (save-restriction - (widen) - (goto-char (point-min)) - (while (re-search-forward "[ \t]+$" (point-max) t) - (replace-match "" nil nil)))))) - (defun ada-gnat-style () "Clean up comments, `(' and `,' for GNAT style checking switch." (interactive) @@ -4213,7 +4202,7 @@ (goto-char (+ from 2)) (while (re-search-forward "^-- *" to t) (replace-match " ")) - + (goto-char (1- to)) (setq to (point-marker)) @@ -4302,11 +4291,11 @@ (setq is-body t name (match-string 1 name))) (setq suffixes (cdr suffixes))))) - + ;; If this wasn't in either list, return name itself (if (not (or is-spec is-body)) name - + ;; Else find the other possible names (if is-spec (setq suffixes ada-body-suffixes) diff -r 78bc77a659c8 -r 9f63b158eb6b lisp/simple.el --- a/lisp/simple.el Wed Nov 22 19:54:36 2000 +0000 +++ b/lisp/simple.el Wed Nov 22 20:59:39 2000 +0000 @@ -47,7 +47,7 @@ Other major modes are defined by comparison with this one." (interactive) (kill-all-local-variables)) - + ;; Making and deleting lines. (defun newline (&optional arg) @@ -132,7 +132,7 @@ (if (and (listp sticky) (not (memq 'hard sticky))) (put-text-property from (point) 'rear-nonsticky (cons 'hard sticky))))) - + (defun open-line (arg) "Insert a newline and leave point before it. If there is a fill prefix and/or a left-margin, insert them on the new line @@ -184,7 +184,7 @@ (fixup-whitespace)))) (defalias 'join-line #'delete-indentation) ; easier to find - + (defun delete-blank-lines () "On blank line, delete all surrounding blank lines, leaving just one. On isolated blank line, delete that one. @@ -225,6 +225,17 @@ (if (looking-at "^[ \t]*\n\\'") (delete-region (point) (point-max))))) +(defun delete-trailing-whitespace () + "Delete all the trailing whitespace across the current buffer. +All whitespace after the last non-whitespace character in a line is deleted. +This respects narrowing, created by \\[narrow-to-region] and friends." + (interactive "*") + (save-match-data + (save-excursion + (goto-char (point-min)) + (while (re-search-forward "\\s-+$" nil t) + (delete-region (match-beginning 0) (match-end 0)))))) + (defun newline-and-indent () "Insert a newline, then indent according to major mode. Indentation is done using the value of `indent-line-function'. @@ -249,7 +260,7 @@ (indent-according-to-mode)) (newline) (indent-according-to-mode)) - + (defun quoted-insert (arg) "Read next input character and insert it. This is useful for inserting control characters. @@ -287,7 +298,7 @@ (while (> arg 0) (insert-and-inherit char) (setq arg (1- arg))))) - + (defun forward-to-indentation (arg) "Move forward ARG lines and position at first nonblank character." (interactive "p") @@ -333,7 +344,7 @@ (insert ? )) (delete-region (point) (progn (skip-chars-forward " \t") (point)))) - + (defun beginning-of-buffer (&optional arg) "Move point to the beginning of the buffer; leave mark at previous position. With arg N, put point N/10 of the way from the beginning. @@ -395,7 +406,7 @@ (push-mark (point-max) nil t) (goto-char (point-min))) - + ;; Counting lines, one way or another. (defun goto-line (arg) @@ -455,7 +466,7 @@ (1+ done) done))) (- (buffer-size) (forward-line (buffer-size))))))) - + (defun what-cursor-position (&optional detail) "Print info on cursor position (on screen and within buffer). Also describe the character after point, and give its character code @@ -520,7 +531,7 @@ (single-key-description char) (buffer-substring-no-properties (point) (1+ (point)))) encoding-msg pos total percent col hscroll)))))) - + (defvar read-expression-map (let ((m (make-sparse-keymap))) (define-key m "\M-\t" 'lisp-complete-symbol) @@ -560,7 +571,7 @@ nil read-expression-map t 'read-expression-history) current-prefix-arg)) - + (if (null eval-expression-debug-on-error) (setq values (cons (eval eval-expression-arg) values)) (let ((old-value (make-symbol "t")) new-value) @@ -573,7 +584,7 @@ ;; propagate that change to the global binding. (unless (eq old-value new-value) (setq debug-on-error new-value)))) - + (let ((print-length eval-expression-print-length) (print-level eval-expression-print-level)) (prin1 (car values) @@ -631,7 +642,7 @@ (setq command-history (cons newcmd command-history))) (eval newcmd)) (ding)))) - + (defvar minibuffer-history nil "Default minibuffer history list. This is used for all minibuffer input @@ -874,7 +885,7 @@ Return 0 if current buffer is not a mini-buffer." (field-beginning (point-max))) - + ;Put this on C-x u, so we can force that rather than C-_ into startup msg (defalias 'advertised-undo 'undo) @@ -1096,7 +1107,7 @@ (t '(0 . 0))) '(0 . 0))) - + (defvar shell-command-history nil "History list for some commands that read shell commands.") @@ -1227,7 +1238,7 @@ )) (shell-command-on-region (point) (point) command output-buffer nil error-buffer))))))) - + (defun display-message-or-buffer (message &optional buffer-name not-this-window frame) "Display MESSAGE in the echo area if possible, otherwise in a pop-up buffer. @@ -1456,7 +1467,7 @@ (with-current-buffer standard-output (call-process shell-file-name nil t nil shell-command-switch command)))) - + (defvar universal-argument-map (let ((map (make-sparse-keymap))) (define-key map [t] 'universal-argument-other-key) @@ -1572,7 +1583,7 @@ unread-command-events))) (reset-this-command-lengths) (setq overriding-terminal-local-map nil)) - + ;;;; Window system cut and paste hooks. (defvar interprogram-cut-function nil @@ -1611,7 +1622,7 @@ is equal (according to `string=') to the last text Emacs provided.") - + ;;;; The kill ring data structure. (defvar kill-ring nil @@ -1686,7 +1697,7 @@ (car ARGth-kill-element))))) - + ;;;; Commands for manipulating the kill ring. (defcustom kill-read-only-ok nil @@ -1804,7 +1815,7 @@ (setq this-command 'kill-region) (message "If the next command is a kill, it will append")) (setq last-command 'kill-region))) - + ;; Yanking. (defun yank-pop (arg) @@ -1875,7 +1886,7 @@ With argument, rotate that many kills forward (or backward, if negative)." (interactive "p") (current-kill arg)) - + ;; Some kill commands. ;; Internal subroutine of delete-char @@ -1938,7 +1949,7 @@ (search-forward (char-to-string char) nil nil arg) ; (goto-char (if (> arg 0) (1- (point)) (1+ (point)))) (point)))) - + ;; kill-line and its subroutines. (defcustom kill-whole-line nil @@ -2048,7 +2059,7 @@ (goto-char (next-single-property-change (point) 'invisible)) (goto-char (next-overlay-change (point)))) (end-of-line))) - + (defun insert-buffer (buffer) "Insert after point the contents of BUFFER. Puts mark after the inserted text. @@ -2130,7 +2141,7 @@ (erase-buffer) (save-excursion (insert-buffer-substring oldbuf start end))))) - + (put 'mark-inactive 'error-conditions '(mark-inactive error)) (put 'mark-inactive 'error-message "The mark is not active now") @@ -2323,7 +2334,7 @@ (widen)) (goto-char position) (switch-to-buffer buffer))) - + (defcustom next-line-add-newlines t "*If non-nil, `next-line' inserts newline to avoid `end of buffer' error." :type 'boolean @@ -2387,7 +2398,7 @@ ((beginning-of-buffer end-of-buffer) (ding))) (line-move (- arg))) nil) - + (defcustom track-eol nil "*Non-nil means vertical motion starting at end of line keeps to ends of lines. This means moving to the end of each line moved onto. @@ -2549,7 +2560,7 @@ "Goal column %d (use \\[set-goal-column] with an arg to unset it)") goal-column)) nil) - + (defun scroll-other-window-down (lines) "Scroll the \"other window\" down. @@ -2595,7 +2606,7 @@ (end-of-buffer arg) (recenter '(t))) (select-window orig-window)))) - + (defun transpose-chars (arg) "Interchange characters around point, moving forward one character. With prefix arg ARG, effect is to take character before point @@ -2702,7 +2713,7 @@ (+ transpose-subr-start1 (- len1 len2)))) (delete-region (point) (+ (point) len1)) (insert word2))) - + (defun backward-word (arg) "Move backward until encountering the end of a word. With argument, do this that many times." @@ -2762,7 +2773,7 @@ (setq start (point))) (buffer-substring-no-properties start end))) (buffer-substring-no-properties start end))))) - + (defcustom fill-prefix nil "*String for filling to insert at front of new line, or nil for none. Setting this variable automatically makes it local to the current buffer." @@ -2974,7 +2985,7 @@ (error "set-fill-column requires an explicit argument") (message "Fill column set to %d (was %d)" arg fill-column) (setq fill-column arg))) - + (defun set-selective-display (arg) "Set `selective-display' to ARG; clear it if no arg. When the value of `selective-display' is a number > 0, @@ -3038,7 +3049,7 @@ (> (prefix-numeric-value arg) 0)) 'overwrite-mode-binary)) (force-mode-line-update)) - + (defcustom line-number-mode t "*Non-nil means display line number in mode line." :type 'boolean @@ -3251,7 +3262,7 @@ :version "21.1" :link '(custom-manual "Single-Byte European Support") :group 'keyboard) - + (defcustom read-mail-command 'rmail "*Your preference for a mail reading package. This is used by some keybindings which support reading mail. @@ -3427,7 +3438,7 @@ (list nil nil nil current-prefix-arg)) (compose-mail to subject other-headers continue 'switch-to-buffer-other-frame yank-action send-actions)) - + (defvar set-variable-value-history nil "History of values entered with `set-variable'.") @@ -3471,7 +3482,7 @@ (error "Value `%S' does not match type %S of %S" val (car type) var)))) (set var val)) - + ;; Define the major mode for lists of completions. (defvar completion-list-mode-map nil @@ -3713,7 +3724,7 @@ (goto-char (point-min)) (search-forward "\n\n") (forward-line 1)))) - + ;; Support keyboard commands to turn on various modifiers. ;; These functions -- which are not commands -- each add one modifier @@ -3779,7 +3790,7 @@ (define-key function-key-map [?\C-x ?@ ?a] 'event-apply-alt-modifier) (define-key function-key-map [?\C-x ?@ ?S] 'event-apply-shift-modifier) (define-key function-key-map [?\C-x ?@ ?c] 'event-apply-control-modifier) - + ;;;; Keypad support. ;;; Make the keypad keys act like ordinary typing keys. If people add @@ -3944,7 +3955,7 @@ (define-key ctl-x-4-map "c" 'clone-indirect-buffer-other-window) - + ;;; Syntax stuff. (defconst syntax-code-table @@ -3972,12 +3983,12 @@ can be used as value of a `syntax-table' property. DESCRIPTION is the descriptive string for the syntax.") - + ;;; Misc (defun byte-compiling-files-p () "Return t if currently byte-compiling files." (and (boundp 'byte-compile-current-file) (stringp byte-compile-current-file))) - + ;;; simple.el ends here diff -r 78bc77a659c8 -r 9f63b158eb6b lisp/textmodes/picture.el --- a/lisp/textmodes/picture.el Wed Nov 22 19:54:36 2000 +0000 +++ b/lisp/textmodes/picture.el Wed Nov 22 20:59:39 2000 +0000 @@ -24,7 +24,7 @@ ;;; Commentary: -;; This code provides the picture-mode commands documented in the Emacs +;; This code provides the picture-mode commands documented in the Emacs ;; manual. The screen is treated as a semi-infinite quarter-plane with ;; support for rectangle operations and `etch-a-sketch' character ;; insertion in any of eight directions. @@ -735,7 +735,7 @@ (interactive "P") (if (not (eq major-mode 'picture-mode)) (error "You aren't editing a Picture.") - (if (not nostrip) (picture-clean)) + (if (not nostrip) (delete-trailing-whitespace)) (setq mode-name picture-mode-old-mode-name) (use-local-map picture-mode-old-local-map) (setq major-mode picture-mode-old-major-mode) @@ -743,13 +743,6 @@ (setq truncate-lines picture-mode-old-truncate-lines) (force-mode-line-update))) -(defun picture-clean () - "Eliminate whitespace at ends of lines." - (save-excursion - (goto-char (point-min)) - (while (re-search-forward "[ \t][ \t]*$" nil t) - (delete-region (match-beginning 0) (point))))) - (provide 'picture) ;;; picture.el ends here diff -r 78bc77a659c8 -r 9f63b158eb6b lisp/textmodes/two-column.el --- a/lisp/textmodes/two-column.el Wed Nov 22 19:54:36 2000 +0000 +++ b/lisp/textmodes/two-column.el Wed Nov 22 20:59:39 2000 +0000 @@ -363,7 +363,7 @@ (generate-new-buffer (concat "2C/" (buffer-name))))) (or buffer (run-hooks '2C-other-buffer-hook)))) - + (2C-mode (prog1 (point-marker) (other-window -1))))) @@ -503,7 +503,7 @@ If you want `2C-separator' on empty lines in the second column, you should put just one space in them. In the final result, you can strip -off trailing spaces with \\[beginning-of-buffer] \\[replace-regexp] [ SPC TAB ] + $ RET RET" +off trailing spaces with \\[delete-trailing-whitespace]." (interactive) (and (> (car (window-edges)) 0) ; not touching left edge of screen (eq (window-buffer (previous-window))