changeset 69482:a305f07816a9

(org-insert-centered): Use `string-width' to make underlining work for wide characters. (org-goto-map, org-agenda-mode-map, org-mode-map): Explicitly bind TAB to `org-cycle', to make sure that no binding in `outline-mode-map' can supercede it.
author Carsten Dominik <dominik@science.uva.nl>
date Wed, 15 Mar 2006 07:11:19 +0000
parents be6a0491d438
children dbae60ecfd5c
files lisp/textmodes/org.el
diffstat 1 files changed, 13 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/org.el	Wed Mar 15 03:14:15 2006 +0000
+++ b/lisp/textmodes/org.el	Wed Mar 15 07:11:19 2006 +0000
@@ -5,7 +5,7 @@
 ;; Author: Carsten Dominik <dominik at science dot uva dot nl>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
-;; Version: 4.09
+;; Version: 4.10
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -81,6 +81,9 @@
 ;;
 ;; Changes since version 4.00:
 ;; ---------------------------
+;; Version 4.10
+;;    - Bug fixes.
+;;
 ;; Version 4.09
 ;;    - Bug fixes.
 ;;    - Small improvements to font-lock support.
@@ -145,7 +148,7 @@
 
 ;;; Customization variables
 
-(defvar org-version "4.09"
+(defvar org-version "4.10"
   "The version number of the file org.el.")
 (defun org-version ()
   (interactive)
@@ -1739,10 +1742,11 @@
   :type 'boolean)
 
 (defface org-hide
-  '((((type tty) (class color)) (:foreground "blue" :weight bold))
+  '(
+    (((type tty) (class color)) (:foreground "white"))
     (((class color) (background light)) (:foreground "white"))
     (((class color) (background dark)) (:foreground "black"))
-;    (((class color) (background light)) (:foreground "grey90"))
+;    (((class color) (backgro6und light)) (:foreground "grey90"))
 ;    (((class color) (background dark)) (:foreground "grey10"))
     (t (:inverse-video nil)))
   "Face used for level 1 headlines."
@@ -2589,6 +2593,7 @@
 (define-key org-goto-map [(?q)]     'org-goto-quit)
 (define-key org-goto-map [(control ?g)] 'org-goto-quit)
 (define-key org-goto-map "\C-i" 'org-cycle)
+(define-key org-goto-map [(tab)] 'org-cycle)
 (define-key org-goto-map [(down)] 'outline-next-visible-heading)
 (define-key org-goto-map [(up)] 'outline-previous-visible-heading)
 (define-key org-goto-map "n" 'outline-next-visible-heading)
@@ -4377,6 +4382,7 @@
    (list 'org-agenda-mode-hook)))
 
 (define-key org-agenda-mode-map "\C-i"     'org-agenda-goto)
+(define-key org-agenda-mode-map [(tab)]    'org-agenda-goto)
 (define-key org-agenda-mode-map "\C-m"     'org-agenda-switch-to)
 (define-key org-agenda-mode-map " "        'org-agenda-show)
 (define-key org-agenda-mode-map "\C-c\C-t" 'org-agenda-todo)
@@ -10801,11 +10807,11 @@
 
 (defun org-insert-centered (s &optional underline)
   "Insert the string S centered and underline it with character UNDERLINE."
-  (let ((ind (max (/ (- 80 (length s)) 2) 0)))
+  (let ((ind (max (/ (- 80 (string-width s)) 2) 0)))
     (insert (make-string ind ?\ ) s "\n")
     (if underline
 	(insert (make-string ind ?\ )
-		(make-string (length s) underline)
+		(make-string (string-width s) underline)
 		"\n"))))
 
 (defun org-ascii-level-start (level title umax)
@@ -11915,6 +11921,7 @@
 
 ;; TAB key with modifiers
 (define-key org-mode-map "\C-i"       'org-cycle)
+(define-key org-mode-map [(tab)]      'org-cycle)
 (define-key org-mode-map [(meta tab)] 'org-complete)
 (define-key org-mode-map "\M-\C-i"    'org-complete)            ; for tty emacs
 ;; The following line is necessary under Suse GNU/Linux
@@ -12925,4 +12932,3 @@
 
 ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd
 ;;; org.el ends here
-