emacs-devel
[Top][All Lists]
Advanced

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

Putting blink-cursor-mode in Options menu.


From: Luc Teirlinck
Subject: Putting blink-cursor-mode in Options menu.
Date: Mon, 28 Feb 2005 18:34:04 -0600 (CST)

To some people, for instance me, having to watch a blinking cursor
produces real discomfort.  I do not know what percentage of people
react the same way to it, but I know from other people's reactions
that I am not the only person like that.  Anybody just starting to
learn Emacs should be able to disable this torture instrument without
any need to read prior documentation and do so very quickly.  (I can
not stand the blinking cursor for more than a couple of seconds.)  I
believe that the first place a desperate novice is likely to try is
the Options menu.  Hence, I believe that it needs to be on the Options
menu and be very visible there, i.e. on top.  The patch below does that.

The patch contains a minor, unrelated, doc fix to `menu-bar-make-mm-toggle'.

I can install if desired.

===File ~/menu-bar.el-diff==================================
*** menu-bar.el 16 Feb 2005 07:59:49 -0600      1.252
--- menu-bar.el 28 Feb 2005 17:29:25 -0600      
***************
*** 590,596 ****
  (defmacro menu-bar-make-mm-toggle (fname doc help &optional props)
    "Make a menu-item for a global minor mode toggle.
  FNAME is the minor mode's name (variable and function).
! DOC is the text to use the menu entry.
  HELP is the text to use for the tooltip.
  PROPS are additional properties."
    `'(menu-item ,doc ,fname
--- 590,596 ----
  (defmacro menu-bar-make-mm-toggle (fname doc help &optional props)
    "Make a menu-item for a global minor mode toggle.
  FNAME is the minor mode's name (variable and function).
! DOC is the text to use for the menu entry.
  HELP is the text to use for the tooltip.
  PROPS are additional properties."
    `'(menu-item ,doc ,fname
***************
*** 637,643 ****
      ;; These are set with menu-bar-make-mm-toggle, which does not
      ;; put on a customized-value property.
      (dolist (elt '(line-number-mode column-number-mode cua-mode 
show-paren-mode
!                  transient-mark-mode global-font-lock-mode))
        (and (customize-mark-to-save elt)
           (setq need-save t)))
      ;; These are set with `customize-set-variable'.
--- 637,644 ----
      ;; These are set with menu-bar-make-mm-toggle, which does not
      ;; put on a customized-value property.
      (dolist (elt '(line-number-mode column-number-mode cua-mode 
show-paren-mode
!                  transient-mark-mode global-font-lock-mode
!                  blink-cursor-mode))
        (and (customize-mark-to-save elt)
           (setq need-save t)))
      ;; These are set with `customize-set-variable'.
***************
*** 1037,1042 ****
--- 1038,1050 ----
                           "Syntax Highlighting"
                           "Colorize text based on language syntax (Global Font 
Lock mode)"))
  
+ (define-key menu-bar-options-menu [cursor-separator]
+   '("--"))
+ (define-key menu-bar-options-menu [blink-cursor-mode]
+   (menu-bar-make-mm-toggle blink-cursor-mode
+                          "Blinking Cursor"
+                          "Whether the cursor blinks (Blink Cursor mode)"))
+ 
  
  ;; The "Tools" menu items
  
============================================================




reply via email to

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