From 68c16b5994a2e054aa67dc2af1579effef241dc8 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 17 Jan 2005 10:56:07 +0000 Subject: (just-one-space): Make arg optional. --- lisp/simple.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/simple.el') diff --git a/lisp/simple.el b/lisp/simple.el index 82ec0e6f7f2..82dd693ad34 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -647,13 +647,13 @@ If BACKWARD-ONLY is non-nil, only delete spaces before point." (skip-chars-backward " \t") (constrain-to-field nil orig-pos))))) -(defun just-one-space (n) +(defun just-one-space (&optional n) "Delete all spaces and tabs around point, leaving one space (or N spaces)." (interactive "*p") (let ((orig-pos (point))) (skip-chars-backward " \t") (constrain-to-field nil orig-pos) - (dotimes (i n) + (dotimes (i (or n 1)) (if (= (following-char) ?\ ) (forward-char 1) (insert ?\ ))) -- cgit v1.2.3 From 14b495ffb1fc5d9bf47b9eec56b8a2f1cc588690 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 18 Jan 2005 20:50:43 +0000 Subject: (blink-matching-open): Strip extra info from syntax. --- lisp/simple.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/simple.el') diff --git a/lisp/simple.el b/lisp/simple.el index 82dd693ad34..fbcb776c7dc 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1,7 +1,7 @@ ;;; simple.el --- basic editing commands for Emacs ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001, 2002, 2003, 2004 +;; 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -4001,7 +4001,7 @@ when it is off screen)." (setq matching-paren (let ((syntax (syntax-after blinkpos))) (and (consp syntax) - (eq (car syntax) 4) + (eq (logand (car syntax) 255) 4) (cdr syntax))) mismatch (or (null matching-paren) -- cgit v1.2.3 From 16c2f92f01ba1eb18a8f5fcfc9efb4243848a512 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 22 Jan 2005 01:44:56 +0000 Subject: (line-move-1): Rename from line-move. (line-move): New function that adjusts vscroll for partially visible rows, and calls line-move-1 otherwise. --- lisp/simple.el | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'lisp/simple.el') diff --git a/lisp/simple.el b/lisp/simple.el index fbcb776c7dc..e2476577fe3 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3179,10 +3179,31 @@ Outline mode sets this." (or (memq prop buffer-invisibility-spec) (assq prop buffer-invisibility-spec))))) +;; Perform vertical scrolling of tall images if necessary. +(defun line-move (arg &optional noerror to-end) + (if auto-window-vscroll + (let ((forward (> arg 0)) + (pvis (pos-visible-in-window-p (window-start) nil t))) + (if (and pvis (null (nth 2 pvis)) + (> (nth (if forward 4 3) pvis) 0)) + (set-window-vscroll nil + (if forward + (+ (window-vscroll nil t) + (min (nth 4 pvis) + (* (frame-char-height) arg))) + (max 0 + (- (window-vscroll nil t) + (min (nth 3 pvis) + (* (frame-char-height) (- arg)))))) + t) + (set-window-vscroll nil 0) + (line-move-1 arg noerror to-end))) + (line-move-1 arg noerror to-end))) + ;; This is the guts of next-line and previous-line. ;; Arg says how many lines to move. ;; The value is t if we can move the specified number of lines. -(defun line-move (arg &optional noerror to-end) +(defun line-move-1 (arg &optional noerror to-end) ;; Don't run any point-motion hooks, and disregard intangibility, ;; for intermediate positions. (let ((inhibit-point-motion-hooks t) -- cgit v1.2.3