all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Feature suggestion: thin cursor at end of line
@ 2005-10-31 16:13 Hrvoje Niksic
  2005-10-31 20:27 ` Eli Zaretskii
  2005-11-07 15:34 ` Richard M. Stallman
  0 siblings, 2 replies; 3+ messages in thread
From: Hrvoje Niksic @ 2005-10-31 16:13 UTC (permalink / raw)


XEmacs has a neat feature that it draws a slightly thinner cursor when
point is at the end of line or buffer.  This subtle visual cue allows
easy detection of whether the point is really at end of line or there
is more whitespace (or otherwise invisible text) after it.

This Lisp code implements a mostly equivalent Lisp-only substitute,
but I'd prefer to see this supported within Emacs itself, so that one
doesn't clutter post-command-hook and so that it works correctly
while, for example, dragging the point with the mouse and in other
situations where post-command-hook is not run.

(defun set-cursor-adaptive ()
  "Make the cursor five pixels wide if it is at end of line or buffer."
  (let ((type (let ((c (char-after (point))))
		(if (or (eq c ?\n) (null c))
		    '(bar . 5)
		  t))))
    (or (equal cursor-type type)
	(progn
	  (setq cursor-type type)
	  (sit-for 0)))))
(add-hook 'post-command-hook 'set-cursor-adaptive)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Feature suggestion: thin cursor at end of line
  2005-10-31 16:13 Feature suggestion: thin cursor at end of line Hrvoje Niksic
@ 2005-10-31 20:27 ` Eli Zaretskii
  2005-11-07 15:34 ` Richard M. Stallman
  1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2005-10-31 20:27 UTC (permalink / raw)
  Cc: emacs-devel

> From: Hrvoje Niksic <hniksic@xemacs.org>
> Date: Mon, 31 Oct 2005 17:13:19 +0100
> 
> XEmacs has a neat feature that it draws a slightly thinner cursor when
> point is at the end of line or buffer.  This subtle visual cue allows
> easy detection of whether the point is really at end of line or there
> is more whitespace (or otherwise invisible text) after it.

I don't object to adding this feature, but just wanted to make sure
you knew that Emacs has a different way of showing trailing
whitespace: the show-trailing-whitespace option.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Feature suggestion: thin cursor at end of line
  2005-10-31 16:13 Feature suggestion: thin cursor at end of line Hrvoje Niksic
  2005-10-31 20:27 ` Eli Zaretskii
@ 2005-11-07 15:34 ` Richard M. Stallman
  1 sibling, 0 replies; 3+ messages in thread
From: Richard M. Stallman @ 2005-11-07 15:34 UTC (permalink / raw)
  Cc: emacs-devel

I added this to etc/TODO.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-07 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-31 16:13 Feature suggestion: thin cursor at end of line Hrvoje Niksic
2005-10-31 20:27 ` Eli Zaretskii
2005-11-07 15:34 ` Richard M. Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.