;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
;;; Commentary:
(setq begextra (- (current-column) startcol))
(setq startpos (point))
(move-to-column endcol coerce-tabs)
+ ;; If we overshot, move back one character
+ ;; so that endextra will be positive.
+ (if (and (not coerce-tabs) (> (current-column) endcol))
+ (backward-char 1))
(setq endextra (- endcol (current-column)))
(if (< begextra 0)
(setq endextra (+ endextra begextra)
Called from a program, takes three args; START, END and STRING."
(interactive "r\nsString rectangle: ")
- (operate-on-rectangle 'string-rectangle-line start end t)
- (goto-char start))
+ (operate-on-rectangle 'string-rectangle-line start end t))
(defun string-rectangle-line (startpos begextra endextra)
(let (whitespace)