-;;; latin-alt.el --- Quail package for inputting various European characters -*-coding: iso-2022-7bit;-*-
+;;; latin-alt.el --- Quail package for inputting various European characters -*-coding: utf-8;-*-
- ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
- ;; Licensed to the Free Software Foundation.
- ;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ ;; Copyright (C) 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
+ ;; Copyright (C) 1997, 1999
+ ;; National Institute of Advanced Industrial Science and Technology (AIST)
+ ;; Registration Number H14PRO021
;; Keywords: multilingual, input method, latin
-;;; latin-post.el --- Quail packages for inputting various European characters -*-coding: iso-2022-7bit;-*-
+;;; latin-post.el --- Quail packages for inputting various European characters -*-coding: utf-8;-*-
- ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
- ;; Licensed to the Free Software Foundation.
- ;; Copyright (C) 2001, 2002 Free Software Foundation.
+ ;; Copyright (C) 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
+ ;; Copyright (C) 1997
+ ;; National Institute of Advanced Industrial Science and Technology (AIST)
+ ;; Registration Number H14PRO021
+;; Copyright (C) 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H13PRO009
-;; Keywords: multilingual, input method, latin
+;; Keywords: multilingual, input method, latin, i18n
;; This file is part of GNU Emacs.
-;;; latin-pre.el --- Quail packages for inputting various European characters -*-coding: iso-2022-7bit;-*-
+;;; latin-pre.el --- Quail packages for inputting various European characters -*-coding: utf-8;-*-
- ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
- ;; Licensed to the Free Software Foundation.
- ;; Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+ ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+ ;; Free Software Foundation, Inc.
+ ;; Copyright (C) 1997, 1999, 2005
+ ;; National Institute of Advanced Industrial Science and Technology (AIST)
+ ;; Registration Number H14PRO021
;; Keywords: mule, multilingual, latin, input method
-;;; pypunct-b5.el --- Quail packages for Chinese (pinyin + extra symbols)
+;;; pypunct-b5.el --- Quail packages for Chinese (pinyin + extra symbols) -*-coding: iso-2022-7bit;-*-
- ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
- ;; Licensed to the Free Software Foundation.
+ ;; Copyright (C) 1997, 2000
+ ;; National Institute of Advanced Industrial Science and Technology (AIST)
+ ;; Registration Number H14PRO021
;; Author: Ken'ichi HANDA <handa@etl.go.jp>
-;;; symbol-ksc.el --- Quail-package for Korean Symbol (KSC5601)
+;;; symbol-ksc.el --- Quail-package for Korean Symbol (KSC5601) -*-coding: iso-2022-7bit;-*-
- ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
- ;; Licensed to the Free Software Foundation.
+ ;; Copyright (C) 1997, 2005 Free Software Foundation, Inc.
+ ;; Copyright (C) 1997, 1998
+ ;; National Institute of Advanced Industrial Science and Technology (AIST)
+ ;; Registration Number H14PRO021
;; Keywords: multilingual, input method, Korean, Hangul
-;;; thai.el --- Quail package for inputting Thai characters
+;;; thai.el --- Quail package for inputting Thai characters -*-coding: iso-2022-7bit;-*-
- ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
- ;; Licensed to the Free Software Foundation.
- ;; Copyright (C) 2005
+ ;; Copyright (C) 1995, 1997, 1999, 2005
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
-;;; tibetan.el --- Quail package for inputting Tibetan characters
+;;; tibetan.el --- Quail package for inputting Tibetan characters -*-coding: iso-2022-7bit;-*-
- ;; Copyright (C) 1995 Free Software Foundation, Inc.
- ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
+ ;; Copyright (C) 1995 Free Software Foundation, Inc.
+ ;; Copyright (C) 1995, 1998, 1999, 2000
+ ;; National Institute of Advanced Industrial Science and Technology (AIST)
+ ;; Registration Number H14PRO021
;; Keywords: multilingual, input method, Tibetan
;;; uni-input.el --- Hex Unicode input method
- ;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-;; Copyright (C) 2001, 2003 Free Software Foundation, Inc.
++;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+ ;; Copyright (C) 2004
+ ;; National Institute of Advanced Industrial Science and Technology (AIST)
+ ;; Registration Number H14PRO021
;; Author: Dave Love <fx@gnu.org>
;; Keywords: i18n
$(lispsource)international/mule-conf.el \
$(lispsource)international/mule-cmds.elc \
$(lispsource)international/characters.elc \
- $(lispsource)international/ucs-tables.elc \
- $(lispsource)international/utf-8.elc \
- $(lispsource)international/utf-16.elc \
- $(lispsource)international/latin-1.el \
- $(lispsource)international/latin-2.el \
- $(lispsource)international/latin-3.el \
- $(lispsource)international/latin-4.el \
- $(lispsource)international/latin-5.el \
- $(lispsource)international/latin-8.el \
- $(lispsource)international/latin-9.el \
+ $(lispsource)image.elc \
+ $(lispsource)international/fontset.elc \
+ $(lispsource)dnd.elc \
+ $(lispsource)mwheel.elc \
+ $(lispsource)tool-bar.elc \
$(lispsource)case-table.elc
lisp2 = \
;; Text properties
(when properties
(newline)
- (widget-insert "There are text properties here:\n")
+ (insert "There are text properties here:\n")
(describe-property-list properties)))))
\f
+(defcustom describe-char-unidata-list nil
+ "List of Unicode-based character property names shown by `describe-char'."
+ :group 'mule
+ :version "23.1"
+ :type '(set
+ (const :tag "Unicode Name" name)
+ (const :tag "Unicode general category " general-category)
+ (const :tag "Unicode canonical combining class"
+ canonical-combining-class)
+ (const :tag "Unicode bidi class" bidi-class)
+ (const :tag "Unicode decomposition mapping" decomposition)
+ (const :tag "Unicode decimal digit value" decimal-digit-value)
+ (const :tag "Unicode digit value" digit-value)
+ (const :tag "Unicode numeric value" numeric-value)
+ (const :tag "Unicode mirrored" mirrored)
+ (const :tag "Unicode old name" old-name)
+ (const :tag "Unicode ISO 10646 comment" iso-10646-comment)
+ (const :tag "Unicode simple uppercase mapping" uppercase)
+ (const :tag "Unicode simple lowercase mapping" lowercase)
+ (const :tag "Unicode simple titlecase mapping" titlecase)))
+
(defcustom describe-char-unicodedata-file nil
"Location of Unicode data file.
This is the UnicodeData.txt file from the Unicode consortium, used for
(multibyte-p enable-multibyte-characters)
(overlays (mapcar #'(lambda (o) (overlay-properties o))
(overlays-at pos)))
- item-list max-width unicode)
+ (char-description (if (not multibyte-p)
+ (single-key-description char)
+ (if (< char 128)
+ (single-key-description char)
+ (string-to-multibyte
+ (char-to-string char)))))
+ (text-props-desc
+ (let ((tmp-buf (generate-new-buffer " *text-props*")))
+ (unwind-protect
+ (progn
+ (describe-text-properties pos tmp-buf)
+ (with-current-buffer tmp-buf (buffer-string)))
+ (kill-buffer tmp-buf))))
+ item-list max-width code)
- (if (or (< char 256)
- (memq 'mule-utf-8 (find-coding-systems-region pos (1+ pos)))
- (get-char-property pos 'untranslated-utf-8))
- (setq unicode (or (get-char-property pos 'untranslated-utf-8)
- (encode-char char 'ucs))))
+ (setq code (encode-char char charset))
(setq item-list
`(("character"
- ,(format "%s (0%o, %d, 0x%x)"
- (apply 'propertize (if (not multibyte-p)
- (single-key-description char)
- (if (< char 128)
- (single-key-description char)
- (string-to-multibyte
- (char-to-string char))))
- (text-properties-at pos))
- char char char))
- ,(format "%s (%d, #o%o, #x%x%s)"
++ ,(format "%s (%d, #o%o, #x%x)"
+ (apply 'propertize char-description
+ (text-properties-at pos))
- char char char
- (if unicode
- (format ", U+%04X" unicode)
- "")))
- ("charset"
++ char char char))
+ ("preferred charset"
- ,`(widget-create 'link
- :notify (lambda (&rest ignore)
- (describe-character-set ',charset))
- ,(symbol-name charset))
+ ,`(insert-text-button
+ ,(symbol-name charset)
+ 'type 'help-character-set 'help-args '(,charset))
,(format "(%s)" (charset-description charset)))
("code point"
- ,(let ((split (split-char char)))
- `(insert-text-button
- ,(if (= (charset-dimension charset) 1)
- (format "#x%02X" (nth 1 split))
- (format "#x%02X #x%02X" (nth 1 split)
- (nth 2 split)))
- 'action (lambda (&rest ignore)
- (list-charset-chars ',charset)
- (with-selected-window
- (get-buffer-window "*Character List*" 0)
- (goto-char (point-min))
- (forward-line 2) ;Skip the header.
- (let ((case-fold-search nil))
- (search-forward ,(char-to-string char)
- nil t))))
- 'help-echo
- "mouse-2, RET: show this character in its character set")))
+ ,(let ((str (if (integerp code)
+ (format (if (< code 256) "0x%02X" "0x%04X") code)
+ (format "0x%04X%04X" (car code) (cdr code)))))
+ (if (<= (charset-dimension charset) 2)
- `(widget-create
- 'link
- :notify (lambda (&rest ignore)
++ `(insert-text-button
++ ,str
++ 'action (lambda (&rest ignore)
+ (list-charset-chars ',charset)
+ (with-selected-window
+ (get-buffer-window "*Character List*" 0)
+ (goto-char (point-min))
+ (forward-line 2) ;Skip the header.
+ (let ((case-fold-search nil))
+ (if (search-forward ,(char-to-string char)
+ nil t)
+ (goto-char (match-beginning 0))))))
- ,str)
++ 'help-echo
++ "mouse-2, RET: show this character in its character set")
+ str)))
("syntax"
,(let ((syntax (syntax-after pos)))
(with-temp-buffer
,@(let ((category-set (char-category-set char)))
(if (not category-set)
'("-- none --")
- (mapcar #'(lambda (x) (format "%c:%s "
+ (mapcar #'(lambda (x) (format "%c:%s"
x (category-docstring x)))
(category-set-mnemonics category-set)))))
- ,@(let ((props (aref char-code-property-table char))
- ps)
- (when props
- (while props
- (push (format "%s:" (pop props)) ps)
- (push (format "%s;" (pop props)) ps))
- (list (cons "Properties" (nreverse ps)))))
("to input"
,@(let ((key-list (and (eq input-method-function
'quail-input-method)
((and (< char 32) (not (memq char '(9 10))))
'escape-glyph)))))
(if face (list (list "hardcoded face"
- `(widget-create
- 'link
- :notify (lambda (&rest ignore)
- (describe-face ',face))
- ,(format "%s" face))))))
- ,@(let ((unicodedata (describe-char-unicode-data char)))
+ `(insert-text-button
+ ,(symbol-name face)
+ 'type 'help-face 'help-args '(,face))))))
+ ,@(let ((unicodedata (and unicode
+ (describe-char-unicode-data unicode))))
(if unicodedata
(cons (list "Unicode data" " ") unicodedata)))))
- (setq max-width (apply #'max (mapcar #'(lambda (x)
+ (setq max-width (apply #'max (mapcar #'(lambda (x)
(if (cadr x) (length (car x)) 0))
item-list)))
- (with-output-to-temp-buffer "*Help*"
+ (help-setup-xref nil (interactive-p))
+ (with-output-to-temp-buffer (help-buffer)
(with-current-buffer standard-output
(set-buffer-multibyte multibyte-p)
(let ((formatter (format "%%%ds:" max-width)))
(insert "\nSee the variable `reference-point-alist' for "
"the meaning of the rule.\n"))
- (describe-text-properties pos (current-buffer))
- (describe-text-mode)))))
+ (if (not describe-char-unidata-list)
+ (insert "\nCharacter code properties are not shown: ")
+ (insert "\nCharacter code properties: "))
+ (widget-create 'link
+ :notify (lambda (&rest ignore)
+ (customize-variable
+ 'describe-char-unidata-list))
+ "customize what to show")
+ (insert "\n")
+ (dolist (elt describe-char-unidata-list)
+ (let ((val (get-char-code-property char elt))
+ description)
+ (when val
+ (setq description (char-code-property-description elt val))
+ (if description
+ (insert (format " %s: %s (%s)\n" elt val description))
+ (insert (format " %s: %s\n" elt val))))))
+
+ (if text-props-desc (insert text-props-desc))
+ (setq help-xref-stack-item (list 'help-insert-string (buffer-string)))
+ (toggle-read-only 1)
+ (print-help-return-message)))))
(defalias 'describe-char-after 'describe-char)
(make-obsolete 'describe-char-after 'describe-char "22.1")
;; Move over any item value, etc., to the next item.
(while (not (looking-at "[ \t\n]*\\(\\(,\\)\\|;\\|\\'\\)"))
(goto-char (or (scan-sexps (point) 1) (point-max))))
- (goto-char (match-end 2)))
+ (if (match-end 2)
+ (goto-char (match-end 2))))
(error t)))))
+
+ ;; C preprocessor(cpp) is used outside of C, C++ and Objective-C source file.
+ ;; e.g. assembler code and GNU linker script in Linux kernel.
+ ;; `cpp-font-lock-keywords' is handy for modes for the files.
+ ;;
+ ;; Here we cannot use `regexp-opt' because because regex-opt is not preloaded
+ ;; while font-lock.el is preloaded to emacs. So values pre-calculated with
+ ;; regexp-opt are used here.
+
+ ;; `cpp-font-lock-keywords-source-directives' is calculated from:
+ ;;
+ ;; (regexp-opt
+ ;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef"
+ ;; "ifndef" "include" "line" "pragma" "undef"))
+ ;;
+ (defconst cpp-font-lock-keywords-source-directives
+ "define\\|e\\(?:l\\(?:if\\|se\\)\\|ndif\\|rror\\)\\|file\\|i\\(?:f\\(?:n?def\\)?\\|nclude\\)\\|line\\|pragma\\|undef"
+ "Regular expressoin used in `cpp-font-lock-keywords'.")
+
+ ;; `cpp-font-lock-keywords-source-depth' is calculated from:
+ ;;
+ ;; (regexp-opt-depth (regexp-opt
+ ;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef"
+ ;; "ifndef" "include" "line" "pragma" "undef")))
+ ;;
+ (defconst cpp-font-lock-keywords-source-depth 0
+ "An integer representing regular expression depth of `cpp-font-lock-keywords-source-directives'.
+ Used in `cpp-font-lock-keywords'.")
+
+ (defconst cpp-font-lock-keywords
+ (let* ((directives cpp-font-lock-keywords-source-directives)
+ (directives-depth cpp-font-lock-keywords-source-depth))
+ (list
+ ;;
+ ;; Fontify error directives.
+ '("^#[ \t]*error[ \t]+\\(.+\\)" 1 font-lock-warning-face prepend)
+ ;;
+ ;; Fontify filenames in #include <...> preprocessor directives as strings.
+ '("^#[ \t]*\\(?:import\\|include\\)[ \t]*\\(<[^>\"\n]*>?\\)"
+ 1 font-lock-string-face prepend)
+ ;;
+ ;; Fontify function macro names.
+ '("^#[ \t]*define[ \t]+\\([[:alpha:]_][[:alnum:]_$]*\\)("
+ (1 font-lock-function-name-face prepend)
+ ;;
+ ;; Macro arguments.
+ ((lambda (limit)
+ (re-search-forward
+ "\\(?:\\([[:alpha:]_][[:alnum:]_]*\\)[,]?\\)"
+ (or (save-excursion (re-search-forward ")" limit t))
+ limit)
+ t))
+ nil nil (1 font-lock-variable-name-face prepend)))
+ ;;
+ ;; Fontify symbol names in #elif or #if ... defined preprocessor directives.
+ '("^#[ \t]*\\(?:elif\\|if\\)\\>"
+ ("\\<\\(defined\\)\\>[ \t]*(?\\([[:alpha:]_][[:alnum:]_]*\\)?" nil nil
+ (1 font-lock-builtin-face prepend) (2 font-lock-variable-name-face prepend t)))
+ ;;
+ ;; Fontify otherwise as symbol names, and the preprocessor directive names.
+ (list
+ (concat "^\\(#[ \t]*\\(?:" directives
+ "\\)\\)\\>[ \t!]*\\([[:alpha:]_][[:alnum:]_]*\\)?")
+ '(1 font-lock-preprocessor-face prepend)
+ (list (+ 2 directives-depth)
+ 'font-lock-variable-name-face nil t))))
+ "Font lock keyords for C preprocessor directives.
+ `c-mode', `c++-mode' and `objc-mode' have their own
+ font lock keyords for C preprocessor directives. This definition is for the
+ other modes in which C preprocessor directives are used. e.g. `asm-mode' and
+ `ld-script-mode'.")
+
\f
;; Lisp.
"Return a pretty description of STR that is encoded by CODING-SYSTEM."
(setq str (string-as-unibyte str))
(mapconcat
- (if (and coding-system (eq (coding-system-type coding-system) 2))
+ (if (and coding-system (eq (coding-system-type coding-system) 'iso-2022))
;; Try to get a pretty description for ISO 2022 escape sequences.
(function (lambda (x) (or (cdr (assq x iso-2022-control-alist))
- (format "0x%02X" x))))
- (function (lambda (x) (format "0x%02X" x))))
+ (format "#x%02X" x))))
+ (function (lambda (x) (format "#x%02X" x))))
str " "))
(defun encode-coding-char (char coding-system)
(modify-syntax-entry close ")" st))
st))
- (defun perl-font-lock-syntactic-face-function (state)
- (let ((char (nth 3 state)))
- (cond
- ((not char)
- ;; Comment or docstring.
- (if (nth 7 state) font-lock-doc-face font-lock-comment-face))
- ((and (characterp char) (eq (char-syntax (nth 3 state)) ?\"))
- ;; Normal string.
- font-lock-string-face)
- ((eq (nth 3 state) ?\n)
- ;; A `format' command.
- (save-excursion
- (when (and (re-search-forward "^\\s *\\.\\s *$" nil t)
- (not (eobp)))
- (put-text-property (point) (1+ (point)) 'syntax-table '(7)))
- font-lock-string-face))
- (t
- ;; This is regexp like quote thingy.
- (setq char (char-after (nth 8 state)))
- (save-excursion
- (let ((twoargs (save-excursion
- (goto-char (nth 8 state))
- (skip-syntax-backward " ")
- (skip-syntax-backward "w")
- (member (buffer-substring
- (point) (progn (forward-word 1) (point)))
- '("tr" "s" "y"))))
- (close (cdr (assq char perl-quote-like-pairs)))
- (pos (point))
- (st (perl-quote-syntax-table char)))
- (if (not close)
- ;; The closing char is the same as the opening char.
- (with-syntax-table st
- (parse-partial-sexp (point) (point-max)
- nil nil state 'syntax-table)
- (when twoargs
- (parse-partial-sexp (point) (point-max)
- nil nil state 'syntax-table)))
- ;; The open/close chars are matched like () [] {} and <>.
- (let ((parse-sexp-lookup-properties nil))
- (condition-case err
- (progn
- (with-syntax-table st
- (goto-char (nth 8 state)) (forward-sexp 1))
- (when twoargs
- (save-excursion
- ;; Skip whitespace and make sure that font-lock will
- ;; refontify the second part in the proper context.
- (put-text-property
- (point) (progn (forward-comment (point-max)) (point))
- 'font-lock-multiline t)
- ;;
- (unless
- (save-excursion
- (with-syntax-table
- (perl-quote-syntax-table (char-after))
- (forward-sexp 1))
- (put-text-property pos (line-end-position)
- 'jit-lock-defer-multiline t)
- (looking-at "\\s-*\\sw*e"))
- (put-text-property (point) (1+ (point))
- 'syntax-table
- (if (assoc (char-after)
- perl-quote-like-pairs)
- '(15) '(7)))))))
- ;; The arg(s) is not terminated, so it extends until EOB.
- (scan-error (goto-char (point-max))))))
- ;; Point is now right after the arg(s).
- ;; Erase any syntactic marks within the quoted text.
- (put-text-property pos (1- (point)) 'syntax-table nil)
- (when (eq (char-before (1- (point))) ?$)
- (put-text-property (- (point) 2) (1- (point))
- 'syntax-table '(1)))
- (put-text-property (1- (point)) (point)
- 'syntax-table (if close '(15) '(7)))
- font-lock-string-face))))))
- ;; (if (or twoargs (not (looking-at "\\s-*\\sw*e")))
- ;; font-lock-string-face
- ;; (font-lock-fontify-syntactically-region
- ;; ;; FIXME: `end' is accessed via dyn-scoping.
- ;; pos (min end (1- (point))) nil '(nil))
- ;; nil)))))))
+ (defun perl-font-lock-special-syntactic-constructs (limit)
+ ;; We used to do all this in a font-lock-syntactic-face-function, which
+ ;; did not work correctly because sometimes some parts of the buffer are
+ ;; treated with font-lock-syntactic-keywords but not with
+ ;; font-lock-syntactic-face-function (mostly because of
+ ;; font-lock-syntactically-fontified). That meant that some syntax-table
+ ;; properties were missing. So now we do the parse-partial-sexp loop
+ ;; ourselves directly from font-lock-syntactic-keywords, so we're sure
+ ;; it's done when necessary.
+ (let ((state (syntax-ppss))
+ char)
+ (while (< (point) limit)
+ (cond
+ ((or (null (setq char (nth 3 state)))
- (and (char-valid-p char) (eq (char-syntax (nth 3 state)) ?\")))
++ (and (characterp char) (eq (char-syntax (nth 3 state)) ?\")))
+ ;; Normal text, or comment, or docstring, or normal string.
+ nil)
+ ((eq (nth 3 state) ?\n)
+ ;; A `format' command.
+ (save-excursion
+ (when (and (re-search-forward "^\\s *\\.\\s *$" nil t)
+ (not (eobp)))
+ (put-text-property (point) (1+ (point)) 'syntax-table '(7)))))
+ (t
+ ;; This is regexp like quote thingy.
+ (setq char (char-after (nth 8 state)))
+ (save-excursion
+ (let ((twoargs (save-excursion
+ (goto-char (nth 8 state))
+ (skip-syntax-backward " ")
+ (skip-syntax-backward "w")
+ (member (buffer-substring
+ (point) (progn (forward-word 1) (point)))
+ '("tr" "s" "y"))))
+ (close (cdr (assq char perl-quote-like-pairs)))
+ (pos (point))
+ (st (perl-quote-syntax-table char)))
+ (if (not close)
+ ;; The closing char is the same as the opening char.
+ (with-syntax-table st
+ (parse-partial-sexp (point) (point-max)
+ nil nil state 'syntax-table)
+ (when twoargs
+ (parse-partial-sexp (point) (point-max)
+ nil nil state 'syntax-table)))
+ ;; The open/close chars are matched like () [] {} and <>.
+ (let ((parse-sexp-lookup-properties nil))
+ (condition-case err
+ (progn
+ (with-syntax-table st
+ (goto-char (nth 8 state)) (forward-sexp 1))
+ (when twoargs
+ (save-excursion
+ ;; Skip whitespace and make sure that font-lock will
+ ;; refontify the second part in the proper context.
+ (put-text-property
+ (point) (progn (forward-comment (point-max)) (point))
+ 'font-lock-multiline t)
+ ;;
+ (unless
+ (save-excursion
+ (with-syntax-table
+ (perl-quote-syntax-table (char-after))
+ (forward-sexp 1))
+ (put-text-property pos (line-end-position)
+ 'jit-lock-defer-multiline t)
+ (looking-at "\\s-*\\sw*e"))
+ (put-text-property (point) (1+ (point))
+ 'syntax-table
+ (if (assoc (char-after)
+ perl-quote-like-pairs)
+ '(15) '(7)))))))
+ ;; The arg(s) is not terminated, so it extends until EOB.
+ (scan-error (goto-char (point-max))))))
+ ;; Point is now right after the arg(s).
+ ;; Erase any syntactic marks within the quoted text.
+ (put-text-property pos (1- (point)) 'syntax-table nil)
+ (when (eq (char-before (1- (point))) ?$)
+ (put-text-property (- (point) 2) (1- (point))
+ 'syntax-table '(1)))
+ (put-text-property (1- (point)) (point)
+ 'syntax-table (if close '(15) '(7)))))))
+
+ (setq state (parse-partial-sexp (point) limit nil nil state
+ 'syntax-table))))
+ ;; Tell font-lock that this needs not further processing.
+ nil)
(defcustom perl-indent-level 4
;;; ps-bdf.el --- BDF font file handler for ps-print
- ;; Copyright (C) 1998, 1999, 2001 Electrotechnical Laboratory, JAPAN.
- ;; Licensed to the Free Software Foundation.
- ;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-;; Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
++;; Copyright (C) 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+ ;; Copyright (C) 1998, 1999, 2001, 2003
+ ;; National Institute of Advanced Industrial Science and Technology (AIST)
+ ;; Registration Number H14PRO021
+;; Copyright (C) 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H13PRO009
;; Keywords: wp, BDF, font, PostScript
-;; Maintainer: Kenichi Handa <handa@etl.go.jp>
+;; Maintainer: Kenichi Handa <handa@m17n.org>
;; Time-stamp: <2003/07/11 21:13:44 vinicius>
;; This file is part of GNU Emacs.
(if (or (not coding)
(eq (coding-system-type coding) t))
(setq coding default-buffer-file-coding-system))
- (if (not (char-valid-p char))
+ (if (eq (char-charset char) 'eight-bit)
(setq encoding-msg
- (format "(0%o, %d, 0x%x, raw-byte)" char char char))
- (format "(%d, #o%o, #x%x, invalid)" char char char))
++ (format "(%d, #o%o, #x%x, raw-byte)" char char char))
;; Check if the character is displayed with some `display'
;; text property. In that case, set under-display to the
;; buffer substring covered by that property.
@page
@vskip 0pt plus 1filll
@insertcopying
-This manual was generated from $Revision: 5.241 $ of $RCSfile: cc-mode.texi,v $, which can be
+
++This manual was generated from $Revision: 1.32 $ of $RCSfile: cc-mode.texi,v $, which can be
+ downloaded from
+ @url{http://cvs.sf.net/viewcvs.py/cc-mode/cc-mode/cc-mode.texi}.
@end titlepage
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/* GNU Emacs routines to deal with category tables.
- Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN.
- Licensed to the Free Software Foundation.
+ Copyright (C) 1998, 2001, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 1998, 1999
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H14PRO021
+ Copyright (C) 2003
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H13PRO009
This file is part of GNU Emacs.
/* Declarations having to do with Emacs category tables.
- Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
- Licensed to the Free Software Foundation.
+ Copyright (C) 1995, 1998, 1999
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H14PRO021
+ Copyright (C) 2003
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H13PRO009
This file is part of GNU Emacs.
/* CCL (Code Conversion Language) interpreter.
- Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN.
- Licensed to the Free Software Foundation.
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 1998, 2003, 2004, 2005
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H14PRO021
+ Copyright (C) 2003
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H13PRO009
This file is part of GNU Emacs.
/* Header for CCL (Code Conversion Language) interpreter.
- Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
- Licensed to the Free Software Foundation.
+ Copyright (C) 1995, 1998, 2000
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H14PRO021
+ Copyright (C) 2003
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H13PRO009
This file is part of GNU Emacs.
-/* Basic multilingual character support.
+/* Basic character set support.
- Copyright (C) 1995, 97, 98, 2000, 2001 Electrotechnical Laboratory, JAPAN.
- Licensed to the Free Software Foundation.
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H14PRO021
+ Copyright (C) 2003, 2004
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H13PRO009
This file is part of GNU Emacs.
-/* Header for multibyte character handler.
+/* Header for charset handler.
- Copyright (C) 1995, 1997, 1998 Electrotechnical Laboratory, JAPAN.
- Licensed to the Free Software Foundation.
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 1998, 2003
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H14PRO021
+ Copyright (C) 2003
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H13PRO009
This file is part of GNU Emacs.
-/* Coding system handler (conversion, detection, and etc).
+/* Coding system handler (conversion, detection, etc).
- Copyright (C) 1995, 1997, 1998 Electrotechnical Laboratory, JAPAN.
- Licensed to the Free Software Foundation.
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 1998, 2002, 2003, 2004, 2005
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H14PRO021
+ Copyright (C) 2003
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H13PRO009
This file is part of GNU Emacs.
/* Header for coding system handler.
- Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN.
- Licensed to the Free Software Foundation.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 1998, 2000
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H14PRO021
+ Copyright (C) 2003
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H13PRO009
- Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Emacs.
/* Composite sequence support.
- Copyright (C) 1999 Electrotechnical Laboratory, JAPAN.
- Licensed to the Free Software Foundation.
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1999
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H14PRO021
+ Copyright (C) 2003
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H13PRO009
This file is part of GNU Emacs.
/* Header for composite sequence handler.
- Copyright (C) 1999 Electrotechnical Laboratory, JAPAN.
- Licensed to the Free Software Foundation.
+ Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H14PRO021
+ Copyright (C) 2003
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H13PRO009
- Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Emacs.
/* Fontset handler.
- Copyright (C) 1995, 1997, 2000 Electrotechnical Laboratory, JAPAN.
- Licensed to the Free Software Foundation.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 1998, 2000, 2003, 2004, 2005
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H14PRO021
-
+ Copyright (C) 2003
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H13PRO009
- Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
++
This file is part of GNU Emacs.
GNU Emacs is free software; you can redistribute it and/or modify
/* Header for fontset handler.
- Copyright (C) 1995, 1997, 2000 Electrotechnical Laboratory, JAPAN.
- Licensed to the Free Software Foundation.
+ Copyright (C) 1998, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 2000
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H14PRO021
+ Copyright (C) 2003
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H13PRO009
- Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Emacs.
keymap_end:
/* We have scanned the entire keymap, and not found a binding for
IDX. Let's add one. */
- CHECK_IMPURE (insertion_point);
- XSETCDR (insertion_point,
- Fcons (Fcons (idx, def), XCDR (insertion_point)));
+ {
+ Lisp_Object elt;
+
+ if (CONSP (idx) && CHARACTERP (XCAR (idx)))
+ {
+ /* IDX specifies a range of characters, and not all of them
+ were handled yet, which means this keymap doesn't have a
+ char-table. So, we insert a char-table now. */
+ elt = Fmake_char_table (Qkeymap, Qnil);
+ Fset_char_table_range (elt, idx, NILP (def) ? Qt : def);
+ }
+ else
+ elt = Fcons (idx, def);
++ CHECK_IMPURE (insertion_point);
+ XSETCDR (insertion_point, Fcons (elt, XCDR (insertion_point)));
+ }
}
return def;
extern void init_alloc P_ ((void));
extern void syms_of_alloc P_ ((void));
extern struct buffer * allocate_buffer P_ ((void));
+ extern int valid_lisp_object_p P_ ((Lisp_Object));
+/* Defined in chartab.c */
+EXFUN (Fmake_char_table, 2);
+EXFUN (Fchar_table_parent, 1);
+EXFUN (Fset_char_table_parent, 2);
+EXFUN (Fchar_table_extra_slot, 2);
+EXFUN (Fset_char_table_extra_slot, 3);
+EXFUN (Fchar_table_range, 2);
+EXFUN (Fset_char_table_range, 3);
+EXFUN (Fset_char_table_default, 3);
+EXFUN (Foptimize_char_table, 1);
+EXFUN (Fmap_char_table, 2);
+extern Lisp_Object copy_char_table P_ ((Lisp_Object));
+extern Lisp_Object sub_char_table_ref P_ ((Lisp_Object, int));
+extern Lisp_Object char_table_ref P_ ((Lisp_Object, int));
+extern Lisp_Object char_table_ref_and_range P_ ((Lisp_Object, int,
+ int *, int *));
+extern Lisp_Object char_table_set P_ ((Lisp_Object, int, Lisp_Object));
+extern Lisp_Object char_table_set_range P_ ((Lisp_Object, int, int,
+ Lisp_Object));
+extern int char_table_translate P_ ((Lisp_Object, int));
+extern void map_char_table P_ ((void (*) (Lisp_Object, Lisp_Object,
+ Lisp_Object),
+ Lisp_Object, Lisp_Object, Lisp_Object));
+extern void syms_of_chartab P_ ((void));
+
/* Defined in print.c */
extern Lisp_Object Vprin1_to_string_buffer;
extern void debug_print P_ ((Lisp_Object));
record_unwind_protect (readevalloop_1, load_convert_to_unibyte ? Qt : Qnil);
load_convert_to_unibyte = !NILP (unibyte);
- GCPRO1 (sourcename);
- readchar_backlog = -1;
-
+ GCPRO4 (sourcename, readfun, start, end);
LOADHIST_ATTACH (sourcename);
return c | alt_modifier;
case 's':
- if (stringp)
- return ' ';
c = READCHAR;
- if (c != '-') {
- UNREAD (c);
- return ' ';
- }
+ if (c != '-')
+ {
+ UNREAD (c);
+ return ' ';
+ }
c = READCHAR;
if (c == '\\')
- c = read_escape (readcharfun, 0, byterep);
+ c = read_escape (readcharfun, 0);
return c | super_modifier;
case 'C':
#include "intervals.h"
#include "atimer.h"
#include "keymap.h"
+#include "character.h"
+#include "ccl.h"
- /* Set of macros that handle mapping of Mac modifier keys to emacs. */
- #define macCtrlKey (NILP (Vmac_reverse_ctrl_meta) ? controlKey : \
- (NILP (Vmac_command_key_is_meta) ? optionKey : cmdKey))
- #define macShiftKey (shiftKey)
- #define macMetaKey (NILP (Vmac_reverse_ctrl_meta) ? \
- (NILP (Vmac_command_key_is_meta) ? optionKey : cmdKey) \
- : controlKey)
- #define macAltKey (NILP (Vmac_command_key_is_meta) ? cmdKey : optionKey)
\f
/* Non-nil means Emacs uses toolkit scroll bars. */
int raw_pattern_size_byte;
unsigned char *patbuf;
int multibyte = !NILP (current_buffer->enable_multibyte_characters);
- unsigned char *base_pat = SDATA (string);
+ unsigned char *base_pat;
/* Set to positive if we find a non-ASCII char that need
translation. Otherwise set to zero later. */
- int charset_base = -1;
+ int char_base = -1;
int boyer_moore_ok = 1;
/* MULTIBYTE says whether the text to be searched is multibyte.
window = Fsplit_window (window, Qnil, Qnil);
else
{
- Lisp_Object upper, lower, other;
+ Lisp_Object upper, other;
- window = Fget_lru_window (frames);
+ window = Fget_lru_window (frames, Qt);
/* If the LRU window is selected, and big enough,
and can be split, split it. */
if (!NILP (window)
|| SYMBOLP (attrs[LFACE_STIPPLE_INDEX])
|| !NILP (Fbitmap_spec_p (attrs[LFACE_STIPPLE_INDEX])));
xassert (UNSPECIFIEDP (attrs[LFACE_FONT_INDEX])
+ || IGNORE_DEFFACE_P (attrs[LFACE_FONT_INDEX])
|| NILP (attrs[LFACE_FONT_INDEX])
|| STRINGP (attrs[LFACE_FONT_INDEX]));
+ xassert (UNSPECIFIEDP (attrs[LFACE_FONTSET_INDEX])
+ || STRINGP (attrs[LFACE_FONTSET_INDEX]));
#endif
}
for (i = 1; i < LFACE_VECTOR_SIZE; ++i)
if (i != LFACE_FONT_INDEX && i != LFACE_INHERIT_INDEX
- && i != LFACE_AVGWIDTH_INDEX)
+ && i != LFACE_AVGWIDTH_INDEX && i != LFACE_FONTSET_INDEX)
- if (UNSPECIFIEDP (attrs[i])
+ if ((UNSPECIFIEDP (attrs[i]) || IGNORE_DEFFACE_P (attrs[i]))
#ifdef MAC_OS
/* MAC_TODO: No stipple support on Mac OS yet, this index is
always unspecified. */
goto done_keysym;
}
+ /* Keysyms directly mapped to Unicode characters. */
+ if (keysym >= 0x01000100 && keysym <= 0x0110FFFF)
+ {
+ inev.ie.kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT;
+ inev.ie.code = keysym & 0xFFFFFF;
+ goto done_keysym;
+ }
+
+ /* Keysyms directly mapped to supported Unicode characters. */
+ if ((keysym >= 0x01000100 && keysym <= 0x010033ff)
+ || (keysym >= 0x0100e000 && keysym <= 0x0100ffff))
+ {
+ int code, charset_id, c1, c2;
+
+ if (keysym < 0x01002500)
+ charset_id = charset_mule_unicode_0100_24ff,
+ code = (keysym & 0xFFFF) - 0x100;
+ else if (keysym < 0x0100e000)
+ charset_id = charset_mule_unicode_2500_33ff,
+ code = (keysym & 0xFFFF) - 0x2500;
+ else
+ charset_id = charset_mule_unicode_e000_ffff,
+ code = (keysym & 0xFFFF) - 0xe000;
+ c1 = (code / 96) + 32, c2 = (code % 96) + 32;
+ inev.ie.kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT;
+ inev.ie.code = MAKE_CHAR (charset_id, c1, c2);
+ goto done_keysym;
+ }
+
/* Now non-ASCII. */
if (HASH_TABLE_P (Vx_keysym_table)
&& (NATNUMP (c = Fgethash (make_number (keysym),