From 5a7383fda0ef1787513d94095bee45104d515e26 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 21 Jul 2005 11:09:11 +0000 Subject: [PATCH] (vcursor-other-window, vcursor-bind-keys, vcursor-key-bindings, vcursor-use-vcursor-map, vcursor-find-window, vcursor-scroll-down, vcursor-disable, vcursor-beginning-of-buffer, vcursor-end-of-buffer): Fix typos in docstrings. (vcursor-relative-move, vcursor-get-char-count): Improve argument/docstring consistency. --- lisp/vcursor.el | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/lisp/vcursor.el b/lisp/vcursor.el index fd7d1416661..89f30cf7232 100644 --- a/lisp/vcursor.el +++ b/lisp/vcursor.el @@ -356,7 +356,7 @@ disable the vcursor." (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 +VAR is usually `vcursor-key-bindings'. Normally this function is called on loading vcursor and from the customize package." (set var value) (cond @@ -464,8 +464,8 @@ on loading vcursor and from the customize package." (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 +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,7 +514,7 @@ scrolling set this. It is used by the `vcursor-auto-disable' code.") (defvar vcursor-use-vcursor-map nil "Non-nil if the vcursor map is mapped directly onto the main keymap. -See vcursor-toggle-vcursor-map.") +See `vcursor-toggle-vcursor-map'.") (make-variable-buffer-local 'vcursor-use-vcursor-map) (defvar vcursor-map nil "Keymap for vcursor command.") @@ -575,7 +575,7 @@ With optional NOT-THIS non-nil never return the current window. 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\). +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,15 +674,15 @@ another window. With LEAVE-W, use the current `vcursor-window'." (insert text)) ) -(defun vcursor-relative-move (fn &rest args) - "Use FUNCTION with arbitrary ARG1 ... to move the virtual cursor. +(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 fn args) + (apply func args) (and (eq opoint (point-max)) (eq opoint (point)) (signal 'end-of-buffer nil)) (vcursor-move (point)) @@ -730,7 +730,7 @@ The vcursor will always appear in an unselected window." ) (defun vcursor-scroll-down (&optional n) - "Scroll down the vcursor window ARG lines or near-full screen if none. + "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,10 +791,10 @@ is visible in the current one." (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. +(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,7 +803,7 @@ out how much to copy." (save-excursion (set-buffer (overlay-buffer vcursor-overlay)) (let ((start (goto-char (overlay-start vcursor-overlay)))) - (- (progn (apply fn args) (point)) start))) + (- (progn (apply func args) (point)) start))) ) ;; Make sure the virtual cursor is active. Unless arg is non-nil, @@ -822,13 +822,12 @@ Next time you use it, it will start from point. 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. +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 +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,7 +853,7 @@ This is the next window cyclically after one currently showing the 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. +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,7 +1041,7 @@ ARG is as for `end-of-line'." (defun vcursor-beginning-of-buffer (&optional arg) "Move the virtual cursor to the beginning of its buffer. -ARG is as for beginning-of-buffer." +ARG is as for `beginning-of-buffer'." (interactive "P") (vcursor-relative-move (lambda (arg) @@ -1053,7 +1052,7 @@ ARG is as for beginning-of-buffer." (defun vcursor-end-of-buffer (&optional arg) "Move the virtual cursor to the end of its buffer. -ARG is as for end-of-buffer. +ARG is as for `end-of-buffer'. Actually, the vcursor is moved to the second from last character or it would be invisible." -- 2.39.2