emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/vcursor.el


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/vcursor.el
Date: Thu, 21 Jul 2005 07:09:11 -0400

Index: emacs/lisp/vcursor.el
diff -c emacs/lisp/vcursor.el:1.18 emacs/lisp/vcursor.el:1.19
*** emacs/lisp/vcursor.el:1.18  Mon Jul  4 23:08:59 2005
--- emacs/lisp/vcursor.el       Thu Jul 21 11:09:11 2005
***************
*** 356,362 ****
  
  (defun vcursor-bind-keys (var value)
    "Alter the value of the variable VAR to VALUE, binding keys as required.
! VAR is usually vcursor-key-bindings.  Normally this function is called
  on loading vcursor and from the customize package."
    (set var value)
    (cond
--- 356,362 ----
  
  (defun vcursor-bind-keys (var value)
    "Alter the value of the variable VAR to VALUE, binding keys as required.
! VAR is usually `vcursor-key-bindings'.  Normally this function is called
  on loading vcursor and from the customize package."
    (set var value)
    (cond
***************
*** 464,471 ****
  
  (defcustom vcursor-key-bindings nil
    "*How to bind keys when vcursor is loaded.
! If t, guess; if xterm, use bindings suitable for an X terminal; if
! oemacs, use bindings which work on a PC with Oemacs. If nil, don't
  define any key bindings.
  
  Default is nil."
--- 464,471 ----
  
  (defcustom vcursor-key-bindings nil
    "*How to bind keys when vcursor is loaded.
! If t, guess; if `xterm', use bindings suitable for an X terminal; if
! `oemacs', use bindings which work on a PC with Oemacs.  If nil, don't
  define any key bindings.
  
  Default is nil."
***************
*** 514,520 ****
  
  (defvar vcursor-use-vcursor-map nil
    "Non-nil if the vcursor map is mapped directly onto the main keymap.
! See vcursor-toggle-vcursor-map.")
  (make-variable-buffer-local 'vcursor-use-vcursor-map)
  
  (defvar vcursor-map nil "Keymap for vcursor command.")
--- 514,520 ----
  
  (defvar vcursor-use-vcursor-map nil
    "Non-nil if the vcursor map is mapped directly onto the main keymap.
! See `vcursor-toggle-vcursor-map'.")
  (make-variable-buffer-local 'vcursor-use-vcursor-map)
  
  (defvar vcursor-map nil "Keymap for vcursor command.")
***************
*** 575,581 ****
  
  With NEW-WIN non-nil, display the virtual cursor buffer in another
  window if the virtual cursor is not currently visible \(note, however,
! that this function never changes window-point\).
  
  With THIS-FRAME non-nil, don't search other frames for a new window
  \(though if the vcursor is already off-frame then its current window is
--- 575,581 ----
  
  With NEW-WIN non-nil, display the virtual cursor buffer in another
  window if the virtual cursor is not currently visible \(note, however,
! that this function never changes `window-point'\).
  
  With THIS-FRAME non-nil, don't search other frames for a new window
  \(though if the vcursor is already off-frame then its current window is
***************
*** 674,688 ****
      (insert text))
    )
  
! (defun vcursor-relative-move (fn &rest args)
!   "Use FUNCTION with arbitrary ARG1 ... to move the virtual cursor.
  
  This is called by most of the virtual-cursor motion commands."
    (let (text opoint)
      (save-excursion
        (vcursor-locate)
        (setq opoint (point))
!       (apply fn args)
        (and (eq opoint (point-max)) (eq opoint (point))
           (signal 'end-of-buffer nil))
        (vcursor-move (point))
--- 674,688 ----
      (insert text))
    )
  
! (defun vcursor-relative-move (func &rest args)
!   "Call FUNC with arbitrary ARGS ... to move the virtual cursor.
  
  This is called by most of the virtual-cursor motion commands."
    (let (text opoint)
      (save-excursion
        (vcursor-locate)
        (setq opoint (point))
!       (apply func args)
        (and (eq opoint (point-max)) (eq opoint (point))
           (signal 'end-of-buffer nil))
        (vcursor-move (point))
***************
*** 730,736 ****
  )
  
  (defun vcursor-scroll-down (&optional n)
!   "Scroll down the vcursor window ARG lines or near-full screen if none.
  The vcursor will always appear in an unselected window."
  
    (interactive "P")
--- 730,736 ----
  )
  
  (defun vcursor-scroll-down (&optional n)
!   "Scroll down the vcursor window ARG lines or near full screen if none.
  The vcursor will always appear in an unselected window."
  
    (interactive "P")
***************
*** 791,800 ****
    (setq vcursor-last-command t)
    )
  
! (defun vcursor-get-char-count (fn &rest args)
!   "Apply FN to ARG1 ... and return the number of characters moved.
! Point is temporarily set to the virtual cursor position before FN is
! called.
  
  This is called by most of the virtual-cursor copying commands to find
  out how much to copy."
--- 791,800 ----
    (setq vcursor-last-command t)
    )
  
! (defun vcursor-get-char-count (func &rest args)
!   "Apply FUNC to ARGS ... and return the number of characters moved.
! Point is temporarily set to the virtual cursor position before FUNC
! is called.
  
  This is called by most of the virtual-cursor copying commands to find
  out how much to copy."
***************
*** 803,809 ****
    (save-excursion
      (set-buffer (overlay-buffer vcursor-overlay))
      (let ((start (goto-char (overlay-start vcursor-overlay))))
!       (- (progn (apply fn args) (point)) start)))
    )
  
  ;; Make sure the virtual cursor is active.  Unless arg is non-nil,
--- 803,809 ----
    (save-excursion
      (set-buffer (overlay-buffer vcursor-overlay))
      (let ((start (goto-char (overlay-start vcursor-overlay))))
!       (- (progn (apply func args) (point)) start)))
    )
  
  ;; Make sure the virtual cursor is active.  Unless arg is non-nil,
***************
*** 822,834 ****
  
  With a positive prefix ARG, the first window in cyclic order
  displaying the virtual cursor (or which was recently displaying the
! virtual cursor) will be deleted unless it's the selected
! window.
  
  With a negative prefix argument, enable the virtual cursor: make it
  active at the same point as the real cursor.
  
! Copying mode is always turned off:  the next use of the vcursor will
  not copy text until you turn it on again."
  
    (interactive "P")
--- 822,833 ----
  
  With a positive prefix ARG, the first window in cyclic order
  displaying the virtual cursor (or which was recently displaying the
! virtual cursor) will be deleted unless it's the selected window.
  
  With a negative prefix argument, enable the virtual cursor: make it
  active at the same point as the real cursor.
  
! Copying mode is always turned off: the next use of the vcursor will
  not copy text until you turn it on again."
  
    (interactive "P")
***************
*** 854,860 ****
  virtual cursor, or else after the current selected window.  If there
  is no other window, the current window is split.
  
! Arguments N and optional ALL-FRAMES are the same as with other-window.
  ALL-FRAMES is also used to decide whether to split the window."
  
    (interactive "p")
--- 853,859 ----
  virtual cursor, or else after the current selected window.  If there
  is no other window, the current window is split.
  
! Arguments N and optional ALL-FRAMES are the same as with `other-window'.
  ALL-FRAMES is also used to decide whether to split the window."
  
    (interactive "p")
***************
*** 1042,1048 ****
  
  (defun vcursor-beginning-of-buffer (&optional arg)
    "Move the virtual cursor to the beginning of its buffer.
! ARG is as for beginning-of-buffer."
    (interactive "P")
    (vcursor-relative-move
     (lambda (arg)
--- 1041,1047 ----
  
  (defun vcursor-beginning-of-buffer (&optional arg)
    "Move the virtual cursor to the beginning of its buffer.
! ARG is as for `beginning-of-buffer'."
    (interactive "P")
    (vcursor-relative-move
     (lambda (arg)
***************
*** 1053,1059 ****
  
  (defun vcursor-end-of-buffer (&optional arg)
    "Move the virtual cursor to the end of its buffer.
! ARG is as for end-of-buffer.
  
  Actually, the vcursor is moved to the second from last character or it
  would be invisible."
--- 1052,1058 ----
  
  (defun vcursor-end-of-buffer (&optional arg)
    "Move the virtual cursor to the end of its buffer.
! ARG is as for `end-of-buffer'.
  
  Actually, the vcursor is moved to the second from last character or it
  would be invisible."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]