X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/e61d39cddfd015032a6419ce75c36ecdf1e9fe9f..91ab66201cedbcd2e4e8533a7152f6736ad08731:/lisp/textmodes/picture.el diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el index e663c1b45f..4aee273415 100644 --- a/lisp/textmodes/picture.el +++ b/lisp/textmodes/picture.el @@ -1,9 +1,9 @@ ;;; picture.el --- "Picture mode" -- editing using quarter-plane screen model -;; Copyright (C) 1985, 1994, 2001-2012 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1994, 2001-2016 Free Software Foundation, Inc. ;; Author: K. Shane Hartman -;; Maintainer: FSF +;; Maintainer: emacs-devel@gnu.org ;; Keywords: convenience wp ;; This file is part of GNU Emacs. @@ -418,7 +418,8 @@ stops computed are displayed in the minibuffer with `:' at each stop." (save-excursion (let (tabs) (if arg - (setq tabs (default-value 'tab-stop-list)) + (setq tabs (or (default-value 'tab-stop-list) + (indent-accumulate-tab-stops (window-width)))) (let ((regexp (concat "[ \t]+[" (regexp-quote picture-tab-chars) "]"))) (beginning-of-line) (let ((bol (point))) @@ -494,8 +495,12 @@ prefix argument, the rectangle is actually killed, shifting remaining text." (defun picture-clear-rectangle-to-register (start end register &optional killp) "Clear rectangle delineated by point and mark into REGISTER. The rectangle is saved in REGISTER and replaced with whitespace. With -prefix argument, the rectangle is actually killed, shifting remaining text." - (interactive "r\ncRectangle to register: \nP") +prefix argument, the rectangle is actually killed, shifting remaining text. + +Interactively, reads the register using `register-read-with-preview'." + (interactive (list (region-beginning) (region-end) + (register-read-with-preview "Rectangle to register: ") + current-prefix-arg)) (set-register register (picture-snarf-rectangle start end killp))) (defun picture-snarf-rectangle (start end &optional killp) @@ -534,8 +539,11 @@ regardless of where you click." The rectangle is positioned with upper left corner at point, overwriting existing text. With prefix argument, the rectangle is inserted instead, shifting existing text. Leaves mark at one corner -of rectangle and point at the other (diagonally opposed) corner." - (interactive "cRectangle from register: \nP") +of rectangle and point at the other (diagonally opposed) corner. + +Interactively, reads the register using `register-read-with-preview'." + (interactive (list (register-read-with-preview "Rectangle from register: ") + current-prefix-arg)) (let ((rectangle (get-register register))) (if (not (consp rectangle)) (error "Register %c does not contain a rectangle" register)