# HG changeset patch # User Richard M. Stallman # Date 712376126 0 # Node ID 3a9943a4a4402e2d373bec4cb999a892751663be # Parent f7de428cb8bf2d0d1e3bc3fa1edd9c707ef24e84 *** empty log message *** diff -r f7de428cb8bf -r 3a9943a4a440 lisp/simple.el --- a/lisp/simple.el Tue Jul 28 23:26:57 1992 +0000 +++ b/lisp/simple.el Wed Jul 29 02:15:26 1992 +0000 @@ -56,6 +56,7 @@ (defun delete-indentation (&optional arg) "Join this line to previous and fix up whitespace at join. +If there is a fill prefix, delete it from the beginning of this line. With argument, join this line to following line." (interactive "*P") (beginning-of-line) @@ -63,6 +64,13 @@ (if (eq (preceding-char) ?\n) (progn (delete-region (point) (1- (point))) + ;; If the second line started with the fill prefix, + ;; delete the prefix. + (if (and fill-prefix + (string= fill-prefix + (buffer-substring (point) + (+ (point) (length fill-prefix))))) + (delete-region (point) (+ (point) (length fill-prefix)))) (fixup-whitespace)))) (defun fixup-whitespace () @@ -422,14 +430,15 @@ (defun previous-matching-history-element (regexp n) (interactive "sPrevious element matching (regexp): \np") (let ((history (symbol-value minibuffer-history-variable)) + prevpos (pos minibuffer-history-position)) (while (/= n 0) (setq prevpos pos) (setq pos (min (max 1 (+ pos (if (< n 0) -1 1))) (length history))) (if (= pos prevpos) (error (if (= pos 1) - "No following item in minibuffer history" - "No preceding item in minibuffer history"))) + "No later matching history item" + "No earlier matching history item"))) (if (string-match regexp (if minibuffer-history-sexp-flag (prin1-to-string (nth (1- pos) history)) @@ -455,8 +464,8 @@ (length (symbol-value minibuffer-history-variable))))) (if (= minibuffer-history-position narg) (error (if (= minibuffer-history-position 1) - "No following item in minibuffer history" - "No preceding item in minibuffer history")) + "End of history; no next item" + "Beginning of history; no preceding item")) (erase-buffer) (setq minibuffer-history-position narg) (let ((elt (nth (1- minibuffer-history-position)