1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

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
This commit is contained in:
Karoly Lorentey 2005-03-23 12:53:42 +00:00
parent 76acbdc504
commit dc2be2faa9
10 changed files with 84 additions and 146 deletions

View File

@ -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.

View File

@ -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))
)))
)

View File

@ -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))))

View File

@ -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))

View File

@ -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)))

View File

@ -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.

View File

@ -26,7 +26,7 @@
;;; Code:
(eval-when-compile (require 'server))
(require 'server)
(let ((map (make-sparse-keymap)))
(define-key map "\e[A" [up])

View File

@ -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.

View File

@ -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)))

View File

@ -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;