changeset: 4521:b75b075a9041ab8969a6351fa85560e739dcdbbb
parent: 4518:6b0000935adc3f79cb189350d6014d4b4aff734e
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Tue Aug 05 09:06:41 2008 +0200
files: lisp/ChangeLog lisp/mule/cyrillic.el lisp/mule/greek.el lisp/mule/latin.el lisp/mule/mule-cmds.el lisp/specifier.el lisp/unicode.el lisp/x-init.el
description:
Support displaying invalid UTF-8 in language-environment-specific ways.
2008-08-05 Aidan Kehoe <kehoea(a)parhasard.net>
* specifier.el (current-display-table): Initialise this here, not
in x-init.el, since we want it even on non-X builds to use the
support for displaying Unicode error sequences according to the
current locale.
* mule/mule-cmds.el (set-language-info):
Document error-sequence-coding-system, used to describe how to
display characters that are not valid Unicode on disk.
* mule/mule-cmds.el (finish-set-language-environment):
Implement error-sequence-coding-system.
* unicode.el (unicode-error-sequence-warning-face):
New face, to make it possible to distinguish invalid Unicode
sequences from the characters given by the valid Unicode
sequences.
* mule/cyrillic.el ("Russian"):
("Ukrainian"):
("Bulgarian"):
("Belarusian"):
("Cyrillic-ALT"): Add support for error-sequence-coding-system for
all these languages.
* mule/latin.el:
Add support for error-sequence-coding-system for the
Latin-alphabet language environments.
diff -r 6b0000935adc3f79cb189350d6014d4b4aff734e -r b75b075a9041ab8969a6351fa85560e739dcdbbb lisp/ChangeLog
--- a/lisp/ChangeLog Sat Jul 26 13:50:27 2008 +0300
+++ b/lisp/ChangeLog Tue Aug 05 09:06:41 2008 +0200
@@ -1,3 +1,28 @@ 2008-07-26 Aidan Kehoe <kehoea@parhasa
+2008-08-05 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * specifier.el (current-display-table): Initialise this here, not
+ in x-init.el, since we want it even on non-X builds to use the
+ support for displaying Unicode error sequences according to the
+ current locale.
+ * mule/mule-cmds.el (set-language-info):
+ Document error-sequence-coding-system, used to describe how to
+ display characters that are not valid Unicode on disk.
+ * mule/mule-cmds.el (finish-set-language-environment):
+ Implement error-sequence-coding-system.
+ * unicode.el (unicode-error-sequence-warning-face):
+ New face, to make it possible to distinguish invalid Unicode
+ sequences from the characters given by the valid Unicode
+ sequences.
+ * mule/cyrillic.el ("Russian"):
+ ("Ukrainian"):
+ ("Bulgarian"):
+ ("Belarusian"):
+ ("Cyrillic-ALT"): Add support for error-sequence-coding-system for
+ all these languages.
+ * mule/latin.el:
+ Add support for error-sequence-coding-system for the
+ Latin-alphabet language environments.
+
2008-07-26 Aidan Kehoe <kehoea(a)parhasard.net>
* x-init.el (x-initialize-compose):
diff -r 6b0000935adc3f79cb189350d6014d4b4aff734e -r b75b075a9041ab8969a6351fa85560e739dcdbbb lisp/mule/cyrillic.el
--- a/lisp/mule/cyrillic.el Sat Jul 26 13:50:27 2008 +0300
+++ b/lisp/mule/cyrillic.el Tue Aug 05 09:06:41 2008 +0200
@@ -370,6 +370,7 @@ character of the opposite case). "
(coding-system koi8-r)
(native-coding-system koi8-r)
(coding-priority koi8-r)
+ (error-sequence-coding-system koi8-r)
(input-method . "cyrillic-yawerty")
(features cyril-util)
(locale "ru")
@@ -543,6 +544,7 @@ Russian in KOI8-R. "))
"Ukrainian" '((coding-system koi8-u)
(coding-priority koi8-u)
(locale "uk")
+ (error-sequence-coding-system koi8-u)
(input-method . "cyrillic-ukrainian")
(documentation
. "Support for Ukrainian."))
@@ -689,6 +691,7 @@ KOI-8R and its relatives don't, and has
(set-language-info-alist
"Bulgarian" '((coding-system windows-1251)
(coding-priority windows-1251)
+ (error-sequence-coding-system windows-1251)
(input-method . "bulgarian-bds")
(locale "bg")
(documentation
@@ -699,6 +702,7 @@ KOI-8R and its relatives don't, and has
(set-language-info-alist
"Belarusian" '((coding-system windows-1251)
(coding-priority windows-1251)
+ (error-sequence-coding-system windows-1251)
(locale "be")
(input-method . "belarusian")
(documentation
@@ -845,6 +849,7 @@ Byelorussian in the early 1990s.)"))
"Cyrillic-ALT" '((charset cyrillic-iso8859-5)
(coding-system alternativnyj)
(native-coding-system alternativnyj)
+ (error-sequence-coding-system alternativnyj)
(coding-priority alternativnyj)
(input-method . "cyrillic-yawerty")
(features cyril-util)
diff -r 6b0000935adc3f79cb189350d6014d4b4aff734e -r b75b075a9041ab8969a6351fa85560e739dcdbbb lisp/mule/greek.el
--- a/lisp/mule/greek.el Sat Jul 26 13:50:27 2008 +0300
+++ b/lisp/mule/greek.el Tue Aug 05 09:06:41 2008 +0200
@@ -328,6 +328,7 @@ that latter standard is not used in Gree
(coding-system iso-8859-7)
(coding-priority iso-8859-7)
(native-coding-system iso-8859-7)
+ (error-sequence-coding-system iso-8859-7)
(locale "el")
(input-method . "greek")
(sample-text . "Greek (,FGkk]mija(B) ,FCei\(B ,Fsar(B")
diff -r 6b0000935adc3f79cb189350d6014d4b4aff734e -r b75b075a9041ab8969a6351fa85560e739dcdbbb lisp/mule/latin.el
--- a/lisp/mule/latin.el Sat Jul 26 13:50:27 2008 +0300
+++ b/lisp/mule/latin.el Tue Aug 05 09:06:41 2008 +0200
@@ -957,11 +957,12 @@ See also `iso-8859-2' and `window-1252'
for ((charset codesys default-input nice-charset-1 nice-charset-2
;; supported-langs is a list if the doc string is replaced
;; entirely
- supported-langs)
+ supported-langs error-sequence-coding-system)
langenvs) in
'(((latin-iso8859-1 iso-8859-1 "latin-1-prefix" "Latin-1" "ISO-8859-1"
" Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
- Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.")
+ Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish."
+ windows-1252)
(("Danish" "da")
("Dutch" "nl" "TUTORIAL.nl")
("Faeroese" "fo")
@@ -1024,6 +1025,8 @@ German (Deutsch S,A|(Bd) Gr,A|_(B Go
(coding-system ,codesys)
(coding-priority ,codesys)
(native-coding-system ,codesys)
+ (error-sequence-coding-system ,(or error-sequence-coding-system
+ codesys))
(documentation . ,(if (listp supported-langs) (car supported-langs)
(format "\
Generic language environment for %s (%s)." nice-charset-1 nice-charset-2))))
diff -r 6b0000935adc3f79cb189350d6014d4b4aff734e -r b75b075a9041ab8969a6351fa85560e739dcdbbb lisp/mule/mule-cmds.el
--- a/lisp/mule/mule-cmds.el Sat Jul 26 13:50:27 2008 +0300
+++ b/lisp/mule/mule-cmds.el Tue Aug 05 09:06:41 2008 +0200
@@ -225,7 +225,15 @@ Meaningful values for PROP include
If there is no value for this property, the MS Windows
locale is assumed to have the same name as the
- language environment."
+ language environment.
+
+ error-sequence-coding-system
+ VALUE is a fixed-width 8-bit coding system used to
+ display Unicode error sequences (using a face to make
+ it clear that the data is invalid). In Western Europe
+ this is normally windows-1252; in the Russia and the
+ former Soviet Union koi8-ru or windows-1251 makes more
+ sense."
(if (symbolp lang-env)
(setq lang-env (symbol-name lang-env)))
(let (lang-slot prop-slot)
@@ -759,6 +767,24 @@ the language environment for the major l
(let ((func (get-language-info language-name 'setup-function)))
(if (functionp func)
(funcall func)))
+
+ (let ((error-sequence-coding-system
+ (get-language-info language-name 'error-sequence-coding-system))
+ (disp-table (specifier-instance current-display-table))
+ glyph)
+ (when (consp error-sequence-coding-system)
+ (setq error-sequence-coding-system (car error-sequence-coding-system)))
+ (map-char-table
+ #'(lambda (key entry)
+ (setq glyph (make-glyph
+ (vector
+ 'string :data
+ (decode-coding-string (string entry)
+ error-sequence-coding-system))))
+ (set-glyph-face glyph 'unicode-error-sequence-warning-face)
+ (put-char-table key glyph disp-table)
+ nil)
+ unicode-error-default-translation-table))
;; Fit the charsets preferences in unicode conversions for the
;; language environment.
diff -r 6b0000935adc3f79cb189350d6014d4b4aff734e -r b75b075a9041ab8969a6351fa85560e739dcdbbb lisp/specifier.el
--- a/lisp/specifier.el Sat Jul 26 13:50:27 2008 +0300
+++ b/lisp/specifier.el Tue Aug 05 09:06:41 2008 +0200
@@ -988,4 +988,18 @@ proceed as if LOCALE were a domain."
(specifier-instance specifier domain))))
(list (cons nil inst))))))))))
+;; Character 160 (octal 0240) displays incorrectly under some X
+;; installations apparently due to a universally crocked font width
+;; specification. Display it as a space since that's what's expected.
+;;
+;; (make-char-table 'generic) instead of (make-display-table) because
+;; make-display-table isn't dumped, and this file is.
+;;
+;; We also want the global display table to be actually globally
+;; initialised; that's why this is here, and not in x-init.el, these days.
+
+(set-specifier current-display-table
+ #s(char-table type generic data (?\xA0 ?\x20))
+ 'global)
+
;;; specifier.el ends here
diff -r 6b0000935adc3f79cb189350d6014d4b4aff734e -r b75b075a9041ab8969a6351fa85560e739dcdbbb lisp/unicode.el
--- a/lisp/unicode.el Sat Jul 26 13:50:27 2008 +0300
+++ b/lisp/unicode.el Tue Aug 05 09:06:41 2008 +0200
@@ -611,6 +611,9 @@ mapping from the error sequences to the
(translate-region start finish table))
begin end buffer))
+;; Sure would be nice to be able to use defface here.
+(copy-face 'highlight 'unicode-error-sequence-warning-face)
+
(unless (featurep 'mule)
;; We do this in such a roundabout way--instead of having the above defun
;; and defvar calls inside a (when (featurep 'mule) ...) form--to have
diff -r 6b0000935adc3f79cb189350d6014d4b4aff734e -r b75b075a9041ab8969a6351fa85560e739dcdbbb lisp/x-init.el
--- a/lisp/x-init.el Sat Jul 26 13:50:27 2008 +0300
+++ b/lisp/x-init.el Tue Aug 05 09:06:41 2008 +0200
@@ -312,15 +312,4 @@ This function is a trivial wrapper aroun
(if (equal display "") (setq display nil))
(make-frame-on-device 'x display props))
-;; Character 160 (octal 0240) displays incorrectly under X apparently
-;; due to a universally crocked font width specification. Display it
-;; as a space since that's what seems to be expected.
-;;
-;; (make-char-table 'generic) instead of (make-display-table) because
-;; make-display-table isn't dumped, and this file is.
-
-(let ((tab (make-char-table 'generic)))
- (put-char-table 160 " " tab)
- (set-specifier current-display-table tab 'global 'x))
-
;;; x-init.el ends here
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
The need for this came up in some other work I was doing.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1218279984 -7200
# Node ID 31344162cf9ada294e34a48c10daa1242b6e310e
# Parent 89406c31b12521258c83389d19f80440a3a7ce48
Add #'skip-chars-quote to subr.el
2008-08-09 Aidan Kehoe <kehoea(a)parhasard.net>
* subr.el (skip-chars-quote): New.
Given STRING, return a string that means that all characters in
STRING will be skipped when passed to #'skip-chars-forward,
#'skip-chars-backward.
diff -r 89406c31b125 -r 31344162cf9a lisp/ChangeLog
--- a/lisp/ChangeLog Sat Aug 09 12:13:19 2008 +0200
+++ b/lisp/ChangeLog Sat Aug 09 13:06:24 2008 +0200
@@ -1,4 +1,13 @@
2008-08-09 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * subr.el (skip-chars-quote): New.
+ Given STRING, return a string that means that all characters in
+ STRING will be skipped when passed to #'skip-chars-forward,
+ #'skip-chars-backward.
+
+2008-08-09 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * subr.el (skip-chars-quote): New.
* mule/cyril-util.el: Remove. Use the version in packages instead.
diff -r 89406c31b125 -r 31344162cf9a lisp/subr.el
--- a/lisp/subr.el Sat Aug 09 12:13:19 2008 +0200
+++ b/lisp/subr.el Sat Aug 09 13:06:24 2008 +0200
@@ -1722,4 +1722,25 @@
;; define-mail-user-agent is in simple.el.
+;; XEmacs; added.
+(defun skip-chars-quote (string)
+ "Return a string that means all characters in STRING will be skipped,
+if passed to `skip-chars-forward' or `skip-chars-backward'.
+
+Ranges and carets are not treated specially. This implementation is
+in Lisp; do not use it in performance-critical code."
+ (let ((list (delete-duplicates (string-to-list string) :test #'=)))
+ (when (equal list '((?- ?\[) (?\[ ?\-)))
+ (error 'invalid-argument
+ "Cannot create `skip-chars-forward' arg from string"
+ string))
+ (when (memq ?\] list)
+ (setq list (cons ?\] (delq ?\] list))))
+ (when (eq ?^ (car list))
+ (setq list (nconc (cdr list) '(?^))))
+ (when (memq ?- list)
+ (setq list (delq ?- list)
+ list (nconc list (list (second list) ?- (second list) ?-))))
+ (apply #'string list)))
+
;;; subr.el ends here
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1218293086 -7200
# Node ID eb82259f265d18b2bc5c9e76d0f1222f5a0976e8
# Parent 89406c31b12521258c83389d19f80440a3a7ce48
Port write-region-inhibit-sync, allowing avoidance of bad FS performance.
See http://shaver.off.net/diary/2008/05/25/fsyncers-and-curveballs/ for more
details. This has bitten me with FreeBSD 7 recently.
2008-08-09 Aidan Kehoe <kehoea(a)parhasard.net>
Integrate Romain Francoise' 2005-09-14 (pre-GPLV3) GNU change,
which can allow much better performace with some stupid
filesystems:
* fileio.c (write_region_inhibit_fsync): New variable.
(Fwrite_region): Use it to skip call to fsync.
(syms_of_fileio): Initialize it.
diff -r 89406c31b125 -r eb82259f265d src/ChangeLog
--- a/src/ChangeLog Sat Aug 09 12:13:19 2008 +0200
+++ b/src/ChangeLog Sat Aug 09 16:44:46 2008 +0200
@@ -1,3 +1,12 @@
+2008-08-09 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ Integrate Romain Francoise' 2005-09-14 (pre-GPLV3) GNU change,
+ which can allow much better performace with some stupid
+ filesystems:
+ * fileio.c (write_region_inhibit_fsync): New variable.
+ (Fwrite_region): Use it to skip call to fsync.
+ (syms_of_fileio): Initialize it.
+
2008-08-05 Aidan Kehoe <kehoea(a)parhasard.net>
* mule-charset.c (complex_vars_of_mule_charset):
diff -r 89406c31b125 -r eb82259f265d src/fileio.c
--- a/src/fileio.c Sat Aug 09 12:13:19 2008 +0200
+++ b/src/fileio.c Sat Aug 09 16:44:46 2008 +0200
@@ -110,6 +110,11 @@
int disable_auto_save_when_buffer_shrinks;
Lisp_Object Vdirectory_sep_char;
+
+#ifdef HAVE_FSYNC
+/* Nonzero means skip the call to fsync in Fwrite-region. */
+int write_region_inhibit_fsync;
+#endif
/* These variables describe handlers that have "already" had a chance
to handle the current operation.
@@ -3568,7 +3573,7 @@
Disk full in NFS may be reported here. */
/* mib says that closing the file will try to write as fast as NFS can do
it, and that means the fsync here is not crucial for autosave files. */
- if (!auto_saving && fsync (desc) < 0
+ if (!auto_saving && !write_region_inhibit_fsync && fsync (desc) < 0
/* If fsync fails with EINTR, don't treat that as serious. */
&& errno != EINTR)
{
@@ -4560,6 +4565,15 @@
*/ );
Vauto_save_list_file_name = Qnil;
+#ifdef HAVE_FSYNC
+ DEFVAR_BOOL ("write-region-inhibit-fsync", &write_region_inhibit_fsync /*
+*Non-nil means don't call fsync in `write-region'.
+This variable affects calls to `write-region' as well as save commands.
+A non-nil value may result in data loss!
+*/ );
+ write_region_inhibit_fsync = 0;
+#endif
+
DEFVAR_LISP ("auto-save-list-file-prefix", &Vauto_save_list_file_prefix /*
Prefix for generating auto-save-list-file-name.
Emacs's pid and the system name will be appended to
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Hi Robert --
This improves Carbon support a little. I still have another error and
backtrace when I try to visit a folder in a carbon build, though; hopefully
I can resolve it in the next few days. I’ll send it on in a separate mail.
Grüße,
Aidan
xemacs-packages/vm/ChangeLog addition:
2008-08-20 Aidan Kehoe <kehoea(a)parhasard.net>
* lisp/vm-mime.el (vm-mime-charset-decode-region):
* lisp/vm-mime.el (vm-mime-charset-internally-displayable-p):
Call #'device-on-window-system-p instead of hard-coding the list
of window systems on XEmacs (improves Carbon support).
XEmacs Packages source patch:
Diff command: cvs -q diff -Nu
Files affected: xemacs-packages/vm/lisp/vm-mime.el
===================================================================
RCS
Index: xemacs-packages/vm/lisp/vm-mime.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/vm/lisp/vm-mime.el,v
retrieving revision 1.2
diff -u -u -r1.2 vm-mime.el
--- xemacs-packages/vm/lisp/vm-mime.el 2008/08/12 22:10:54 1.2
+++ xemacs-packages/vm/lisp/vm-mime.el 2008/08/20 15:56:06
@@ -321,7 +321,7 @@
(defun vm-mime-charset-decode-region (charset start end)
(or (markerp end) (setq end (vm-marker end)))
(cond ((or vm-xemacs-mule-p vm-fsfemacs-mule-p)
- (if (or (and vm-xemacs-p (memq (device-type) '(x gtk mswindows)))
+ (if (or (and vm-xemacs-p (device-on-window-system-p))
vm-fsfemacs-p
(vm-mime-tty-can-display-mime-charset charset)
nil)
@@ -4384,7 +4384,7 @@
(defun vm-mime-charset-internally-displayable-p (name)
"Can the given MIME charset be displayed within emacs by by VM?"
- (cond ((and vm-xemacs-mule-p (memq (device-type) '(x gtk mswindows)))
+ (cond ((and vm-xemacs-mule-p (device-on-window-system-p))
(or (vm-string-assoc name vm-mime-mule-charset-to-coding-alist)
(vm-mime-default-face-charset-p name)))
((and vm-fsfemacs-mule-p (memq window-system '(x mac win32 w32)))
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
changeset: 4501:c4fd85dd95bd72e8c7899ed48075c2fb26e365fa
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed Aug 20 17:39:56 2008 +0200
files: lisp/ChangeLog lisp/subr.el
description:
Add #'skip-chars-quote to subr.el
2008-08-09 Aidan Kehoe <kehoea(a)parhasard.net>
* subr.el (skip-chars-quote): New.
Given STRING, return a string that means that all characters in
STRING will be skipped when passed to #'skip-chars-forward,
#'skip-chars-backward.
diff -r c86a3c1b7416aa8f0faccdf02e2597c6a0320b15 -r c4fd85dd95bd72e8c7899ed48075c2fb26e365fa lisp/ChangeLog
--- a/lisp/ChangeLog Wed Aug 20 17:36:27 2008 +0200
+++ b/lisp/ChangeLog Wed Aug 20 17:39:56 2008 +0200
@@ -1,3 +1,10 @@ 2008-08-09 Aidan Kehoe <kehoea@parhasa
+2008-08-09 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * subr.el (skip-chars-quote): New.
+ Given STRING, return a string that means that all characters in
+ STRING will be skipped when passed to #'skip-chars-forward,
+ #'skip-chars-backward.
+
2008-08-09 Aidan Kehoe <kehoea(a)parhasard.net>
* mule/cyril-util.el: Remove. Use the version in packages instead.
diff -r c86a3c1b7416aa8f0faccdf02e2597c6a0320b15 -r c4fd85dd95bd72e8c7899ed48075c2fb26e365fa lisp/subr.el
--- a/lisp/subr.el Wed Aug 20 17:36:27 2008 +0200
+++ b/lisp/subr.el Wed Aug 20 17:39:56 2008 +0200
@@ -1722,4 +1722,25 @@ one is kept."
;; define-mail-user-agent is in simple.el.
+;; XEmacs; added.
+(defun skip-chars-quote (string)
+ "Return a string that means all characters in STRING will be skipped,
+if passed to `skip-chars-forward' or `skip-chars-backward'.
+
+Ranges and carets are not treated specially. This implementation is
+in Lisp; do not use it in performance-critical code."
+ (let ((list (delete-duplicates (string-to-list string) :test #'=)))
+ (when (equal list '((?- ?\[) (?\[ ?\-)))
+ (error 'invalid-argument
+ "Cannot create `skip-chars-forward' arg from string"
+ string))
+ (when (memq ?\] list)
+ (setq list (cons ?\] (delq ?\] list))))
+ (when (eq ?^ (car list))
+ (setq list (nconc (cdr list) '(?^))))
+ (when (memq ?- list)
+ (setq list (delq ?- list)
+ list (nconc list (list (second list) ?- (second list) ?-))))
+ (apply #'string list)))
+
;;; subr.el ends here
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
changeset: 4499:eb82259f265d18b2bc5c9e76d0f1222f5a0976e8
parent: 4493:89406c31b12521258c83389d19f80440a3a7ce48
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Aug 09 16:44:46 2008 +0200
files: src/ChangeLog src/fileio.c
description:
Port write-region-inhibit-sync, allowing avoidance of bad FS performance.
See http://shaver.off.net/diary/2008/05/25/fsyncers-and-curveballs/ for more
details.
2008-08-09 Aidan Kehoe <kehoea(a)parhasard.net>
Integrate Romain Francoise' 2005-09-14 (pre-GPLV3) GNU change,
which can allow much better performace with some stupid
filesystems:
* fileio.c (write_region_inhibit_fsync): New variable.
(Fwrite_region): Use it to skip call to fsync.
(syms_of_fileio): Initialize it.
diff -r 89406c31b12521258c83389d19f80440a3a7ce48 -r eb82259f265d18b2bc5c9e76d0f1222f5a0976e8 src/ChangeLog
--- a/src/ChangeLog Sat Aug 09 12:13:19 2008 +0200
+++ b/src/ChangeLog Sat Aug 09 16:44:46 2008 +0200
@@ -1,3 +1,12 @@ 2008-08-05 Aidan Kehoe <kehoea@parhasa
+2008-08-09 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ Integrate Romain Francoise' 2005-09-14 (pre-GPLV3) GNU change,
+ which can allow much better performace with some stupid
+ filesystems:
+ * fileio.c (write_region_inhibit_fsync): New variable.
+ (Fwrite_region): Use it to skip call to fsync.
+ (syms_of_fileio): Initialize it.
+
2008-08-05 Aidan Kehoe <kehoea(a)parhasard.net>
* mule-charset.c (complex_vars_of_mule_charset):
diff -r 89406c31b12521258c83389d19f80440a3a7ce48 -r eb82259f265d18b2bc5c9e76d0f1222f5a0976e8 src/fileio.c
--- a/src/fileio.c Sat Aug 09 12:13:19 2008 +0200
+++ b/src/fileio.c Sat Aug 09 16:44:46 2008 +0200
@@ -110,6 +110,11 @@ int disable_auto_save_when_buffer_shrink
int disable_auto_save_when_buffer_shrinks;
Lisp_Object Vdirectory_sep_char;
+
+#ifdef HAVE_FSYNC
+/* Nonzero means skip the call to fsync in Fwrite-region. */
+int write_region_inhibit_fsync;
+#endif
/* These variables describe handlers that have "already" had a chance
to handle the current operation.
@@ -3568,7 +3573,7 @@ here because write-region handler writer
Disk full in NFS may be reported here. */
/* mib says that closing the file will try to write as fast as NFS can do
it, and that means the fsync here is not crucial for autosave files. */
- if (!auto_saving && fsync (desc) < 0
+ if (!auto_saving && !write_region_inhibit_fsync && fsync (desc) < 0
/* If fsync fails with EINTR, don't treat that as serious. */
&& errno != EINTR)
{
@@ -4560,6 +4565,15 @@ File name in which we write a list of al
*/ );
Vauto_save_list_file_name = Qnil;
+#ifdef HAVE_FSYNC
+ DEFVAR_BOOL ("write-region-inhibit-fsync", &write_region_inhibit_fsync /*
+*Non-nil means don't call fsync in `write-region'.
+This variable affects calls to `write-region' as well as save commands.
+A non-nil value may result in data loss!
+*/ );
+ write_region_inhibit_fsync = 0;
+#endif
+
DEFVAR_LISP ("auto-save-list-file-prefix", &Vauto_save_list_file_prefix /*
Prefix for generating auto-save-list-file-name.
Emacs's pid and the system name will be appended to
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Hi,
Next try with getting a different default for with-xft and without-xft
(the default when nothing is specified to configure.)
This time all generated files, eg "configure" and
"lib-src/config.values.in" are left out of the diff for easy
inspection.
I'm using autoconf version 2.61. Is that good or bad for the generated
files? What toolset shall be used for updating the generated files?
# HG changeset patch
# User Mats Lidell <matsl(a)xemacs.org>
# Date 1217793652 -7200
# Node ID 772c80e0e18073f34cb1bb67cff333a852a07d37
# Parent 6b0000935adc3f79cb189350d6014d4b4aff734e
with-xft defaults to xft being used with a default setting.
If with-xft is not set it is equal to calling configure with-xft=no
diff -r 6b0000935adc -r 772c80e0e180 ChangeLog
--- a/ChangeLog Sat Jul 26 13:50:27 2008 +0300
+++ b/ChangeLog Sun Aug 03 22:00:52 2008 +0200
@@ -1,3 +1,8 @@
+2008-08-03 Mats Lidell <matsl(a)xemacs.org>
+
+ * configure.ac (XE_COMPLEX_ARG): Use different defaults for
+ with-xft and without-xft.
+
2008-07-06 Ville Skyttä <scop(a)xemacs.org>
* configure.ac (xe_fst):
diff -r 6b0000935adc -r 772c80e0e180 configure.ac
--- a/configure.ac Sat Jul 26 13:50:27 2008 +0300
+++ b/configure.ac Sun Aug 03 22:00:52 2008 +0200
@@ -690,9 +690,10 @@
[Xft],
[`emacs' (buffers), `menubars', `tabs', and `gauges'],
[X11, Xft, Xrender, freetype, and fontconfig],
- [`noemacs, nomenubars, notabs, nogauges'])],
- [],[],
- [XE_COMPLEX_OPTION([emacs],[no]),
+ [`noemacs, nomenubars, notabs, nogauges'.
+ The default when selected is `emacs, nomenubars, notabs, nogauges'])],
+ [],[with_xft_emacs=no],
+ [XE_COMPLEX_OPTION([emacs],[yes]),
XE_COMPLEX_OPTION([menubars],[no]),
XE_COMPLEX_OPTION([tabs],[no]),
XE_COMPLEX_OPTION([gauges],[no])])
Yours
--
%% Mats
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches