summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2005-03-23 12:53:42 +0000
committerKaroly Lorentey <lorentey@elte.hu>2005-03-23 12:53:42 +0000
commitdc2be2faa93c237c5645d83e7dbba9578232ab01 (patch)
tree67dd8ba5e1ca2c482e732ab705e9998de0a08867
parent76acbdc50490034f233bc78d14a7cd5717d9432e (diff)
downloademacs-dc2be2faa93c237c5645d83e7dbba9578232ab01.tar.gz
emacs-dc2be2faa93c237c5645d83e7dbba9578232ab01.tar.bz2
emacs-dc2be2faa93c237c5645d83e7dbba9578232ab01.zip
Fix some superflous deviations from CVS, plus apply some cosmetics.
* etc/TODO: Fix deviation from CVS. * lisp/emulation/viper-util.el: Ditto. * lisp/international/mule-cmds.el: Ditto. * lisp/progmodes/gdb-ui.el: Ditto. * src/termchar.h: Ditto. * src/xfns.c (Fx_create_frame): Ditto. * lisp/term/rxvt.el: Don't embed `(require 'server)' in eval-when-compile. * lisp/term/xterm.el: Ditto. * src/xterm.c (x_delete_display): Cosmetic change. * src/xterm.c (x_create_frame_display): Cosmetic change. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-317
-rw-r--r--etc/TODO2
-rw-r--r--lisp/emulation/viper-util.el7
-rw-r--r--lisp/international/mule-cmds.el171
-rw-r--r--lisp/progmodes/gdb-ui.el6
-rw-r--r--lisp/term/rxvt.el2
-rw-r--r--lisp/term/x-win.el5
-rw-r--r--lisp/term/xterm.el2
-rw-r--r--src/termchar.h2
-rw-r--r--src/xfns.c2
-rw-r--r--src/xterm.c31
10 files changed, 84 insertions, 146 deletions
diff --git a/etc/TODO b/etc/TODO
index d1142ec8a69..ab66def2365 100644
--- a/etc/TODO
+++ b/etc/TODO
@@ -152,7 +152,7 @@ to the FSF.
thread has processed the MENU_BAR_ACTIVATE_EVENT and regenerated
the whole menu bar. In the mean time, it should process other messages.
-** Get some major packages installed: W3/url (development version needs
+** Get some major packages installed: W3 (development version needs
significant work), PSGML. Check the assignments file for other
packages which might go in and have been missed.
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el
index a9e908f1c9c..527a04084e2 100644
--- a/lisp/emulation/viper-util.el
+++ b/lisp/emulation/viper-util.el
@@ -100,9 +100,10 @@
(fset 'viper-int-to-char (symbol-function 'identity))
(if (viper-window-display-p)
(fset 'viper-iconify (symbol-function 'iconify-or-deiconify-frame)))
- (fset 'viper-get-face (symbol-function 'internal-get-face))
- (fset 'viper-color-defined-p (symbol-function 'x-color-defined-p))
- )
+ (cond ((viper-has-face-support-p)
+ (fset 'viper-get-face (symbol-function 'internal-get-face))
+ (fset 'viper-color-defined-p (symbol-function 'x-color-defined-p))
+ )))
)
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 3fac3ab6dd9..48434169ef5 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -141,7 +141,7 @@
t)
(define-key-after set-coding-system-map [set-terminal-coding-system]
'(menu-item "For Terminal" set-terminal-coding-system
- :enable (null (memq window-system '(x w32 mac)))
+ :enable (null (memq initial-window-system '(x w32 mac)))
:help "How to encode terminal output")
t)
(define-key-after set-coding-system-map [separator-3]
@@ -2337,115 +2337,6 @@ is returned. Thus, for instance, if charset \"ISO8859-2\",
(pop cs)))
(if c (coding-system-base c)))))
-(defun set-locale-translation-file-name ()
- "Set up the locale-translation-file-name on the current system.
-
-This needs to be done at runtime for the sake of binaries
-possibly transported to a system without X."
- (setq locale-translation-file-name
- (let ((files
- '("/usr/lib/X11/locale/locale.alias" ; e.g. X11R6.4
- "/usr/X11R6/lib/X11/locale/locale.alias" ; XFree86, e.g. RedHat 4.2
- "/usr/openwin/lib/locale/locale.alias" ; e.g. Solaris 2.6
- ;;
- ;; The following name appears after the X-related names above,
- ;; since the X-related names are what X actually uses.
- "/usr/share/locale/locale.alias" ; GNU/Linux sans X
- )))
- (while (and files (not (file-exists-p (car files))))
- (setq files (cdr files)))
- (car files))))
-
-(defun get-locale-real-name (&optional locale-name)
- "Return the canonicalized name of locale LOCALE-NAME.
-
-LOCALE-NAME should be a string which is the name of a locale supported
-by the system. Often it is of the form xx_XX.CODE, where xx is a
-language, XX is a country, and CODE specifies a character set and
-coding system. For example, the locale name \"ja_JP.EUC\" might name
-a locale for Japanese in Japan using the `japanese-iso-8bit'
-coding-system. The name may also have a modifier suffix, e.g. `@euro'
-or `@cyrillic'.
-
-If LOCALE-NAME is nil, its value is taken from the environment
-variables LC_ALL, LC_CTYPE and LANG (the first one that is set).
-On server frames, the environment of the emacsclient process is
-used.
-
-See also `set-locale-environment'."
- (unless locale-name
- ;; Use the first of these three environment variables
- ;; that has a nonempty value.
- (let ((vars '("LC_ALL" "LC_CTYPE" "LANG")))
- (while (and vars
- (= 0 (length locale-name))) ; nil or empty string
- (setq locale-name (server-getenv (pop vars))))))
-
- (when locale-name
- ;; Translate "swedish" into "sv_SE.ISO8859-1", and so on,
- ;; using the translation file that many systems have.
- (when locale-translation-file-name
- (with-temp-buffer
- (insert-file-contents locale-translation-file-name)
- (when (re-search-forward
- (concat "^" (regexp-quote locale-name) ":?[ \t]+") nil t)
- (setq locale-name (buffer-substring (point) (line-end-position)))))))
- locale-name)
-
-(defun get-locale-coding-system (&optional locale)
- "Return the coding system corresponding to locale LOCALE."
- (setq locale (or locale (get-locale-real-name nil)))
- (when locale
- (or (locale-name-match locale locale-preferred-coding-systems)
- (when locale
- (if (string-match "\\.\\([^@]+\\)" locale)
- (locale-charset-to-coding-system
- (match-string 1 locale)))))))
-
-(defun configure-display-for-locale (&optional locale)
- "Set up terminal for locale LOCALE.
-
-The display table, the terminal coding system and the keyboard
-coding system of the current display device are set up for the
-given locale."
- (setq locale (or locale (get-locale-real-name nil)))
-
- (when locale
- (let ((language-name
- (locale-name-match locale locale-language-names))
- (charset-language-name
- (locale-name-match locale locale-charset-language-names))
- (coding-system
- (get-locale-coding-system locale)))
-
- ;; Give preference to charset-language-name over language-name.
- (if (and charset-language-name
- (not
- (equal (get-language-info language-name 'charset)
- (get-language-info charset-language-name 'charset))))
- (setq language-name charset-language-name))
-
- (when language-name
-
- ;; If default-enable-multibyte-characters is nil,
- ;; we are using single-byte characters,
- ;; so the display table and terminal coding system are irrelevant.
- (when default-enable-multibyte-characters
- ;; Override default-terminal-coding-system in case the
- ;; display coding can not be derived from the language
- ;; environment.
- (let ((default-terminal-coding-system coding-system))
- (set-display-table-and-terminal-coding-system language-name)))
-
- ;; Set the `keyboard-coding-system' if appropriate (tty
- ;; only). At least X and MS Windows can generate
- ;; multilingual input.
- (unless window-system
- (let ((kcs (or coding-system
- (car (get-language-info language-name
- 'coding-system)))))
- (if kcs (set-keyboard-coding-system kcs))))))))
-
;; Fixme: This ought to deal with the territory part of the locale
;; too, for setting things such as calendar holidays, ps-print paper
;; size, spelling dictionary.
@@ -2465,8 +2356,6 @@ or `@cyrillic'.
If LOCALE-NAME is nil, its value is taken from the environment
variables LC_ALL, LC_CTYPE and LANG (the first one that is set).
-On server frames, the environment of the emacsclient process is
-used.
The locale names supported by your system can typically be found in a
directory named `/usr/share/locale' or `/usr/lib/locale'. LOCALE-NAME
@@ -2477,10 +2366,43 @@ See also `locale-charset-language-names', `locale-language-names',
`locale-preferred-coding-systems' and `locale-coding-system'."
(interactive "sSet environment for locale: ")
- (let ((locale (get-locale-real-name locale-name)))
+ ;; Do this at runtime for the sake of binaries possibly transported
+ ;; to a system without X.
+ (setq locale-translation-file-name
+ (let ((files
+ '("/usr/lib/X11/locale/locale.alias" ; e.g. X11R6.4
+ "/usr/X11R6/lib/X11/locale/locale.alias" ; XFree86, e.g. RedHat 4.2
+ "/usr/openwin/lib/locale/locale.alias" ; e.g. Solaris 2.6
+ ;;
+ ;; The following name appears after the X-related names above,
+ ;; since the X-related names are what X actually uses.
+ "/usr/share/locale/locale.alias" ; GNU/Linux sans X
+ )))
+ (while (and files (not (file-exists-p (car files))))
+ (setq files (cdr files)))
+ (car files)))
+
+ (let ((locale locale-name))
+
+ (unless locale
+ ;; Use the first of these three environment variables
+ ;; that has a nonempty value.
+ (let ((vars '("LC_ALL" "LC_CTYPE" "LANG")))
+ (while (and vars
+ (= 0 (length locale))) ; nil or empty string
+ (setq locale (getenv (pop vars))))))
(when locale
+ ;; Translate "swedish" into "sv_SE.ISO8859-1", and so on,
+ ;; using the translation file that many systems have.
+ (when locale-translation-file-name
+ (with-temp-buffer
+ (insert-file-contents locale-translation-file-name)
+ (when (re-search-forward
+ (concat "^" (regexp-quote locale) ":?[ \t]+") nil t)
+ (setq locale (buffer-substring (point) (line-end-position))))))
+
;; Leave the system locales alone if the caller did not specify
;; an explicit locale name, as their defaults are set from
;; LC_MESSAGES and LC_TIME, not LC_CTYPE, and the user might not
@@ -2491,14 +2413,16 @@ See also `locale-charset-language-names', `locale-language-names',
(setq locale (downcase locale))
- (configure-display-for-locale locale)
-
(let ((language-name
(locale-name-match locale locale-language-names))
(charset-language-name
(locale-name-match locale locale-charset-language-names))
(coding-system
- (get-locale-coding-system locale)))
+ (or (locale-name-match locale locale-preferred-coding-systems)
+ (when locale
+ (if (string-match "\\.\\([^@]+\\)" locale)
+ (locale-charset-to-coding-system
+ (match-string 1 locale)))))))
(if (consp language-name)
;; locale-language-names specify both lang-env and coding.
@@ -2518,6 +2442,21 @@ See also `locale-charset-language-names', `locale-language-names',
;; to do it for both unibyte and multibyte modes.
(set-language-environment language-name)
+ ;; If default-enable-multibyte-characters is nil,
+ ;; we are using single-byte characters,
+ ;; so the display table and terminal coding system are irrelevant.
+ (when default-enable-multibyte-characters
+ (set-display-table-and-terminal-coding-system language-name))
+
+ ;; Set the `keyboard-coding-system' if appropriate (tty
+ ;; only). At least X and MS Windows can generate
+ ;; multilingual input.
+ (unless window-system
+ (let ((kcs (or coding-system
+ (car (get-language-info language-name
+ 'coding-system)))))
+ (if kcs (set-keyboard-coding-system kcs))))
+
(setq locale-coding-system
(car (get-language-info language-name 'coding-priority))))
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index c71f067ca2c..2a714e84b9a 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -1156,9 +1156,9 @@ static char *magick[] = {
"Icon for disabled breakpoint in display margin.")
;; Bitmap for breakpoint in fringe
-(when (fboundp 'define-fringe-bitmap)
- (define-fringe-bitmap 'breakpoint
- "\x3c\x7e\xff\xff\xff\xff\x7e\x3c"))
+(and (display-images-p)
+ (define-fringe-bitmap 'breakpoint
+ "\x3c\x7e\xff\xff\xff\xff\x7e\x3c"))
(defface breakpoint-enabled
'((((type tty))
diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el
index 3dbea1d46b2..32f7900ed75 100644
--- a/lisp/term/rxvt.el
+++ b/lisp/term/rxvt.el
@@ -26,7 +26,7 @@
;;; Code:
-(eval-when-compile (require 'server))
+(require 'server)
;; Set up function-key-map entries that termcap and terminfo don't know.
(let ((map (make-sparse-keymap)))
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 12e87e3bee5..aa0d1fa09c4 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -83,8 +83,7 @@
(require 'menu-bar)
(require 'fontset)
(require 'x-dnd)
-
-(eval-when-compile (require 'server))
+(require 'server)
(defvar x-invocation-args)
@@ -2242,7 +2241,7 @@ order until succeed.")
(if text
(remove-text-properties 0 (length text) '(foreign-selection nil) text))
text))
-
+
;;; Return the value of the current X selection.
;;; Consult the selection, and the cut buffer. Treat empty strings
;;; as if they were unset.
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 042df933989..431825d181a 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -26,7 +26,7 @@
;;; Code:
-(eval-when-compile (require 'server))
+(require 'server)
(let ((map (make-sparse-keymap)))
(define-key map "\e[A" [up])
diff --git a/src/termchar.h b/src/termchar.h
index 1a9d6015148..5502ca22949 100644
--- a/src/termchar.h
+++ b/src/termchar.h
@@ -1,5 +1,5 @@
/* Flags and parameters describing terminal's characteristics.
- Copyright (C) 1985, 1986, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1986 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/xfns.c b/src/xfns.c
index 6ff6b16d5b4..66f0a2e94a4 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4756,7 +4756,7 @@ x_create_tip_frame (dpyinfo, parms, text)
x_default_parameter (f, parms, Qborder_width, make_number (2),
"borderWidth", "BorderWidth", RES_TYPE_NUMBER);
- /* This defaults to 1 in order to match xterm. We recognize either
+ /* This defaults to 2 in order to match xterm. We recognize either
internalBorderWidth or internalBorder (which is what xterm calls
it). */
if (NILP (Fassq (Qinternal_border_width, parms)))
diff --git a/src/xterm.c b/src/xterm.c
index c47b52d881c..c64a73d8aa6 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -482,6 +482,7 @@ x_update_begin (f)
/* Nothing to do. */
}
+
/* Start update of window W. Set the global variable updated_window
to the window being updated and set output_cursor to the cursor
position of W. */
@@ -7542,7 +7543,7 @@ x_catch_errors_unwind (old_val)
{
Lisp_Object first = XCAR (old_val);
Display *dpy = XSAVE_VALUE (first)->pointer;
-
+
/* The display may have been closed before this function is called.
Check if it is still open before calling XSync. */
if (x_display_info_for_display (dpy) != 0)
@@ -10618,17 +10619,15 @@ x_delete_display (dpyinfo)
struct x_display_info *dpyinfo;
{
int i;
-
- {
- /* Delete the generic struct display for this X display. */
- struct display *d;
- for (d = display_list; d; d = d->next_display)
- if (d->type == output_x_window && d->display_info.x == dpyinfo)
- {
- delete_display (d);
- break;
- }
- }
+ struct display *d;
+
+ /* Delete the generic struct display for this X display. */
+ for (d = display_list; d; d = d->next_display)
+ if (d->type == output_x_window && d->display_info.x == dpyinfo)
+ {
+ delete_display (d);
+ break;
+ }
delete_keyboard_wait_descriptor (dpyinfo->connection);
@@ -10826,11 +10825,11 @@ x_create_frame_display (struct x_display_info *dpyinfo)
display->delete_display_hook = x_delete_frame_display;
display->rif = &x_redisplay_interface;
- display->scroll_region_ok = 1; /* We'll scroll partial frames. */
+ display->scroll_region_ok = 1; /* We'll scroll partial frames. */
display->char_ins_del_ok = 1;
- display->line_ins_del_ok = 1; /* We'll just blt 'em. */
- display->fast_clear_end_of_line = 1; /* X does this well. */
- display->memory_below_frame = 0; /* We don't remember what scrolls
+ display->line_ins_del_ok = 1; /* We'll just blt 'em. */
+ display->fast_clear_end_of_line = 1; /* X does this well. */
+ display->memory_below_frame = 0; /* We don't remember what scrolls
off the bottom. */
return display;