diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 19 | ||||
-rw-r--r-- | lisp/cus-edit.el | 25 | ||||
-rw-r--r-- | lisp/cus-start.el | 9 | ||||
-rw-r--r-- | lisp/dynamic-setting.el (renamed from lisp/font-setting.el) | 32 | ||||
-rw-r--r-- | lisp/info.el | 9 | ||||
-rw-r--r-- | lisp/loadup.el | 4 | ||||
-rw-r--r-- | lisp/tool-bar.el | 7 | ||||
-rw-r--r-- | lisp/vc-dir.el | 12 |
8 files changed, 82 insertions, 35 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1162638f8a9..5ac61d146cd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,22 @@ +2010-04-21 Jan Djärv <jan.h.d@swipnet.se> + + * vc-dir.el (vc-dir-tool-bar-map): Add :label on some tool bar items. + + * tool-bar.el (tool-bar-setup): Add :label on some tool bar items. + + * loadup.el: Load dynamic-setting.el if feature dynamic-setting + is present. + + * info.el (info-tool-bar-map): Add labels. + + * cus-start.el (all): Add tool-bar-style and tool-bar-max-label-size. + + * cus-edit.el (custom-commands): Add labels for tool bar. + (custom-buffer-create-internal, Custom-mode): Adjust for + labels in custom-commands. + + * dynamic-setting.el: Renamed from font-setting.el. + 2010-04-21 John Wiegley <jwiegley@gmail.com> * ido.el (ido-init-completion-maps): For ido-switch-buffer, C-o diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index cb6e746f3b2..bb2f67422e3 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -739,25 +739,31 @@ groups after non-groups, if nil do not order groups at all." (defvar custom-commands '(("Set for current session" Custom-set t "Apply all settings in this buffer to the current session" - "index") + "index" + "Apply") ("Save for future sessions" Custom-save (or custom-file user-init-file) "Apply all settings in this buffer and save them for future Emacs sessions." - "save") + "save" + "Save") ("Undo edits" Custom-reset-current t "Restore all settings in this buffer to reflect their current values." - "refresh") + "refresh" + "Undo") ("Reset to saved" Custom-reset-saved t "Restore all settings in this buffer to their saved values (if any)." - "undo") + "undo" + "Reset") ("Erase customizations" Custom-reset-standard (or custom-file user-init-file) "Un-customize all settings in this buffer and save them with standard values." - "delete") + "delete" + "Uncustomize") ("Help for Customize" Custom-help t "Get help for using Customize." - "help") - ("Exit" Custom-buffer-done t "Exit Customize." "exit"))) + "help" + "Help") + ("Exit" Custom-buffer-done t "Exit Customize." "exit" "Exit"))) (defun Custom-help () "Read the node on Easy Customization in the Emacs manual." @@ -1616,7 +1622,7 @@ Otherwise use brackets." (if custom-buffer-verbose-help (widget-insert " Operate on all settings in this buffer:\n")) - (let ((button (lambda (tag action active help icon) + (let ((button (lambda (tag action active help icon label) (widget-insert " ") (if (eval active) (widget-create 'push-button :tag tag @@ -4680,7 +4686,8 @@ if that value is non-nil." (mapc (lambda (arg) (tool-bar-local-item-from-menu - (nth 1 arg) (nth 4 arg) map custom-mode-map)) + (nth 1 arg) (nth 4 arg) map custom-mode-map + :label (nth 5 arg))) custom-commands) (setq custom-tool-bar-map map)))) (make-local-variable 'custom-options) diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 30678a09bb8..07f7702e9d6 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -339,6 +339,15 @@ since it could result in memory overflow and make Emacs crash." (const :tag "Off (nil)" :value nil) (const :tag "Immediate" :value t) (number :tag "Delay by secs" :value 0.5)) "22.1") + (tool-bar-style + frames (choice + (const :tag "Images" :value image) + (const :tag "Text" :value text) + (const :tag "Both" :value both) + (const :tag "Both-horiz" :value both-horiz) + (const :tag "System default" :value nil)) "23.3") + (tool-bar-max-label-size frames integer "23.3") + ;; xfaces.c (scalable-fonts-allowed display boolean "22.1") ;; xfns.c diff --git a/lisp/font-setting.el b/lisp/dynamic-setting.el index 3a6f1dc0e31..37a95999562 100644 --- a/lisp/font-setting.el +++ b/lisp/dynamic-setting.el @@ -1,10 +1,10 @@ -;;; font-setting.el --- Support dynamic font changes +;;; dynamic-setting.el --- Support dynamic changes ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. ;; Author: Jan Djärv <jan.h.d@swipnet.se> ;; Maintainer: FSF -;; Keywords: font, system-font +;; Keywords: font, system-font, tool-bar-style ;; This file is part of GNU Emacs. @@ -81,21 +81,25 @@ current form for the frame (i.e. hinting or somesuch changed)." (custom-push-theme 'theme-face 'default 'user 'set spec) (put 'default 'face-modified nil)))))) -(defun font-setting-handle-config-changed-event (event) - "Handle config-changed-event to change fonts on the display in EVENT. -If `font-use-system-font' is nil, the font is not changed." +(defun dynamic-setting-handle-config-changed-event (event) + "Handle config-changed-event on the display in EVENT. +Changes can be + The monospace font. If `font-use-system-font' is nil, the font + is not changed. + Xft parameters, like DPI and hinting. + The tool bar style." (interactive "e") - (let ((type (nth 1 event)) ;; font-name or font-render + (let ((type (nth 1 event)) (display-name (nth 2 event))) - (if (or (not (eq type 'font-name)) - font-use-system-font) - (font-setting-change-default-font display-name - (eq type 'font-name))))) + (cond ((and (eq type 'monospace-font-name) font-use-system-font) + (font-setting-change-default-font display-name t)) -(if (or (featurep 'system-font-setting) (featurep 'font-render-setting)) - (define-key special-event-map [config-changed-event] - 'font-setting-handle-config-changed-event)) + ((eq type 'font-render) + (font-setting-change-default-font display-name nil)) -(provide 'font-setting) + ((eq type 'tool-bar-style) (force-mode-line-update t))))) + +(define-key special-event-map [config-changed-event] + 'dynamic-setting-handle-config-changed-event) ;; arch-tag: 3a57e78f-1cd6-48b6-ab75-98f160dcc017 diff --git a/lisp/info.el b/lisp/info.el index aea283403ec..b8eb1339d17 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -3736,9 +3736,11 @@ If FORK is non-nil, it is passed to `Info-goto-node'." (defvar info-tool-bar-map (let ((map (make-sparse-keymap))) (tool-bar-local-item-from-menu 'Info-history-back "left-arrow" map Info-mode-map - :rtl "right-arrow") + :rtl "right-arrow" + :label "Back") (tool-bar-local-item-from-menu 'Info-history-forward "right-arrow" map Info-mode-map - :rtl "left-arrow") + :rtl "left-arrow" + :label "Forward") (tool-bar-local-item-from-menu 'Info-prev "prev-node" map Info-mode-map :rtl "next-node") (tool-bar-local-item-from-menu 'Info-next "next-node" map Info-mode-map @@ -3746,7 +3748,8 @@ If FORK is non-nil, it is passed to `Info-goto-node'." (tool-bar-local-item-from-menu 'Info-up "up-node" map Info-mode-map) (tool-bar-local-item-from-menu 'Info-top-node "home" map Info-mode-map) (tool-bar-local-item-from-menu 'Info-goto-node "jump-to" map Info-mode-map) - (tool-bar-local-item-from-menu 'Info-index "index" map Info-mode-map) + (tool-bar-local-item-from-menu 'Info-index "index" map Info-mode-map + :label "Index Search") (tool-bar-local-item-from-menu 'Info-search "search" map Info-mode-map) (tool-bar-local-item-from-menu 'Info-exit "exit" map Info-mode-map) map)) diff --git a/lisp/loadup.el b/lisp/loadup.el index 95af8cdb47e..36bf8dea082 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -203,8 +203,8 @@ (load "dnd") (load "tool-bar"))) -(if (or (featurep 'system-font-setting) (featurep 'font-render-setting)) - (load "font-setting")) +(if (featurep 'dynamic-setting) + (load "dynamic-setting")) (if (featurep 'x) (progn diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el index 875eb240433..18a75437f97 100644 --- a/lisp/tool-bar.el +++ b/lisp/tool-bar.el @@ -267,7 +267,7 @@ holds a keymap." ;; People say it's bad to have EXIT on the tool bar, since users ;; might inadvertently click that button. ;;(tool-bar-add-item-from-menu 'save-buffers-kill-emacs "exit") - (tool-bar-add-item-from-menu 'find-file "new") + (tool-bar-add-item-from-menu 'find-file "new" nil :label "New File") (tool-bar-add-item-from-menu 'menu-find-file-existing "open") (tool-bar-add-item-from-menu 'dired "diropen") (tool-bar-add-item-from-menu 'kill-this-buffer "close") @@ -294,14 +294,15 @@ holds a keymap." "paste" nil :visible '(not (eq 'special (get major-mode 'mode-class)))) - (tool-bar-add-item-from-menu 'nonincremental-search-forward "search") + (tool-bar-add-item-from-menu 'nonincremental-search-forward "search" + nil :label "Search") ;;(tool-bar-add-item-from-menu 'ispell-buffer "spell") ;; There's no icon appropriate for News and we need a command rather ;; than a lambda for Read Mail. ;;(tool-bar-add-item-from-menu 'compose-mail "mail/compose") - (tool-bar-add-item-from-menu 'print-buffer "print") + (tool-bar-add-item-from-menu 'print-buffer "print" nil :label "Print") ;; tool-bar-add-item-from-menu itself operates on ;; (default-value 'tool-bar-map), but when we don't use that function, diff --git a/lisp/vc-dir.el b/lisp/vc-dir.el index 4b95321d366..f24e627de64 100644 --- a/lisp/vc-dir.el +++ b/lisp/vc-dir.el @@ -301,7 +301,8 @@ If BODY uses EVENT, it should be a variable, map vc-dir-mode-map) (tool-bar-local-item "bookmark_add" 'vc-dir-toggle-mark 'vc-dir-toggle-mark map - :help "Toggle mark on current item") + :help "Toggle mark on current item" + :label "Toggle Mark") (tool-bar-local-item-from-menu 'vc-dir-previous-line "left-arrow" map vc-dir-mode-map :rtl "right-arrow") @@ -313,11 +314,14 @@ If BODY uses EVENT, it should be a variable, (tool-bar-local-item-from-menu 'revert-buffer "refresh" map vc-dir-mode-map) (tool-bar-local-item-from-menu 'nonincremental-search-forward - "search" map) + "search" map nil + :label "Search") (tool-bar-local-item-from-menu 'vc-dir-query-replace-regexp - "search-replace" map vc-dir-mode-map) + "search-replace" map vc-dir-mode-map + :label "Replace") (tool-bar-local-item-from-menu 'vc-dir-kill-dir-status-process "cancel" - map vc-dir-mode-map) + map vc-dir-mode-map + :label "Cancel") (tool-bar-local-item-from-menu 'quit-window "exit" map vc-dir-mode-map) map)) |