Mercurial > emacs
view lisp/nxml/nxml-uchnm.el @ 108027:2ba5d029fd5e
Gtk tool bars can be text, icons with text or just icons
* frames.texi (Tool Bars): Add tool-bar-style.
* 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.
* xsettings.c: Qmonospace_font_name, Qtool_bar_style and
current_tool_bar_style are new.
(store_config_changed_event): Rename from store_font_changed_event.
(XSETTINGS_TOOL_BAR_STYLE): New define.
(SEEN_FONT, SEEN_TB_STYLE): New enum values.
(struct xsettings): Add font and tb_style, set xft stuff inside #ifdef
HAVE_XFT.
(something_changedCB): store_font_changed_event is now
store_config_changed_event
(parse_settings): Rename from parse_xft_settings. Read
non-xft xsettings outside #ifdef HAVE_XFT.
(read_settings): Renamed from read_xft_settings.
(apply_xft_settings): Take current settings as parameter. Do not
call read_(xft)_settings.
(read_and_apply_settings): New function.
(xft_settings_event): Do non-xft stuff out of HAVE_XFT. Call
read_and_apply_settings if there are settings to be read.
(init_xsettings): Renamed from init_xfd_settings.
Call read_and_apply_settings unconditionally.
(xsettings_initialize): Call init_xsettings.
(Ftool_bar_get_system_style): New function.
(syms_of_xsettings): Define Qmonospace_font_name and
Qtool_bar_style. Initialize current_tool_bar_style to nil.
defsubr Stool_bar_get_system_style. Fprovide on
dynamic-setting.
* xsettings.h (Ftool_bar_get_system_style): Declare.
* xdisp.c: Vtool_bar_style, tool_bar_max_label_size,
Qtext, Qboth, Qboth_horiz are new.
(syms_of_xdisp): Intern Qtext, Qboth, Qboth_horiz, DEFVAR
Vtool_bar_style, tool_bar_max_label_size.
* lisp.h: Extern declare Qtext, Qboth, Qboth_horiz.
* keyboard.c: QClabel is new.
(parse_tool_bar_item): Take out QClabel from tool bar items.
Try to construct a label if ther is no QClabel.
(syms_of_keyboard): Intern :label as QClabel.
* dispextern.h (tool_bar_item_idx): TOOL_BAR_ITEM_LABEL is new.
(Vtool_bar_style, tool_bar_max_label_size, DEFAULT_TOOL_BAR_LABEL_SIZE):
New.
* Makefile.in (SOME_MACHINE_LISP): font-setting.el renamed to
dynamic-setting.el.
* gtkutil.c (xg_tool_bar_menu_proxy): Handle label in tool bar item.
(xg_make_tool_item, xg_show_toolbar_item): New function.
(update_frame_tool_bar): Take label from TOOL_BAR_ITEM_LABEL.
Call xg_make_tool_item to make a tool bar item.
Call xg_show_toolbar_item. Use wtoolbar instead of x->toolbar_widget.
* xterm.c (x_draw_image_relief): Take Vtool_bar_button_margin
into account for toolbars.
author | Jan D. <jan.h.d@swipnet.se> |
---|---|
date | Wed, 21 Apr 2010 18:26:09 +0200 |
parents | 1d1d5d9bd884 |
children | 376148b31b5e |
line wrap: on
line source
;;; nxml-uchnm.el --- support for Unicode standard cha names in nxml-mode ;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: ;; This enables the use of the character names defined in the Unicode ;; Standard. The use of the names can be controlled on a per-block ;; basis, so as both to reduce memory usage and loading time, ;; and to make completion work better. ;;; Code: (require 'nxml-mode) (defconst nxml-unicode-blocks '(("Basic Latin" #x0000 #x007F) ("Latin-1 Supplement" #x0080 #x00FF) ("Latin Extended-A" #x0100 #x017F) ("Latin Extended-B" #x0180 #x024F) ("IPA Extensions" #x0250 #x02AF) ("Spacing Modifier Letters" #x02B0 #x02FF) ("Combining Diacritical Marks" #x0300 #x036F) ("Greek and Coptic" #x0370 #x03FF) ("Cyrillic" #x0400 #x04FF) ("Cyrillic Supplementary" #x0500 #x052F) ("Armenian" #x0530 #x058F) ("Hebrew" #x0590 #x05FF) ("Arabic" #x0600 #x06FF) ("Syriac" #x0700 #x074F) ("Thaana" #x0780 #x07BF) ("Devanagari" #x0900 #x097F) ("Bengali" #x0980 #x09FF) ("Gurmukhi" #x0A00 #x0A7F) ("Gujarati" #x0A80 #x0AFF) ("Oriya" #x0B00 #x0B7F) ("Tamil" #x0B80 #x0BFF) ("Telugu" #x0C00 #x0C7F) ("Kannada" #x0C80 #x0CFF) ("Malayalam" #x0D00 #x0D7F) ("Sinhala" #x0D80 #x0DFF) ("Thai" #x0E00 #x0E7F) ("Lao" #x0E80 #x0EFF) ("Tibetan" #x0F00 #x0FFF) ("Myanmar" #x1000 #x109F) ("Georgian" #x10A0 #x10FF) ("Hangul Jamo" #x1100 #x11FF) ("Ethiopic" #x1200 #x137F) ("Cherokee" #x13A0 #x13FF) ("Unified Canadian Aboriginal Syllabics" #x1400 #x167F) ("Ogham" #x1680 #x169F) ("Runic" #x16A0 #x16FF) ("Tagalog" #x1700 #x171F) ("Hanunoo" #x1720 #x173F) ("Buhid" #x1740 #x175F) ("Tagbanwa" #x1760 #x177F) ("Khmer" #x1780 #x17FF) ("Mongolian" #x1800 #x18AF) ("Latin Extended Additional" #x1E00 #x1EFF) ("Greek Extended" #x1F00 #x1FFF) ("General Punctuation" #x2000 #x206F) ("Superscripts and Subscripts" #x2070 #x209F) ("Currency Symbols" #x20A0 #x20CF) ("Combining Diacritical Marks for Symbols" #x20D0 #x20FF) ("Letterlike Symbols" #x2100 #x214F) ("Number Forms" #x2150 #x218F) ("Arrows" #x2190 #x21FF) ("Mathematical Operators" #x2200 #x22FF) ("Miscellaneous Technical" #x2300 #x23FF) ("Control Pictures" #x2400 #x243F) ("Optical Character Recognition" #x2440 #x245F) ("Enclosed Alphanumerics" #x2460 #x24FF) ("Box Drawing" #x2500 #x257F) ("Block Elements" #x2580 #x259F) ("Geometric Shapes" #x25A0 #x25FF) ("Miscellaneous Symbols" #x2600 #x26FF) ("Dingbats" #x2700 #x27BF) ("Miscellaneous Mathematical Symbols-A" #x27C0 #x27EF) ("Supplemental Arrows-A" #x27F0 #x27FF) ("Braille Patterns" #x2800 #x28FF) ("Supplemental Arrows-B" #x2900 #x297F) ("Miscellaneous Mathematical Symbols-B" #x2980 #x29FF) ("Supplemental Mathematical Operators" #x2A00 #x2AFF) ("CJK Radicals Supplement" #x2E80 #x2EFF) ("Kangxi Radicals" #x2F00 #x2FDF) ("Ideographic Description Characters" #x2FF0 #x2FFF) ("CJK Symbols and Punctuation" #x3000 #x303F) ("Hiragana" #x3040 #x309F) ("Katakana" #x30A0 #x30FF) ("Bopomofo" #x3100 #x312F) ("Hangul Compatibility Jamo" #x3130 #x318F) ("Kanbun" #x3190 #x319F) ("Bopomofo Extended" #x31A0 #x31BF) ("Katakana Phonetic Extensions" #x31F0 #x31FF) ("Enclosed CJK Letters and Months" #x3200 #x32FF) ("CJK Compatibility" #x3300 #x33FF) ("CJK Unified Ideographs Extension A" #x3400 #x4DBF) ;;("CJK Unified Ideographs" #x4E00 #x9FFF) ("Yi Syllables" #xA000 #xA48F) ("Yi Radicals" #xA490 #xA4CF) ;;("Hangul Syllables" #xAC00 #xD7AF) ;;("High Surrogates" #xD800 #xDB7F) ;;("High Private Use Surrogates" #xDB80 #xDBFF) ;;("Low Surrogates" #xDC00 #xDFFF) ;;("Private Use Area" #xE000 #xF8FF) ;;("CJK Compatibility Ideographs" #xF900 #xFAFF) ("Alphabetic Presentation Forms" #xFB00 #xFB4F) ("Arabic Presentation Forms-A" #xFB50 #xFDFF) ("Variation Selectors" #xFE00 #xFE0F) ("Combining Half Marks" #xFE20 #xFE2F) ("CJK Compatibility Forms" #xFE30 #xFE4F) ("Small Form Variants" #xFE50 #xFE6F) ("Arabic Presentation Forms-B" #xFE70 #xFEFF) ("Halfwidth and Fullwidth Forms" #xFF00 #xFFEF) ("Specials" #xFFF0 #xFFFF) ("Old Italic" #x10300 #x1032F) ("Gothic" #x10330 #x1034F) ("Deseret" #x10400 #x1044F) ("Byzantine Musical Symbols" #x1D000 #x1D0FF) ("Musical Symbols" #x1D100 #x1D1FF) ("Mathematical Alphanumeric Symbols" #x1D400 #x1D7FF) ;;("CJK Unified Ideographs Extension B" #x20000 #x2A6DF) ;;("CJK Compatibility Ideographs Supplement" #x2F800 #x2FA1F) ("Tags" #xE0000 #xE007F) ;;("Supplementary Private Use Area-A" #xF0000 #xFFFFF) ;;("Supplementary Private Use Area-B" #x100000 #x10FFFF) ) "List of Unicode blocks. For each block there is a list (NAME FIRST LAST), where NAME is a string giving the official name of the block, FIRST is the first code-point and LAST is the last code-point. Blocks containing only characters with algorithmic names or no names are omitted.") (defun nxml-unicode-block-char-name-set (name) "Return a symbol for a block whose official Unicode name is NAME. The symbol is generated by downcasing and replacing each space by a hyphen." (intern (replace-regexp-in-string " " "-" (downcase name)))) ;; This is intended to be a superset of the coverage ;; of existing standard entity sets. (defvar nxml-enabled-unicode-blocks-default '(basic-latin latin-1-supplement latin-extended-a latin-extended-b ipa-extensions spacing-modifier-letters combining-diacritical-marks greek-and-coptic cyrillic general-punctuation superscripts-and-subscripts currency-symbols combining-diacritical-marks-for-symbols letterlike-symbols number-forms arrows mathematical-operators miscellaneous-technical control-pictures optical-character-recognition enclosed-alphanumerics box-drawing block-elements geometric-shapes miscellaneous-symbols dingbats miscellaneous-mathematical-symbols-a supplemental-arrows-a supplemental-arrows-b miscellaneous-mathematical-symbols-b supplemental-mathematical-operators cjk-symbols-and-punctuation alphabetic-presentation-forms variation-selectors small-form-variants specials mathematical-alphanumeric-symbols) "Default value for `nxml-enabled-unicode-blocks'.") (mapc (lambda (block) (nxml-autoload-char-name-set (nxml-unicode-block-char-name-set (car block)) (expand-file-name (format "nxml/%05X-%05X" (nth 1 block) (nth 2 block)) data-directory))) nxml-unicode-blocks) ;; Internal flag to control whether customize reloads the character tables. ;; Should be set the first time the (defvar nxml-internal-unicode-char-name-sets-enabled nil) (defcustom nxml-enabled-unicode-blocks nxml-enabled-unicode-blocks-default "List of Unicode blocks for which Unicode character names are enabled. Each block is identified by a symbol derived from the name of the block by downcasing and replacing each space by a hyphen." :group 'nxml :set (lambda (sym value) (set-default 'nxml-enabled-unicode-blocks value) (when nxml-internal-unicode-char-name-sets-enabled (nxml-enable-unicode-char-name-sets))) :type (cons 'set (mapcar (lambda (block) `(const :tag ,(format "%s (%04X-%04X)" (nth 0 block) (nth 1 block) (nth 2 block)) ,(nxml-unicode-block-char-name-set (nth 0 block)))) nxml-unicode-blocks))) ;;;###autoload (defun nxml-enable-unicode-char-name-sets () "Enable the use of Unicode standard names for characters. The Unicode blocks for which names are enabled is controlled by the variable `nxml-enabled-unicode-blocks'." (interactive) (setq nxml-internal-unicode-char-name-sets-enabled t) (mapc (lambda (block) (nxml-disable-char-name-set (nxml-unicode-block-char-name-set (car block)))) nxml-unicode-blocks) (mapc (lambda (nameset) (nxml-enable-char-name-set nameset)) nxml-enabled-unicode-blocks)) (provide 'nxml-uchnm) ;; arch-tag: 440248c3-b604-467c-8b50-e83662c659a3 ;;; nxml-uchnm.el ends here