[AC21.5R21.4] etags and implicit tags
17 years, 7 months
Stephen J. Turnbull
APPROVE COMMIT 21.5 RECOMMEND 21.4
(sorry for the XEmacs process gobbledygook)
Steve Youngs writes:
> * Francesco Potorti` <pot(a)gnu.org> writes:
>
> > The first one is that etags should be compiled with
> > -DEMACS_NAME="\"Xemacs"\"
> > -DVERSION="\"${version}\""
> Steve T, you won't need to add `-DVERSION' in the XEmacs Makefile,
> like SXEmacs, it's already defined in config.h.
Thanks for the hint; EMACS_NAME is defined there, too. It looks like
all we actually need is -DHAVE_CONFIG_H, but I haven't tested that yet.
> Also, both XEmacs and SXEmacs define `EMACS_VERSION' which might be
> better to use in etags.c. There's an advantage for SXEmacs, (not sure
> about XEmacs), in that it will print the exact patchset revision of
> the SXEmacs that this etags goes with...
I'm going to go ahead and tentatively put both suggestions into XEmacs,
as I think that's useful precision, and there's a warning I want
suppressed so we will be a tiny bit divergent anyway. If Francesco
decides not to adopt the idea, we will probably resync (ie, get rid of
the extra info) at the next update to etags.
This patch has been tested both with "make etags" in XEmacs and
standalone with the -D flags removed from the compile command that
make etags uses. In the latter case, gcc throws a few warnings about
implicit definitions of built-in functions. (Apple's GCC 4.01)
Index: lib-src/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lib-src/ChangeLog,v
retrieving revision 1.216
diff -u -r1.216 ChangeLog
--- lib-src/ChangeLog 24 Mar 2007 11:46:43 -0000 1.216
+++ lib-src/ChangeLog 24 Mar 2007 12:21:24 -0000
@@ -0,0 +1,7 @@
+2007-03-24 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * etags.c (print_version): More precise version info. Suggested
+ by Steve Youngs.
+ (print_help): Use #ifdef; PRINT_UNDOCUMENTED_OPTIONS_HELP may be
+ undefined.
+
Index: lib-src/etags.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lib-src/etags.c,v
retrieving revision 1.37
diff -u -r1.37 etags.c
--- lib-src/etags.c 24 Mar 2007 11:46:43 -0000 1.37
+++ lib-src/etags.c 24 Mar 2007 12:21:26 -0000
@@ -834,13 +834,23 @@
#ifndef EMACS_NAME
# define EMACS_NAME "standalone"
#endif
-#ifndef VERSION
-# define VERSION "version"
+#ifdef EMACS_VERSION
+# ifdef XEMACS_EXTRA_NAME
+# define E_VERSION EMACS_VERSION " " XEMACS_EXTRA_NAME
+# else
+# define E_VERSION EMACS_VERSION
+# endif
+#elif defined(VERSION)
+# define E_VERSION VERSION
+#else
+# define E_VERSION "version"
#endif
+
static void
print_version ()
{
- printf ("%s (%s %s)\n", (CTAGS) ? "ctags" : "etags", EMACS_NAME, VERSION);
+ printf ("%s (%s %s)\n", (CTAGS) ? "ctags" : "etags", EMACS_NAME, E_VERSION);
+ puts (pot_etags_version);
puts ("Copyright (C) 2006 Free Software Foundation, Inc. and Ken Arnold");
puts ("This program is distributed under the same terms as Emacs");
@@ -978,7 +988,7 @@
Print on the standard output an index of items intended for\n\
human consumption, similar to the output of vgrind. The index\n\
is sorted, and gives the page number of each item.");
-# if PRINT_UNDOCUMENTED_OPTIONS_HELP
+# ifdef PRINT_UNDOCUMENTED_OPTIONS_HELP
puts ("-w, --no-duplicates\n\
Do not create duplicate tag entries, for compatibility with\n\
traditional ctags.");
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[AC21.5R21.4] Fix crash when using window manager to delete dialog
17 years, 7 months
Stephen J. Turnbull
APPROVE COMMIT 21.5 RECOMMEND 21.4
Applies to 21.4 HEAD with offset -2.
Per recent discussion on XEmacs Beta.
chibi:git-integration steve$ cvs diff lwlib
Index: lwlib/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/ChangeLog,v
retrieving revision 1.90
diff -u -r1.90 ChangeLog
--- lwlib/ChangeLog 17 Nov 2006 02:50:22 -0000 1.90
+++ lwlib/ChangeLog 17 May 2007 14:55:02 -0000
@@ -0,0 +1,5 @@
+2007-05-17 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * lwlib-Xaw.c (wm_delete_window): Iterate over children of shell
+ (there may be more than one) to find our widget.
+
Index: lwlib/lwlib-Xaw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/lwlib-Xaw.c,v
retrieving revision 1.13
diff -u -r1.13 lwlib-Xaw.c
--- lwlib/lwlib-Xaw.c 2 May 2006 15:30:32 -0000 1.13
+++ lwlib/lwlib-Xaw.c 17 May 2007 14:55:02 -0000
@@ -599,11 +599,14 @@
abort ();
XtSetArg (al [0], XtNchildren, &kids);
XtGetValues (shell, al, 1);
- if (!kids || !*kids)
- abort ();
- widget = kids [0];
- if (! XtIsSubclass (widget, dialogWidgetClass))
- abort ();
+ if (!kids || !*kids) abort ();
+
+ for (widget = *kids;
+ widget && ! XtIsSubclass (widget, dialogWidgetClass);
+ widget = *++kids)
+ ;
+ if (!widget) abort ();
+
id = lw_get_widget_id (widget);
if (! id) abort ();
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[AC21.5] Alphabetize ERROR_CHECK_*, sync configure docstring
17 years, 7 months
Stephen J. Turnbull
APPROVE COMMIT 21.5
I doubt this will apply to 21.4, although a similar patch might be
useful.
configure will be regenerated and committed.
ChangeLog addition:
2007-05-18 Stephen J. Turnbull <stephen(a)xemacs.org>
* configure.ac (error-checking): Reorder arguments and sync doctring.
src/ChangeLog addition:
2007-05-18 Stephen J. Turnbull <stephen(a)xemacs.org>
* config.h.in (ERROR_CHECK_BYTE_CODE): Alphabetize ERROR_CHECK_*.
21.5 source patch:
Index: configure.ac
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/configure.ac,v
retrieving revision 1.56
diff -u -u -r1.56 configure.ac
--- configure.ac 13 Mar 2007 16:48:38 -0000 1.56
+++ configure.ac 17 May 2007 15:11:51 -0000
@@ -979,20 +979,21 @@
XE_MERGED_ARG([debug],
AS_HELP_STRING([--enable-debug],[Enable additional debugging information. No time cost.]),
[], [])
+dnl Keep TESTS sorted to help with syncing doc to reality.
XE_COMPLEX_ARG([error-checking],
AS_HELP_STRING([--enable-error-checking=TESTS],[Compile with internal error-checking added.
Causes noticeable loss of speed. Valid TESTS
- are `extents', `bufpos', `malloc', `gc', `types', `text', `byte_code', `glyphs', `display', `structures'.]),
+ are `byte_code', `display', `extents', `gc', `glyphs', `malloc', `structures' `text', `types'.]),
[], [],
-[XE_COMPLEX_OPTION([extents],[""]),
- XE_COMPLEX_OPTION([types],[""]),
- XE_COMPLEX_OPTION([text],[""]),
+[XE_COMPLEX_OPTION([byte_code],[""]),
+ XE_COMPLEX_OPTION([display],[""]),
+ XE_COMPLEX_OPTION([extents],[""]),
XE_COMPLEX_OPTION([gc],[""]),
- XE_COMPLEX_OPTION([malloc],[""]),
- XE_COMPLEX_OPTION([byte_code],[""]),
XE_COMPLEX_OPTION([glyphs],[""]),
- XE_COMPLEX_OPTION([display],[""]),
- XE_COMPLEX_OPTION([structures],[""])])
+ XE_COMPLEX_OPTION([malloc],[""]),
+ XE_COMPLEX_OPTION([structures],[""])
+ XE_COMPLEX_OPTION([text],[""]),
+ XE_COMPLEX_OPTION([types],[""]),])
XE_MERGED_ARG([assertions],
AS_HELP_STRING([--enable-assertions],[Compile in runtime assertions.]),
[], [])
Index: src/config.h.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/config.h.in,v
retrieving revision 1.111
diff -u -u -r1.111 config.h.in
--- src/config.h.in 15 Feb 2007 16:12:14 -0000 1.111
+++ src/config.h.in 17 May 2007 15:12:08 -0000
@@ -579,44 +579,47 @@
/* Define one or more of the following if you want lots of extra checks
(e.g. structure validation) compiled in. These should be turned
- on during the beta-test cycle. */
+ on during the beta-test cycle.
+
+ Keep macro names sorted to help with syncing this file to configure.ac.
+ Don't forget the ERROR_CHECK_ALL stuff at the end of this file. */
+
+/* Minor sanity checking of the bytecode interpreter. Useful for
+ debugging the byte compiler. */
+#undef ERROR_CHECK_BYTE_CODE
+
+/* Sanity-check the redisplay structures after each modification. */
+#undef ERROR_CHECK_DISPLAY
/* Check the entire extent structure of a buffer each time an extent
change is done, and do other extent-related checks. */
#undef ERROR_CHECK_EXTENTS
-/* Turn on checks related to types -- make sure that all X... macros are
- dereferencing the correct type, and that all XSET... macros (as much as
- possible) are setting the correct type of structure; check any other
- places that a specific type is expected. */
-#undef ERROR_CHECK_TYPES
-
-/* Turn on checks related to text -- check that text in strings and buffers
- is in a valid format before we use it, check that buffer positions are
- valid, etc. */
-#undef ERROR_CHECK_TEXT
-
/* Attempt to catch bugs related to garbage collection (e.g. not GCPRO'ing). */
#undef ERROR_CHECK_GC
-/* Attempt to catch freeing of a non-malloc()ed block, heap corruption, etc. */
-#undef ERROR_CHECK_MALLOC
-
-/* Minor sanity checking of the bytecode interpreter. Useful for
- debugging the byte compiler. */
-#undef ERROR_CHECK_BYTE_CODE
-
/* Minor sanity checking of glyphs, especially subwindows and
widgets. */
#undef ERROR_CHECK_GLYPHS
-/* Sanity-check the redisplay structures after each modification. */
-#undef ERROR_CHECK_DISPLAY
+/* Attempt to catch freeing of a non-malloc()ed block, heap corruption, etc. */
+#undef ERROR_CHECK_MALLOC
/* Define for any sanity checks on structures that are not handled by a
more specific error-checking type. */
#undef ERROR_CHECK_STRUCTURES
+/* Turn on checks related to text -- check that text in strings and buffers
+ is in a valid format before we use it, check that buffer positions are
+ valid, etc. */
+#undef ERROR_CHECK_TEXT
+
+/* Turn on checks related to types -- make sure that all X... macros are
+ dereferencing the correct type, and that all XSET... macros (as much as
+ possible) are setting the correct type of structure; check any other
+ places that a specific type is expected. */
+#undef ERROR_CHECK_TYPES
+
/* Define DEBUG_XEMACS if you want extra debugging code compiled in.
This is mainly intended for use by developers. */
#undef DEBUG_XEMACS
@@ -1132,16 +1135,19 @@
merge the two. */
#define USE_C_FONT_LOCK
+/* Keep the #defines sorted.
+ #### Can this code ever be executed? I guess if a developer #defines
+ ERROR_CHECK_ALL above the #include it could be useful. */
#ifdef ERROR_CHECK_ALL
+#define ERROR_CHECK_BYTE_CODE
+#define ERROR_CHECK_DISPLAY
#define ERROR_CHECK_EXTENTS
-#define ERROR_CHECK_TYPES
-#define ERROR_CHECK_TEXT
#define ERROR_CHECK_GC
-#define ERROR_CHECK_MALLOC
-#define ERROR_CHECK_BYTE_CODE
#define ERROR_CHECK_GLYPHS
-#define ERROR_CHECK_DISPLAY
+#define ERROR_CHECK_MALLOC
#define ERROR_CHECK_STRUCTURES
+#define ERROR_CHECK_TEXT
+#define ERROR_CHECK_TYPES
#endif /* ERROR_CHECK_ALL */
#endif /* _SRC_CONFIG_H_ */
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT] Eliminate a few problems in man/internals/internals.texi
17 years, 7 months
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed.
2007-05-15 Aidan Kehoe <kehoea(a)parhasard.net>
* internals/internals.texi:
Replace an inaccurate description of the read syntax of a Kanji
character with one using the recently-added Unicode escapes. Also
update the size of an Ichar; they're now 21-bit integers, not
19-bit integers.
Index: internals/internals.texi
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/man/internals/internals.texi,v
retrieving revision 1.79
diff -u -r1.79 internals.texi
--- internals/internals.texi 2007/04/30 16:22:35 1.79
+++ internals/internals.texi 2007/05/15 10:21:28
@@ -7526,22 +7526,12 @@
converts to a char that represents the lowercase letter b.
@example
-?^[$(B#&^[(B
+?\u5357
@end example
-(where @samp{^[} actually is an @samp{ESC} character) converts to a
-particular Kanji character when using an ISO2022-based coding system for
-input. (To decode this goo: @samp{ESC} begins an escape sequence;
-@samp{ESC $ (} is a class of escape sequences meaning ``switch to a
-94x94 character set''; @samp{ESC $ ( B} means ``switch to Japanese
-Kanji''; @samp{#} and @samp{&} collectively index into a 94-by-94 array
-of characters [subtract 33 from the ASCII value of each character to get
-the corresponding index]; @samp{ESC (} is a class of escape sequences
-meaning ``switch to a 94 character set''; @samp{ESC (B} means ``switch
-to US ASCII''. It is a coincidence that the letter @samp{B} is used to
-denote both Japanese Kanji and US ASCII. If the first @samp{B} were
-replaced with an @samp{A}, you'd be requesting a Chinese Hanzi character
-from the GB2312 character set.)
+converts to a Han character meaning ``south, southwards''; depending on
+how your XEmacs is configured, it will be assigned to either a Japanese
+or Chinese character set (possibly even a Korean one).
@example
"foobar"
@@ -9890,7 +9880,7 @@
8-bit integer with possible values from 0 - 255. 0 - 127 are the
standard ASCII characters, while 128 - 255 are the characters from the
ISO-8859-1 character set. If we have compiled with MULE support, an
-Ichar is a 19-bit integer, with the various bits having meanings
+Ichar is a 21-bit integer, with the various bits having meanings
according to a complex scheme that will be detailed later. The
characters numbered 0 - 255 still have the same meanings as for the
non-MULE case, though.
@@ -9930,9 +9920,9 @@
Astute readers may notice that the text in a buffer is represented as
an array of @emph{bytes}, while (at least in the MULE case) an Ichar is
-a 19-bit integer, which clearly cannot fit in a byte. This means (of
+a 21-bit integer, which clearly cannot fit in a byte. This means (of
course) that the text in a buffer uses a different representation from
-an Ichar: specifically, the 19-bit Ichar becomes a series of one to
+an Ichar: specifically, the 21-bit Ichar becomes a series of one to
four bytes. The conversion between these two representations is complex
and will be described later.
@@ -10977,7 +10967,7 @@
arguments that need to be in Unicode format. (mswindows-unicode is a
coding system of type UTF-16)
-@item ms-windows-multi-byte
+@item mswindows-multi-byte
this is used for representing text passed to MS Windows API calls with
arguments that need to be in multi-byte format. Note that there are
very few if any examples of such calls.
@@ -10995,17 +10985,19 @@
used for text sent to or read from a text terminal in the absence of a
more specific coding system (calls to window-system specific APIs should
use the appropriate window-specific coding system if it makes sense to
-do so.)
+do so.) Like others here, this is a coding system alias.
@item file-name
used when specifying the names of files in the absence of a more
-specific encoding, such as ms-windows-tstr.
+specific encoding, such as ms-windows-tstr. This is a coding system
+alias -- what it's an alias of is determined at startup.
@item native
the most general coding system for specifying text passed to system
calls. This generally translates to whatever coding system is specified
by the current locale. This should only be used when none of the coding
-systems mentioned above are appropriate.
+systems mentioned above are appropriate. This is a coding system
+alias -- what it's an alias of is determined at startup.
@end table
@subheading Proper Display of Multilingual Text
@@ -11274,7 +11266,7 @@
There are two internal encodings for characters in XEmacs/Mule. One is
called @dfn{string encoding} and is an 8-bit encoding that is used for
representing characters in a buffer or string. It uses 1 to 4 bytes per
-character. The other is called @dfn{character encoding} and is a 19-bit
+character. The other is called @dfn{character encoding} and is a 21-bit
encoding that is used for representing characters individually in a
variable.
--
When I was in the scouts, the leader told me to pitch a tent. I couldn't
find any pitch, so I used creosote.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT] Re: eshell doesn't append suffix ".exe" as emacs eshell does
17 years, 7 months
Aidan Kehoe
Ar an t-aonú lá déag de mí Bealtaine, scríobh Aidan Kehoe:
>
> Ar an t-ochtú lá de mí Bealtaine, scríobh Rockefeller, Harry:
>
> > ================================================================
> > Dear Bug Team!
> > Some commands work such as which, ls, cp. Others, such as id,
> > do not work, but they do work in an emacs eshell. This is best
> > shown by a snippit of my xemacs eshell: [...]
>
> The below patch fixes the problem for me. Make sure to recompile
> esh-util.elc and restart your XEmacs before testing it.
APPROVE COMMIT
NOTE: This patch has been committed.
xemacs-packages/eshell/ChangeLog addition:
2007-05-13 Aidan Kehoe <kehoea(a)parhasard.net>
* esh-util.el (eshell-under-windows-p):
This function is used to determine whether .exe should be appended
to executable names when searching for them; this is as true of
cygwin32 as it is of windows-nt and ms-dos.
[...]
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Re: [PATCH] package building problems.
17 years, 7 months
Aidan Kehoe
Ar an triú lá déag de mí Bealtaine, scríobh Stephen J. Turnbull:
> Aidan Kehoe writes:
>
> > Beyond that, the dependency tracking appears to be broken
>
> Broken? Surely you jest. It's non-existent, always has been.
>
> > -REQUIRES = tramp xemacs-base vc efs dired mail-lib gnus ediff sh-script
> > +REQUIRES = tramp xemacs-base vc efs dired mail-lib gnus ediff sh-script edebug
>
> Huh? REQUIRES += edebug? I don't get it.
Because the version of tramp.el from December--which was being compiled
despite my cvs update?!?!--has this line:
(def-edebug-spec with-parsed-tramp-file-name (form symbolp body))
Checking current CVS over the web reveals a more sensible:
(eval-and-compile
(when (featurep 'edebug)
(def-edebug-spec with-parsed-tramp-file-name (form symbolp body))))
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] package building problems.
17 years, 7 months
Aidan Kehoe
Despite the package smoketest succeeding, I find I need the below patches
(to jde-util.el and to tramp/Makefile) to get a checked-out tree to build
with XEmacs 21.4.20 with no installed packages. Is anyone else seeing
similar behaviour?
Also included is a couple of autoloads necessary for M-x gnus to work
correctly (on my machine).
Beyond that, the dependency tracking appears to be broken; after a make
install on this tree, with compiled files from several months ago, I got
constant errors from lazy-lock-pre-idle-fontify-windows until I deleted all
.elc files and did a make install again.
? packages-current-checked-out
Index: xemacs-packages/gnus/lisp/parse-time.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/gnus/lisp/parse-time.el,v
retrieving revision 1.5
diff -u -u -r1.5 parse-time.el
--- xemacs-packages/gnus/lisp/parse-time.el 2006/03/16 04:18:06 1.5
+++ xemacs-packages/gnus/lisp/parse-time.el 2007/05/12 21:19:35
@@ -114,10 +114,12 @@
list)))
(nreverse list)))
+;;;###autoload
(defvar parse-time-months '(("jan" . 1) ("feb" . 2) ("mar" . 3)
("apr" . 4) ("may" . 5) ("jun" . 6)
("jul" . 7) ("aug" . 8) ("sep" . 9)
("oct" . 10) ("nov" . 11) ("dec" . 12)))
+;;;###autoload
(defvar parse-time-weekdays '(("sun" . 0) ("mon" . 1) ("tue" . 2)
("wed" . 3) ("thu" . 4) ("fri" . 5) ("sat" . 6)))
(defvar parse-time-zoneinfo `(("z" 0) ("ut" 0) ("gmt" 0)
Index: xemacs-packages/jde/lisp/jde-util.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/jde/lisp/jde-util.el,v
retrieving revision 1.4
diff -u -u -r1.4 jde-util.el
--- xemacs-packages/jde/lisp/jde-util.el 2006/03/03 20:42:41 1.4
+++ xemacs-packages/jde/lisp/jde-util.el 2007/05/12 21:23:47
@@ -166,6 +166,7 @@
"../"
(file-name-directory (locate-library "jde")))))
+;;;###autoload
(defun jde-find-jde-data-directory ()
"Return the path of the JDE data directory.
Returns the path of the directory containing the
Index: xemacs-packages/tramp/Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/tramp/Makefile,v
retrieving revision 1.65
diff -u -u -r1.65 Makefile
--- xemacs-packages/tramp/Makefile 2006/12/30 21:03:02 1.65
+++ xemacs-packages/tramp/Makefile 2007/05/12 21:28:41
@@ -22,7 +22,7 @@
MAINTAINER = Kai Großjohann <kai.grossjohann(a)gmx.net>
PACKAGE = tramp
PKG_TYPE = regular
-REQUIRES = tramp xemacs-base vc efs dired mail-lib gnus ediff sh-script
+REQUIRES = tramp xemacs-base vc efs dired mail-lib gnus ediff sh-script edebug
CATEGORY = standard
include ../../Local.rules.inc
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] Have set-buffer-file-coding-system mark the buffer as modified.
17 years, 7 months
Aidan Kehoe
lisp/ChangeLog addition:
2007-04-30 Aidan Kehoe <kehoea(a)parhasard.net>
* code-files.el (set-buffer-file-coding-system):
Make set-buffer-file-coding-system update the buffer's modified
flag. Also make it accept a new flag, NOMODIFY, taken from GNU, to
suppress this behaviour.
* code-files.el (insert-file-contents):
Use the NOMODIFY flag when calling set-buffer-file-coding-system.
XEmacs Trunk source patch:
Diff command: cvs -q diff -Nu
Files affected: lisp/code-files.el
===================================================================
RCS
Index: lisp/code-files.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/code-files.el,v
retrieving revision 1.20
diff -u -u -r1.20 code-files.el
--- lisp/code-files.el 2006/12/05 08:21:03 1.20
+++ lisp/code-files.el 2007/04/30 14:42:35
@@ -105,20 +105,36 @@
`buffer-file-coding-system-for-read', but is overridden by
`coding-system-for-read'.")
-(defun set-buffer-file-coding-system (coding-system &optional force)
- "Set buffer-file-coding-system of the current buffer to CODING-SYSTEM.
-If optional argument FORCE (interactively, the prefix argument) is not
-given, attempt to match the EOL type of the new coding system to
-the current value of `buffer-file-coding-system'."
- (interactive "zFile coding system: \nP")
- (get-coding-system coding-system) ;; correctness check
- (if (not force)
- (setq coding-system
+(defun set-buffer-file-coding-system (coding-system &optional force nomodify)
+ "Set the file coding-system of the current buffer to CODING-SYSTEM.
+This means that when you save the buffer, it will be converted
+according to CODING-SYSTEM. For a list of possible values of CODING-SYSTEM,
+use \\[list-coding-systems].
+
+If CODING-SYSTEM leaves the text conversion unspecified, or if it
+leaves the end-of-line conversion unspecified, FORCE controls what to
+do. If FORCE is nil, get the unspecified aspect (or aspects) from the
+buffer's previous `buffer-file-coding-system' value (if it is
+specified there). Otherwise, leave it unspecified.
+
+This marks the buffer modified so that the succeeding \\[save-buffer]
+surely saves the buffer with CODING-SYSTEM. From a program, if you
+don't want to mark the buffer modified, specify t for NOMODIFY.
+If you know exactly what coding system you want to use,
+just set the variable `buffer-file-coding-system' directly."
+ (interactive "zCoding system for saving file (default nil): \nP")
+ (check-coding-system coding-system)
+ (if (and coding-system buffer-file-coding-system (null force))
+ (setq coding-system
(subsidiary-coding-system
coding-system
(coding-system-eol-type buffer-file-coding-system))))
- (setq buffer-file-coding-system coding-system)
- (redraw-modeline t))
+ (setq buffer-file-coding-system coding-system)
+ ;; XEmacs change; remove a call to ucs-set-table-for-input, which we don't
+ ;; have.
+ (unless nomodify
+ (set-buffer-modified-p t))
+ (force-mode-line-update))
(defun toggle-buffer-file-coding-system ()
"Set EOL type of buffer-file-coding-system of the current buffer to
@@ -456,10 +472,11 @@
;; set its eol type to what was found, if it wasn't
;; set already.
(set-buffer-file-coding-system
- (subsidiary-coding-system buffer-file-coding-system
- (coding-system-eol-type coding-system)) t)
+ (subsidiary-coding-system
+ buffer-file-coding-system
+ (coding-system-eol-type coding-system)) t t)
;; otherwise actually set buffer-file-coding-system.
- (set-buffer-file-coding-system coding-system t)))
+ (set-buffer-file-coding-system coding-system t t)))
;; ... and `buffer-file-coding-system-when-loaded'. the machinations
;; of set-buffer-file-coding-system cause the actual coding system
;; object to be stored, so do that here, too.
cvs server: cannot find modules/ldap/configure
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT] Zero out device modifier map after freeing it, X11, GTK
17 years, 7 months
Aidan Kehoe
Ar an dara lá déag de mí Bealtaine, scríobh Aidan Kehoe:
> I’ll commit the change anyway; there’s no reason to keep a pointer to the
> modifier map once it’s been freed.
APPROVE COMMIT
NOTE: This patch has been committed.
src/ChangeLog addition:
2007-05-12 Aidan Kehoe <kehoea(a)parhasard.net>
* event-Xt.c (x_reset_modifier_mapping):
* event-gtk.c (gtk_reset_modifier_mapping):
Zero out the device's modifier map once we've freed it, to prevent
a double free on a re-entrant call.
XEmacs Trunk source patch:
Diff command: cvs -q diff -Nu
Files affected: src/event-gtk.c
===================================================================
RCS src/event-Xt.c
===================================================================
RCS
Index: src/event-Xt.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/event-Xt.c,v
retrieving revision 1.91
diff -u -u -r1.91 event-Xt.c
--- src/event-Xt.c 2005/12/24 19:54:01 1.91
+++ src/event-Xt.c 2007/05/12 10:37:09
@@ -323,7 +323,14 @@
xd->lock_interpretation = 0;
if (xd->x_modifier_keymap)
- XFreeModifiermap (xd->x_modifier_keymap);
+ {
+ XFreeModifiermap (xd->x_modifier_keymap);
+ /* Set it to NULL in case we receive two MappingModifier events in a
+ row, and the second is processed during some CHECK_QUITs within
+ x_reset_key_mapping. If that happens, XFreeModifierMap will be
+ called twice on the same map, and we crash. */
+ xd->x_modifier_keymap = NULL;
+ }
x_reset_key_mapping (d);
Index: src/event-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/event-gtk.c,v
retrieving revision 1.31
diff -u -u -r1.31 event-gtk.c
--- src/event-gtk.c 2005/07/03 21:48:00 1.31
+++ src/event-gtk.c 2007/05/12 10:37:10
@@ -1863,7 +1863,14 @@
xd->lock_interpretation = 0;
if (map)
- XFreeModifiermap (map);
+ {
+ XFreeModifiermap (xd->x_modifier_keymap);
+ /* Set it to NULL in case we receive two MappingModifier events in a
+ row, and the second is processed during some CHECK_QUITs within
+ x_reset_key_mapping. If that happens, XFreeModifierMap will be
+ called twice on the same map, and we crash. */
+ xd->x_modifier_keymap = NULL;
+ }
gtk_reset_key_mapping (d);
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] Non-Latin-1 escapes can lead to corrupted ELC code.
17 years, 7 months
Aidan Kehoe
Without this patch, the following test file is compiled incorrectly:
(defvar Pravda "\u05bf\u05e0\u05d0\u05d2\u05d4\u05d0")
The bug dates from my introduction of Unicode escapes, since previously we
didn’t allow non-Latin-1 chars to be specified with ?\x or ?\. FSF have had
a similar problem for much longer, since they’ve always allowed non-Latin-1
characters to be specified with ?\x and ?\, but it manifests itself on load,
not on compile.
ChangeLog addition:
lisp/ChangeLog addition:
2007-05-07 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecomp.el (byte-compile-insert-header):
Check for any Unicode escapes in the source file text when
deciding whether Mule support is necessary for it, and whether to
use escape-quoted as the .elc coding system.
XEmacs Trunk source patch:
Diff command: cvs -q diff -Nu
Files affected: lisp/bytecomp.el
===================================================================
Index: lisp/bytecomp.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/bytecomp.el,v
retrieving revision 1.19
diff -u -u -r1.19 bytecomp.el
--- lisp/bytecomp.el 2004/08/13 21:19:15 1.19
+++ lisp/bytecomp.el 2007/05/06 23:32:41
@@ -1842,10 +1842,16 @@
(save-excursion
(set-buffer byte-compile-inbuffer)
(goto-char (point-min))
- ;; mrb- There must be a better way than skip-chars-forward
- (skip-chars-forward (concat (char-to-string 0) "-"
- (char-to-string 255)))
- (eq (point) (point-max))))
+ ;; Look for any non-Latin-1 literals or Unicode character
+ ;; escapes. Also catches them in comments, which is actually
+ ;; irrelevant to us, but implementing a more complex algorithm
+ ;; is not worth the trade-off.
+ (let ((case-fold-search nil))
+ (re-search-forward
+ (concat "[^\000-\377]"
+ #r"\\u[0-9a-fA-F]\{4,4\}\|\\U[0-9a-fA-F]\{8,8\}")
+ nil t)))
+ (eq (point) (point-max)))
(setq buffer-file-coding-system 'raw-text-unix)
(insert "(or (featurep 'mule) (error \"Loading this file requires Mule support\"))
;;;###coding system: escape-quoted\n")
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches