annotate lisp/mule/arabic.el @ 844:047d37eb70d7

[xemacs-hg @ 2002-05-16 13:30:23 by ben] ui fixes for things that were bothering me bytecode.c, editfns.c, lisp.h, lread.c: Fix save-restriction to use markers rather than pseudo-markers (integers representing the amount of text on either side of the region). That way, all inserts are handled correctly, not just those inside old restriction. Add buffer argument to save_restriction_save(). process.c: Clean up very dirty and kludgy code that outputs into a buffer -- use proper unwind protects, etc. font-lock.c: Do save-restriction/widen around the function -- otherwise, incorrect results will ensue when a buffer has been narrowed before a call to e.g. `buffer-syntactic-context' -- something that happens quite often. fileio.c: Look for a handler for make-temp-name. window.c, winslots.h: Try to solve this annoying problem: have two frames displaying the buffer, in different places; in one, temporarily switch away to another buffer and then back -- and you've lost your position; it's reset to the other one in the other frame. My current solution involves window-level caches of buffers and points (also a cache for window-start); when set-window-buffer is called, it looks to see if the buffer was previously visited in the window, and if so, uses the most recent point at that time. (It's a marker, so it handles changes.) #### Note: It could be argued that doing it on the frame level would be better -- e.g. if you visit a buffer temporarily through a grep, and then go back to that buffer, you presumably want the grep's position rather than some previous position provided everything was in the same frame, even though the grep was in another window in the frame. However, doing it on the frame level fails when you have two windows on the same frame. Perhaps we keep both a window and a frame cache, and use the frame cache if there are no other windows on the frame showing the buffer, else the window's cache? This is probably something to be configurable using a specifier. Suggestions please please please? window.c: Clean up a bit code that deals with the annoyance of window-point vs. point. dialog.el: Function to ask a multiple-choice question, automatically choosing a dialog box or minibuffer representation as necessary. Generalized version of yes-or-no-p, y-or-n-p. files.el: Use get-user-response to ask "yes/no/diff" question when recovering. "diff" means that a diff is displayed between the current file and the autosave. (Converts/deconverts escape-quoted as necessary. No more complaints from you, Mr. Turnbull!) One known problem: when a dialog is used, it's modal, so you can't scroll the diff. Will fix soon. lisp-mode.el: If we're filling a string, don't treat semicolon as a comment, which would give very unfriendly results. Uses `buffer-syntactic-context'. simple.el: all changes back to the beginning. (Useful if you've saved the file in the middle of the changes.) simple.el: Add option kill-word-into-kill-ring, which controls whether words deleted with kill-word, backward-kill-word, etc. are "cut" into the kill ring, or "cleared" into nothingness. (My preference is the latter, by far. I'd almost go so far as suggesting we make it the default, as you can always select a word and then cut it if you want it cut.) menubar-items.el: Add option corresponding to kill-word-into-kill-ring.
author ben
date Thu, 16 May 2002 13:30:58 +0000
parents 2923009caf47
children 98af8a976fc3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
502
7039e6323819 [xemacs-hg @ 2001-05-04 22:41:46 by ben]
ben
parents: 333
diff changeset
1 ;;; arabic.el --- pre-loaded support for Arabic. -*- coding: iso-2022-7bit; -*-
333
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
2
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
3 ;; Copyright (C) 1992,93,94,95 Free Software Foundation, Inc.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
4 ;; Copyright (C) 1995 Amdahl Corporation.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
5 ;; Copyright (C) 1995 Sun Microsystems.
778
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
6 ;; Copyright (C) 2002 Ben Wing.
333
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
7
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
8 ;; This file is part of XEmacs.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
9
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
10 ;; XEmacs is free software; you can redistribute it and/or modify it
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
11 ;; under the terms of the GNU General Public License as published by
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
13 ;; any later version.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
14
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
15 ;; XEmacs is distributed in the hope that it will be useful, but
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
18 ;; General Public License for more details.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
19
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
21 ;; along with XEmacs; see the file COPYING. If not, write to the
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
23 ;; Boston, MA 02111-1307, USA.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
24
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
25 ;;; Commentary:
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
26
778
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
27 ;; Synched up with: Mule 2.3, FSF 21.1.
333
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
28
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
29 ;;; Code:
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
30
778
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
31 ; (make-charset 'arabic-iso8859-6
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
32 ; "Right-Hand Part of Latin/Arabic Alphabet (ISO/IEC 8859-6): ISO-IR-127"
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
33 ; '(dimension
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
34 ; 1
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
35 ; registry "ISO8859-6"
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
36 ; chars 96
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
37 ; columns 1
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
38 ; direction r2l
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
39 ; final ?G
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
40 ; graphic 1
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
41 ; short-name "RHP of ISO8859/6"
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
42 ; long-name "RHP of Arabic (ISO 8859-6): ISO-IR-127"
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
43 ; ))
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
44
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
45 ;; For Arabic, we need three different types of character sets.
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
46 ;; Digits are of direction left-to-right and of width 1-column.
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
47 ;; Others are of direction right-to-left and of width 1-column or
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
48 ;; 2-column.
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
49 (make-charset 'arabic-digit "Arabic digit"
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
50 '(dimension
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
51 1
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
52 registry "MuleArabic-0"
333
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
53 chars 94
778
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
54 columns 1
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
55 direction l2r
333
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
56 final ?2
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
57 graphic 0
778
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
58 short-name "Arabic digit"
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
59 long-name "Arabic digit"
333
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
60 ))
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
61
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
62 (make-charset 'arabic-1-column "Arabic 1-column"
778
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
63 '(dimension
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
64 1
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
65 registry "MuleArabic-1"
333
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
66 chars 94
778
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
67 columns 1
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
68 direction r2l
333
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
69 final ?3
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
70 graphic 0
778
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
71 short-name "Arabic 1-col"
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
72 long-name "Arabic 1-column"
333
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
73 ))
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
74
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
75 (make-charset 'arabic-2-column "Arabic 2-column"
778
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
76 '(dimension
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
77 1
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
78 registry "MuleArabic-2"
333
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
79 chars 94
778
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
80 columns 2
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
81 direction r2l
333
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
82 final ?4
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
83 graphic 0
778
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
84 short-name "Arabic 2-col"
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
85 long-name "Arabic 2-column"
333
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
86 ))
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
87
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 502
diff changeset
88 (make-coding-system 'iso-8859-6 'iso2022
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 502
diff changeset
89 "ISO-8859-6 (Arabic)"
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 502
diff changeset
90 '(charset-g0 ascii
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 502
diff changeset
91 charset-g1 arabic-iso8859-6
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 502
diff changeset
92 charset-g2 t
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 502
diff changeset
93 charset-g3 t
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 502
diff changeset
94 no-iso6429 t
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 502
diff changeset
95 mnemonic "MIME/Arbc"
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 502
diff changeset
96 ))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 502
diff changeset
97
333
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
98 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
99 ;;; ARABIC
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
100 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
101
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
102 ;; (define-language-environment 'arabic
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
103 ;; "Arabic"
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
104 ;; (lambda ()
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
105 ;; (require 'arabic)))
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
106
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
107 ;;; arabic.el ends here