comparison lisp/textmodes/picture.el @ 25106:bfdfc5515d48

(picture-beginning-of-line): Don't call hscroll-point-visible now we have real autoscrolling. (picture-end-of-line, picture-newline, picture-open-line): Likewise.
author Dave Love <fx@gnu.org>
date Thu, 29 Jul 1999 21:56:02 +0000
parents 7a9b0b88448e
children 1dfff19134ab
comparison
equal deleted inserted replaced
25105:34ce1470ac01 25106:bfdfc5515d48
85 With ARG not nil, move forward ARG - 1 lines first. 85 With ARG not nil, move forward ARG - 1 lines first.
86 If scan reaches end of buffer, stop there without error." 86 If scan reaches end of buffer, stop there without error."
87 (interactive "P") 87 (interactive "P")
88 (if arg (forward-line (1- (prefix-numeric-value arg)))) 88 (if arg (forward-line (1- (prefix-numeric-value arg))))
89 (beginning-of-line) 89 (beginning-of-line)
90 (setq picture-desired-column 0) 90 (setq picture-desired-column 0))
91 ;; This call will go away when Emacs gets real horizontal autoscrolling
92 (hscroll-point-visible))
93 91
94 (defun picture-end-of-line (&optional arg) 92 (defun picture-end-of-line (&optional arg)
95 "Position point after last non-blank character on current line. 93 "Position point after last non-blank character on current line.
96 With ARG not nil, move forward ARG - 1 lines first. 94 With ARG not nil, move forward ARG - 1 lines first.
97 If scan reaches end of buffer, stop there without error." 95 If scan reaches end of buffer, stop there without error."
98 (interactive "P") 96 (interactive "P")
99 (if arg (forward-line (1- (prefix-numeric-value arg)))) 97 (if arg (forward-line (1- (prefix-numeric-value arg))))
100 (beginning-of-line) 98 (beginning-of-line)
101 (skip-chars-backward " \t" (prog1 (point) (end-of-line))) 99 (skip-chars-backward " \t" (prog1 (point) (end-of-line)))
102 (setq picture-desired-column (current-column)) 100 (setq picture-desired-column (current-column)))
103 ;; This call will go away when Emacs gets real horizontal autoscrolling
104 (hscroll-point-visible))
105 101
106 (defun picture-forward-column (arg) 102 (defun picture-forward-column (arg)
107 "Move cursor right, making whitespace if necessary. 103 "Move cursor right, making whitespace if necessary.
108 With argument, move that many columns." 104 With argument, move that many columns."
109 (interactive "p") 105 (interactive "p")
304 (if (< arg 0) 300 (if (< arg 0)
305 (forward-line arg) 301 (forward-line arg)
306 (while (> arg 0) 302 (while (> arg 0)
307 (end-of-line) 303 (end-of-line)
308 (if (eobp) (newline) (forward-char 1)) 304 (if (eobp) (newline) (forward-char 1))
309 (setq arg (1- arg)))) 305 (setq arg (1- arg)))))
310 ;; This call will go away when Emacs gets real horizontal autoscrolling
311 (hscroll-point-visible))
312 306
313 (defun picture-open-line (arg) 307 (defun picture-open-line (arg)
314 "Insert an empty line after the current line. 308 "Insert an empty line after the current line.
315 With positive argument insert that many lines." 309 With positive argument insert that many lines."
316 (interactive "p") 310 (interactive "p")
317 (save-excursion 311 (save-excursion
318 (end-of-line) 312 (end-of-line)
319 (open-line arg)) 313 (open-line arg)))
320 ;; This call will go away when Emacs gets real horizontal autoscrolling
321 (hscroll-point-visible))
322 314
323 (defun picture-duplicate-line () 315 (defun picture-duplicate-line ()
324 "Insert a duplicate of the current line, below it." 316 "Insert a duplicate of the current line, below it."
325 (interactive) 317 (interactive)
326 (save-excursion 318 (save-excursion