summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2005-04-26 12:17:42 +0000
committerKaroly Lorentey <lorentey@elte.hu>2005-04-26 12:17:42 +0000
commit030cd69ff13d95f439ca0d13a03215fc45959789 (patch)
tree4554735b53848a05f107b8b421a898e0e9fe7ee6 /lisp
parent3379bbb24d58ecd8dca0c96b976b7031167e76a5 (diff)
parent35b1b8abe3d3833ecb4b4cee75b7340ffb707d65 (diff)
downloademacs-030cd69ff13d95f439ca0d13a03215fc45959789.tar.gz
emacs-030cd69ff13d95f439ca0d13a03215fc45959789.tar.bz2
emacs-030cd69ff13d95f439ca0d13a03215fc45959789.zip
Merged from miles@gnu.org--gnu-2005 (patch 279-280)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-279 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-280 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-335
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog32
-rw-r--r--lisp/calc/calc-help.el14
-rw-r--r--lisp/calc/calc.el2
-rw-r--r--lisp/font-core.el11
-rw-r--r--lisp/font-lock.el3
-rw-r--r--lisp/international/mule-cmds.el3
-rw-r--r--lisp/term.el10
-rw-r--r--lisp/term/xterm.el97
8 files changed, 137 insertions, 35 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8820980bf7d..1e08f220182 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,35 @@
+2005-04-25 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * term/xterm.el (function-key-map): Fix strings for
+ {C,S,A,C-S}-f[1-4]. Use substitute-key-definition to bind
+ {C,S,A,C-S}-{f1-f12}.
+
+2005-04-26 Kenichi Handa <handa@m17n.org>
+
+ * international/mule-cmds.el (select-safe-coding-system): Fix
+ previous change.
+
+2005-04-26 Lute Kamstra <lute@gnu.org>
+
+ * calc/calc.el (calc-trail-mode): Don't set font-lock-defaults.
+
+2005-04-25 Jay Belanger <belanger@truman.edu>
+
+ * calc/calc-help.el (calc-view-news): Let-bind inhibit-read-only
+ to t while inserting information; use help-mode.
+
+2005-04-25 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * term.el (ansi-term-color-vector): Use the xterm colors.
+ (term-raw-map): Don't add mappings for \eO and \e[. Map
+ deletechar.
+
+2005-04-25 Lute Kamstra <lute@gnu.org>
+
+ * font-core.el (font-lock-defaults): Fix docstring.
+
+ * font-lock.el (font-lock-syntactic-face-function): Fix docstring.
+
2005-04-25 Kenichi Handa <handa@m17n.org>
* international/mule-cmds.el (select-safe-coding-system): Don't
diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el
index 46b8cec2ac6..2a89bb2b883 100644
--- a/lisp/calc/calc-help.el
+++ b/lisp/calc/calc-help.el
@@ -393,12 +393,14 @@ C-w Describe how there is no warranty for Calc."
(error "Can't locate Calc sources"))
(calc-quit)
(switch-to-buffer "*Help*")
- (erase-buffer)
- (insert-file-contents (expand-file-name "README" (car path)))
- (search-forward "Summary of changes")
- (forward-line -1)
- (delete-region (point-min) (point))
- (goto-char (point-min))))
+ (let ((inhibit-read-only t))
+ (erase-buffer)
+ (insert-file-contents (expand-file-name "README" (car path)))
+ (search-forward "Summary of changes")
+ (forward-line -1)
+ (delete-region (point-min) (point))
+ (goto-char (point-min)))
+ (help-mode)))
(defvar calc-help-long-names '((?b . "binary/business")
(?g . "graphics")
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index ceee013e493..ce9681b828f 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -1174,8 +1174,6 @@ commands given here will actually operate on the *Calculator* stack."
(setq buffer-read-only t)
(make-local-variable 'overlay-arrow-position)
(make-local-variable 'overlay-arrow-string)
- (set (make-local-variable 'font-lock-defaults)
- '(nil t nil nil nil (font-lock-core-only . t)))
(when buf
(set (make-local-variable 'calc-main-buffer) buf))
(when (= (buffer-size) 0)
diff --git a/lisp/font-core.el b/lisp/font-core.el
index 5bf30d4d6c5..a077ce756c0 100644
--- a/lisp/font-core.el
+++ b/lisp/font-core.el
@@ -32,7 +32,7 @@
"Defaults for Font Lock mode specified by the major mode.
Defaults should be of the form:
- (KEYWORDS KEYWORDS-ONLY CASE-FOLD SYNTAX-ALIST SYNTAX-BEGIN ...)
+ (KEYWORDS [KEYWORDS-ONLY [CASE-FOLD [SYNTAX-ALIST [SYNTAX-BEGIN ...]]]])
KEYWORDS may be a symbol (a variable or function whose value is the keywords to
use for fontification) or a list of symbols. If KEYWORDS-ONLY is non-nil,
@@ -66,11 +66,10 @@ textual modes (i.e., the mode-dependent function is known to put point and mark
around a text block relevant to that mode).
Other variables include that for syntactic keyword fontification,
-`font-lock-syntactic-keywords'
-and those for buffer-specialized fontification functions,
-`font-lock-fontify-buffer-function', `font-lock-unfontify-buffer-function',
-`font-lock-fontify-region-function', `font-lock-unfontify-region-function',
-`font-lock-inhibit-thing-lock' and `font-lock-maximum-size'.")
+`font-lock-syntactic-keywords' and those for buffer-specialized fontification
+functions, `font-lock-fontify-buffer-function',
+`font-lock-unfontify-buffer-function', `font-lock-fontify-region-function',
+`font-lock-unfontify-region-function', and `font-lock-inhibit-thing-lock'.")
(make-variable-buffer-local 'font-lock-defaults)
(defvar font-lock-defaults-alist nil
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 5bac7c56b21..3b49647395f 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -496,7 +496,7 @@ sometimes be slightly incorrect.")
"Function to determine which face to use when fontifying syntactically.
The function is called with a single parameter (the state as returned by
`parse-partial-sexp' at the beginning of the region to highlight) and
-should return a face.")
+should return a face. This is normally set via `font-lock-defaults'.")
(defvar font-lock-syntactic-keywords nil
"A list of the syntactic keywords to highlight.
@@ -646,6 +646,7 @@ Major/minor modes can set this variable if they know which option applies.")
;;;###autoload
(defun font-lock-add-keywords (mode keywords &optional append)
"Add highlighting KEYWORDS for MODE.
+
MODE should be a symbol, the major mode command name, such as `c-mode'
or nil. If nil, highlighting keywords are added for the current buffer.
KEYWORDS should be a list; see the variable `font-lock-keywords'.
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 8d758abe53f..a91c12bcaf2 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -929,7 +929,8 @@ and TO is ignored."
;; by using `find-file-literally'.
(unless (or (stringp from)
find-file-literally
- (memq (coding-system-type coding-system) '(0 5)))
+ (and coding-system
+ (memq (coding-system-type coding-system) '(0 5))))
(let ((auto-cs (save-excursion
(save-restriction
(widen)
diff --git a/lisp/term.el b/lisp/term.el
index b1ce432144e..473fafd558a 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -711,9 +711,10 @@ Buffer local variable.")
:group 'term
:type 'string)
+;;; Use the same colors that xterm uses, see `xterm-standard-colors'.
(defvar ansi-term-color-vector
- [unspecified "black" "red" "green" "yellow" "blue"
- "magenta" "cyan" "white"])
+ [unspecified "black" "red3" "green3" "yellow3" "blue2"
+ "magenta3" "cyan3" "white"])
;;; Inspiration came from comint.el -mm
(defvar term-buffer-maximum-size 2048
@@ -886,7 +887,9 @@ is buffer-local.")
(i 0))
(while (< i 128)
(define-key map (make-string 1 i) 'term-send-raw)
- (define-key esc-map (make-string 1 i) 'term-send-raw-meta)
+ ;; Avoid O and [. They are used in escape sequences for various keys.
+ (unless (or (eq i ?O) (eq i 91))
+ (define-key esc-map (make-string 1 i) 'term-send-raw-meta))
(setq i (1+ i)))
(dolist (elm (generic-character-list))
(define-key map (vector elm) 'term-send-raw))
@@ -909,6 +912,7 @@ is buffer-local.")
(define-key term-raw-map [right] 'term-send-right)
(define-key term-raw-map [left] 'term-send-left)
(define-key term-raw-map [delete] 'term-send-del)
+ (define-key term-raw-map [deletechar] 'term-send-del)
(define-key term-raw-map [backspace] 'term-send-backspace)
(define-key term-raw-map [home] 'term-send-home)
(define-key term-raw-map [end] 'term-send-end)
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 96f79f6c864..c30ee7ab34a 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -53,10 +53,15 @@
(define-key map "\e[24~" [f12])
(define-key map "\e[29~" [print])
- (define-key map "\e[11;2~" [S-f1])
- (define-key map "\e[12;2~" [S-f2])
- (define-key map "\e[13;2~" [S-f3])
- (define-key map "\e[14;2~" [S-f4])
+ (define-key map "\eOP" [f1])
+ (define-key map "\eOQ" [f2])
+ (define-key map "\eOR" [f3])
+ (define-key map "\eOS" [f4])
+
+ (define-key map "\eO2P" [S-f1])
+ (define-key map "\eO2Q" [S-f2])
+ (define-key map "\eO2R" [S-f3])
+ (define-key map "\eO2S" [S-f4])
(define-key map "\e[15;2~" [S-f5])
(define-key map "\e[17;2~" [S-f6])
(define-key map "\e[18;2~" [S-f7])
@@ -66,10 +71,10 @@
(define-key map "\e[23;2~" [S-f11])
(define-key map "\e[24;2~" [S-f12])
- (define-key map "\e[11;5~" [C-f1])
- (define-key map "\e[12;5~" [C-f2])
- (define-key map "\e[13;5~" [C-f3])
- (define-key map "\e[14;5~" [C-f4])
+ (define-key map "\eO5P" [C-f1])
+ (define-key map "\eO5Q" [C-f2])
+ (define-key map "\eO5R" [C-f3])
+ (define-key map "\eO5S" [C-f4])
(define-key map "\e[15;5~" [C-f5])
(define-key map "\e[17;5~" [C-f6])
(define-key map "\e[18;5~" [C-f7])
@@ -79,10 +84,10 @@
(define-key map "\e[23;5~" [C-f11])
(define-key map "\e[24;5~" [C-f12])
- (define-key map "\e[11;6~" [C-S-f1])
- (define-key map "\e[12;6~" [C-S-f2])
- (define-key map "\e[13;6~" [C-S-f3])
- (define-key map "\e[14;6~" [C-S-f4])
+ (define-key map "\eO6P" [C-S-f1])
+ (define-key map "\eO6Q" [C-S-f2])
+ (define-key map "\eO6R" [C-S-f3])
+ (define-key map "\eO6S" [C-S-f4])
(define-key map "\e[15;6~" [C-S-f5])
(define-key map "\e[17;6~" [C-S-f6])
(define-key map "\e[18;6~" [C-S-f7])
@@ -92,10 +97,10 @@
(define-key map "\e[23;6~" [C-S-f11])
(define-key map "\e[24;6~" [C-S-f12])
- (define-key map "\e[11;3~" [A-f1])
- (define-key map "\e[12;3~" [A-f2])
- (define-key map "\e[13;3~" [A-f3])
- (define-key map "\e[14;3~" [A-f4])
+ (define-key map "\eO3P" [A-f1])
+ (define-key map "\eO3Q" [A-f2])
+ (define-key map "\eO3R" [A-f3])
+ (define-key map "\eO3S" [A-f4])
(define-key map "\e[15;3~" [A-f5])
(define-key map "\e[17;3~" [A-f6])
(define-key map "\e[18;3~" [A-f7])
@@ -180,6 +185,66 @@
(set-keymap-parent map (keymap-parent function-key-map))
(set-keymap-parent function-key-map map))
+;;; The terminal intialization C code file might have initialized
+;;; function keys F13->F60 from the termcap/terminfo information. On
+;;; a PC-style keyboard these keys correspond to
+;;; MODIFIER-FUNCTION_KEY, where modifier is S-, C, A-, C-S-. The
+;;; code here subsitutes the corresponding defintions in
+;;; function-key-map. This substitution is needed because if a key
+;;; definition if found in function-key-map, there are no further
+;;; lookups in other keymaps.
+(substitute-key-definition [f13] [S-f1] function-key-map)
+(substitute-key-definition [f14] [S-f2] function-key-map)
+(substitute-key-definition [f15] [S-f3] function-key-map)
+(substitute-key-definition [f16] [S-f4] function-key-map)
+(substitute-key-definition [f17] [S-f5] function-key-map)
+(substitute-key-definition [f18] [S-f6] function-key-map)
+(substitute-key-definition [f19] [S-f7] function-key-map)
+(substitute-key-definition [f20] [S-f8] function-key-map)
+(substitute-key-definition [f21] [S-f9] function-key-map)
+(substitute-key-definition [f22] [S-f10] function-key-map)
+(substitute-key-definition [f23] [S-f11] function-key-map)
+(substitute-key-definition [f24] [S-f12] function-key-map)
+
+(substitute-key-definition [f25] [C-f1] function-key-map)
+(substitute-key-definition [f26] [C-f2] function-key-map)
+(substitute-key-definition [f27] [C-f3] function-key-map)
+(substitute-key-definition [f28] [C-f4] function-key-map)
+(substitute-key-definition [f29] [C-f5] function-key-map)
+(substitute-key-definition [f30] [C-f6] function-key-map)
+(substitute-key-definition [f31] [C-f7] function-key-map)
+(substitute-key-definition [f32] [C-f8] function-key-map)
+(substitute-key-definition [f33] [C-f9] function-key-map)
+(substitute-key-definition [f34] [C-f10] function-key-map)
+(substitute-key-definition [f35] [C-f11] function-key-map)
+(substitute-key-definition [f36] [C-f12] function-key-map)
+
+(substitute-key-definition [f37] [C-S-f1] function-key-map)
+(substitute-key-definition [f38] [C-S-f2] function-key-map)
+(substitute-key-definition [f39] [C-S-f3] function-key-map)
+(substitute-key-definition [f40] [C-S-f4] function-key-map)
+(substitute-key-definition [f41] [C-S-f5] function-key-map)
+(substitute-key-definition [f42] [C-S-f6] function-key-map)
+(substitute-key-definition [f43] [C-S-f7] function-key-map)
+(substitute-key-definition [f44] [C-S-f8] function-key-map)
+(substitute-key-definition [f45] [C-S-f9] function-key-map)
+(substitute-key-definition [f46] [C-S-f10] function-key-map)
+(substitute-key-definition [f47] [C-S-f11] function-key-map)
+(substitute-key-definition [f48] [C-S-f12] function-key-map)
+
+(substitute-key-definition [f49] [A-f1] function-key-map)
+(substitute-key-definition [f50] [A-f2] function-key-map)
+(substitute-key-definition [f51] [A-f3] function-key-map)
+(substitute-key-definition [f52] [A-f4] function-key-map)
+(substitute-key-definition [f53] [A-f5] function-key-map)
+(substitute-key-definition [f54] [A-f6] function-key-map)
+(substitute-key-definition [f55] [A-f7] function-key-map)
+(substitute-key-definition [f56] [A-f8] function-key-map)
+(substitute-key-definition [f57] [A-f9] function-key-map)
+(substitute-key-definition [f58] [A-f10] function-key-map)
+(substitute-key-definition [f59] [A-f11] function-key-map)
+(substitute-key-definition [f60] [A-f12] function-key-map)
+
;; Set up colors, for those versions of xterm that support it.
(defvar xterm-standard-colors
;; The names in the comments taken from XTerm-col.ad in the xterm