Mercurial > hg > xemacs-beta
annotate lisp/term/linux.el @ 5607:1a507c4c6c42
Refactor out sequence-oriented builtins from fns.c to the new sequence.c.
src/ChangeLog addition:
2011-12-04 Aidan Kehoe <kehoea@parhasard.net>
* Makefile.in.in (objs):
* depend:
Add sequence.o to the list of objects and dependencies.
* alloc.c:
* alloc.c (mark_bit_vector):
* alloc.c (print_bit_vector):
* alloc.c (bit_vector_equal):
* alloc.c (internal_bit_vector_equalp_hash):
* alloc.c (bit_vector_hash):
* alloc.c (init_alloc_once_early):
Move the implementation of the bit vector type here from fns.c.
* emacs.c (main_1):
Call syms_of_sequence() here, now sequence.c is included.
* fns.c (Fold_rassq):
Move this together with the rest of the Fold_* functions.
* fns.c:
* fns.c (syms_of_fns):
Move most functions dealing with sequences generally, and
especially those taking key arguments, to a separate file,
sequence.c.
* general-slots.h:
Qyes_or_no_p belong here, not fns.c.
* lisp.h:
Make Flist_length available here, it's used by sequence.c
* sequence.c:
* sequence.c (check_sequence_range):
* sequence.c (Flength):
* sequence.c (check_other_nokey):
* sequence.c (check_other_key):
* sequence.c (check_if_key):
* sequence.c (check_match_eq_key):
* sequence.c (check_match_eql_key):
* sequence.c (check_match_equal_key):
* sequence.c (check_match_equalp_key):
* sequence.c (check_match_other_key):
* sequence.c (check_lss_key):
* sequence.c (check_lss_key_car):
* sequence.c (check_string_lessp_key):
* sequence.c (check_string_lessp_key_car):
* sequence.c (get_check_match_function_1):
* sequence.c (get_merge_predicate):
* sequence.c (count_with_tail):
* sequence.c (list_count_from_end):
* sequence.c (string_count_from_end):
* sequence.c (Fcount):
* sequence.c (Fsubseq):
* sequence.c (list_position_cons_before):
* sequence.c (FmemberX):
* sequence.c (Fadjoin):
* sequence.c (FassocX):
* sequence.c (FrassocX):
* sequence.c (position):
* sequence.c (Fposition):
* sequence.c (Ffind):
* sequence.c (delq_no_quit_and_free_cons):
* sequence.c (FdeleteX):
* sequence.c (FremoveX):
* sequence.c (list_delete_duplicates_from_end):
* sequence.c (Fdelete_duplicates):
* sequence.c (Fremove_duplicates):
* sequence.c (Fnreverse):
* sequence.c (Freverse):
* sequence.c (list_merge):
* sequence.c (array_merge):
* sequence.c (list_array_merge_into_list):
* sequence.c (list_list_merge_into_array):
* sequence.c (list_array_merge_into_array):
* sequence.c (Fmerge):
* sequence.c (list_sort):
* sequence.c (array_sort):
* sequence.c (FsortX):
* sequence.c (Ffill):
* sequence.c (mapcarX):
* sequence.c (shortest_length_among_sequences):
* sequence.c (Fmapconcat):
* sequence.c (FmapcarX):
* sequence.c (Fmapvector):
* sequence.c (Fmapcan):
* sequence.c (Fmap):
* sequence.c (Fmap_into):
* sequence.c (Fsome):
* sequence.c (Fevery):
* sequence.c (Freduce):
* sequence.c (replace_string_range_1):
* sequence.c (Freplace):
* sequence.c (Fnsubstitute):
* sequence.c (Fsubstitute):
* sequence.c (subst):
* sequence.c (sublis):
* sequence.c (Fsublis):
* sequence.c (nsublis):
* sequence.c (Fnsublis):
* sequence.c (Fsubst):
* sequence.c (Fnsubst):
* sequence.c (tree_equal):
* sequence.c (Ftree_equal):
* sequence.c (mismatch_from_end):
* sequence.c (mismatch_list_list):
* sequence.c (mismatch_list_string):
* sequence.c (mismatch_list_array):
* sequence.c (mismatch_string_array):
* sequence.c (mismatch_string_string):
* sequence.c (mismatch_array_array):
* sequence.c (get_mismatch_func):
* sequence.c (Fmismatch):
* sequence.c (Fsearch):
* sequence.c (venn):
* sequence.c (nvenn):
* sequence.c (Funion):
* sequence.c (Fset_exclusive_or):
* sequence.c (Fnset_exclusive_or):
* sequence.c (syms_of_sequence):
Add this file, containing those general functions that dealt with
sequences that were in fns.c.
* symsinit.h:
Make syms_of_sequence() available here.
man/ChangeLog addition:
2011-12-04 Aidan Kehoe <kehoea@parhasard.net>
* internals/internals.texi (Basic Lisp Modules):
Document sequence.c here too.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 04 Dec 2011 18:42:50 +0000 |
parents | 308d34e9f07d |
children |
rev | line source |
---|---|
428 | 1 ;;; linux.el --- define function key sequences for the Linux console |
2 | |
3 ;; Author: Ben Wing | |
4 ;; Keywords: terminals | |
5 | |
6 ;; Copyright (C) 1996 Ben Wing. | |
7 ;; This file is part of XEmacs. | |
8 | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
1904
diff
changeset
|
9 ;; XEmacs is free software: you can redistribute it and/or modify it |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
1904
diff
changeset
|
10 ;; under the terms of the GNU General Public License as published by the |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
1904
diff
changeset
|
11 ;; Free Software Foundation, either version 3 of the License, or (at your |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
1904
diff
changeset
|
12 ;; option) any later version. |
428 | 13 |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
1904
diff
changeset
|
14 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
1904
diff
changeset
|
15 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
1904
diff
changeset
|
16 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
1904
diff
changeset
|
17 ;; for more details. |
428 | 18 |
19 ;; You should have received a copy of the GNU General Public License | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
1904
diff
changeset
|
20 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>. |
428 | 21 |
622 | 22 ;;; Synched up with: FSF 21.0.103. |
23 ;;; (All the define-keys are our own.) | |
24 | |
25 ;;; Commentary: | |
26 | |
27 ;;; Code: | |
28 | |
29 ;; The Linux console handles Latin-1 by default. | |
30 | |
31 (if-fboundp 'set-terminal-coding-system | |
32 (unless (declare-fboundp (terminal-coding-system)) | |
33 (set-terminal-coding-system 'iso-8859-1))) | |
428 | 34 |
622 | 35 ;; Make Latin-1 input characters work, too. |
36 ;; Meta will continue to work, because the kernel | |
37 ;; turns that into Escape. | |
38 | |
39 (let ((value (current-input-mode))) | |
40 ;; The third arg only matters in that it is not t or nil. | |
1904 | 41 (set-input-mode (nth 0 value) (nth 1 value) 'iso-8859-1 (nth 3 value))) |
622 | 42 |
43 ;; The defines below seem to get automatically set in recent Termcaps. | |
44 ;; It was probably the case that in 1996, there was no good Linux termcap, | |
45 ;; which is why such a file was needed. | |
46 | |
47 ; ;; Termcap or terminfo should set these next four? | |
48 ; (define-key function-key-map "\e[A" [up]) | |
49 ; (define-key function-key-map "\e[B" [down]) | |
50 ; (define-key function-key-map "\e[C" [right]) | |
51 ; (define-key function-key-map "\e[D" [left]) | |
428 | 52 |
622 | 53 ; (define-key function-key-map "\e[[A" [f1]) |
54 ; (define-key function-key-map "\e[[B" [f2]) | |
55 ; (define-key function-key-map "\e[[C" [f3]) | |
56 ; (define-key function-key-map "\e[[D" [f4]) | |
57 ; (define-key function-key-map "\e[[E" [f5]) | |
58 ; (define-key function-key-map "\e[17~" [f6]) | |
59 ; (define-key function-key-map "\e[18~" [f7]) | |
60 ; (define-key function-key-map "\e[19~" [f8]) | |
61 ; (define-key function-key-map "\e[20~" [f9]) | |
62 ; (define-key function-key-map "\e[21~" [f10]) | |
63 ; (define-key function-key-map "\e[23~" [f11]) | |
64 ; (define-key function-key-map "\e[24~" [f12]) | |
65 ; (define-key function-key-map "\e[25~" [f13]) | |
66 ; (define-key function-key-map "\e[26~" [f14]) | |
67 ; (define-key function-key-map "\e[28~" [f15]) | |
68 ; (define-key function-key-map "\e[29~" [f16]) | |
69 ; (define-key function-key-map "\e[31~" [f17]) | |
70 ; (define-key function-key-map "\e[32~" [f18]) | |
71 ; (define-key function-key-map "\e[33~" [f19]) | |
72 ; (define-key function-key-map "\e[34~" [f20]) | |
73 | |
74 ;; But they come out f13-f20 (see above), which are not what we | |
75 ;; normally call the shifted function keys. F11 = Shift-F1, F2 = | |
76 ;; Shift-F2. What a mess, see below. | |
77 (define-key function-key-map "\e[25~" [(shift f3)]) | |
78 (define-key function-key-map "\e[26~" [(shift f4)]) | |
79 (define-key function-key-map "\e[28~" [(shift f5)]) | |
80 (define-key function-key-map "\e[29~" [(shift f6)]) | |
81 (define-key function-key-map "\e[31~" [(shift f7)]) | |
82 (define-key function-key-map "\e[32~" [(shift f8)]) | |
83 (define-key function-key-map "\e[33~" [(shift f9)]) | |
84 (define-key function-key-map "\e[34~" [(shift f10)]) | |
428 | 85 |
622 | 86 ;; I potentially considered these. They would make people's Shift-F1 and |
87 ;; Shift-F2 bindings work -- but of course they would fail to work if the | |
88 ;; person also put F11 and F12 bindings. It might also be confusing because | |
89 ;; the person with no bindings who hits f11 gets "error shift-f1 unbound". | |
90 ;; #### If only there were a proper way around this. | |
91 ;(define-key global-map 'f11 [(shift f1)]) | |
92 ;(define-key global-map 'f12 [(shift f2)]) | |
93 | |
94 ; (define-key function-key-map "\e[1~" [home]) | |
95 ;; seems to not get handled correctly automatically | |
96 (define-key function-key-map "\e[2~" [insert]) | |
97 ; (define-key function-key-map "\e[3~" [delete]) | |
98 ; (define-key function-key-map "\e[4~" [end]) | |
99 ; (define-key function-key-map "\e[5~" [prior]) | |
100 ; (define-key function-key-map "\e[6~" [next]) | |
101 ; (define-key function-key-map "\e[G" [kp-5]) | |
428 | 102 |
622 | 103 ; (define-key function-key-map "\eOp" [kp-0]) |
104 ; (define-key function-key-map "\eOq" [kp-1]) | |
105 ; (define-key function-key-map "\eOr" [kp-2]) | |
106 ; (define-key function-key-map "\eOs" [kp-3]) | |
107 ; (define-key function-key-map "\eOt" [kp-4]) | |
108 ; (define-key function-key-map "\eOu" [kp-5]) | |
109 ; (define-key function-key-map "\eOv" [kp-6]) | |
110 ; (define-key function-key-map "\eOw" [kp-7]) | |
111 ; (define-key function-key-map "\eOx" [kp-8]) | |
112 ; (define-key function-key-map "\eOy" [kp-9]) | |
428 | 113 |
622 | 114 ; (define-key function-key-map "\eOl" [kp-add]) |
115 ; (define-key function-key-map "\eOS" [kp-subtract]) | |
116 ; (define-key function-key-map "\eOM" [kp-enter]) | |
117 ; (define-key function-key-map "\eOR" [kp-multiply]) | |
118 ; (define-key function-key-map "\eOQ" [kp-divide]) | |
119 ; (define-key function-key-map "\eOn" [kp-decimal]) | |
120 ; (define-key function-key-map "\eOP" [kp-numlock]) | |
428 | 121 |
122 ;;; linux.el ends here | |
123 |