[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: line-line-move-visual: was line motion problem
From: |
David Reitter |
Subject: |
Re: line-line-move-visual: was line motion problem |
Date: |
Mon, 21 Jul 2008 11:49:52 -0400 |
On 21 Jul 2008, at 00:49, Chong Yidong wrote:
If anyone on this list has a patch that is still waiting for
approval or
further comments, now would be a good time to ping.
OK, there is still the paragraph marking function. The following two
major items (and some smaller issues) have been addressed:
Stefan Monnier:
My font doesn't seem to know the char 2230, and UnicodeData.txt
doesn't
seem to know that char either. So we should probably use something
else.
On 18 Jul 2008, at 11:30, Dan Nicolaescu wrote:
whitespace.el already has many many ways of dealing with whitespaces,
wouldn't this mode be a better fit in whitespace.el?
Any objections to the patch below.
Can't put it in simple.el because make-glyph-code can't be autoloaded,
and the code is probably happy in whitespace.el.
- D
*** whitespace.el 06 May 2008 03:57:59 -0400 1.80
--- whitespace.el 21 Jul 2008 11:04:45 -0400
***************
*** 2352,2357 ****
--- 2352,2406 ----
(whitespace-mode -1)))
nil) ; continue standard unloading
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+
+ ;; Show-newlines-mode
+ (defface blank-newline
+ '((((class color) (background dark))
+ (:foreground "lightgrey" :bold nil))
+ (((class color) (background light))
+ ( :foreground "lightgrey" :bold nil))
+ (t (:bold nil :underline t)))
+ "Face used to visualize NEWLINE char mapping.
+
+ See `blank-display-mappings'."
+ :group 'blank)
+
+ (defvar show-newlines-newline-code
+ (vector (make-glyph-code 182 'blank-newline) 10))
+
+ ;;;###autoload
+ (define-minor-mode show-newlines-mode
+ "Mark newlines in current buffer"
+ :group 'convenience
+
+ (unless buffer-display-table
+ (setq buffer-display-table
+ (or standard-display-table (make-display-table))))
+ (aset buffer-display-table 10
+ (if show-newlines-mode show-newlines-newline-code)))
+
+ ;;;###autoload
+ (define-minor-mode global-show-newlines-mode
+ "Mark newlines in all buffers"
+ :group 'convenience
+ :global t
+
+ (unless standard-display-table
+ (setq standard-display-table (make-display-table)))
+ (if global-show-newlines-mode
+ (aset standard-display-table 10 show-newlines-newline-code)
+ (aset standard-display-table 10 nil))
+ (dolist (buffer (buffer-list))
+ (with-current-buffer buffer
+ (if buffer-display-table
+ (show-newlines-mode
+ (if global-show-newlines-mode 1 -1))))))
+
+
(provide 'whitespace)
*** menu-bar.el 10 Jul 2008 00:27:23 -0400 1.341
--- menu-bar.el 21 Jul 2008 11:45:01 -0400
***************
*** 653,659 ****
(let ((need-save nil))
;; 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 size-
indication-mode
cua-mode show-paren-mode transient-mark-mode
blink-cursor-mode display-time-mode display-battery-mode))
(and (customize-mark-to-save elt)
--- 653,660 ----
(let ((need-save nil))
;; These are set with menu-bar-make-mm-toggle, which does not
;; put on a customized-value property.
! (dolist (elt '(global-show-newlines-mode line-number-mode
! column-number-mode size-indication-mode
cua-mode show-paren-mode transient-mark-mode
blink-cursor-mode display-time-mode display-battery-mode))
(and (customize-mark-to-save elt)
***************
*** 700,705 ****
--- 701,714 ----
(defvar menu-bar-showhide-menu (make-sparse-keymap "Show/Hide"))
+ (define-key menu-bar-showhide-menu [show-newlines-mode]
+ (menu-bar-make-mm-toggle global-show-newlines-mode
+ "Show Newlines"
+ "Show hard newlines"))
+
+ (define-key menu-bar-showhide-menu [newlines-separator]
+ '("--"))
+
(define-key menu-bar-showhide-menu [column-number-mode]
(menu-bar-make-mm-toggle column-number-mode
"Column Numbers"
smime.p7s
Description: S/MIME cryptographic signature
- Re: line-line-move-visual: was line motion problem, (continued)
- Re: line-line-move-visual: was line motion problem, Chong Yidong, 2008/07/16
- Re: line-line-move-visual: was line motion problem, Chong Yidong, 2008/07/16
- Re: line-line-move-visual: was line motion problem, Chong Yidong, 2008/07/17
- Re: line-line-move-visual: was line motion problem, Miles Bader, 2008/07/18
- Re: line-line-move-visual: was line motion problem, Stefan Monnier, 2008/07/18
- Re: line-line-move-visual: was line motion problem, David Reitter, 2008/07/18
- Re: line-line-move-visual: was line motion problem, Stefan Monnier, 2008/07/18
- Re: line-line-move-visual: was line motion problem, Dan Nicolaescu, 2008/07/18
- Re: line-line-move-visual: was line motion problem, Stefan Monnier, 2008/07/18
- Re: line-line-move-visual: was line motion problem, Miles Bader, 2008/07/18
- Re: line-line-move-visual: was line motion problem,
David Reitter <=
- Re: line-line-move-visual: was line motion problem, Chong Yidong, 2008/07/21
- Re: line-line-move-visual: was line motion problem, David Reitter, 2008/07/21
- Re: line-line-move-visual: was line motion problem, Miles Bader, 2008/07/21
- Re: line-line-move-visual: was line motion problem, Stefan Monnier, 2008/07/21
- Re: line-line-move-visual: was line motion problem, Miles Bader, 2008/07/21
- Re: line-line-move-visual: was line motion problem, Dan Nicolaescu, 2008/07/21
- Re: line-line-move-visual: was line motion problem, David Reitter, 2008/07/21
- Re: line-line-move-visual: was line motion problem, David Reitter, 2008/07/21
- Re: line-line-move-visual: was line motion problem, Vinicius Jose Latorre, 2008/07/21
- Re: line-line-move-visual: was line motion problem, Chong Yidong, 2008/07/21