freebsd-ports/editors/emacs/files/patch-src_coding.c
Ashish SHUKLA d98bb49da8 GNU Emacs updates
editors/emacs
- Update to v. 24.1[1]
- Update CANNA patch to v. 24.1[2]
- Convert OPTIONS to OptionsNG
- Remove patch to VC to make it work with Subversion 1.7
- Add patch to implement process support for FreeBSD from Emacs bug# 5243
- Add patch to fix segfault on Terminal (from NetBSD emacs port)[2]

editors/emacs23
- Convert OPTIONS to OptionsNG
- Bump PORTREVISION of editors/emacs23 port
- Remove PORTEPOCH, as port needs to be explicitly installed/upgraded
- Connect repocopied editors/emacs23 to build

editors/emacs-devel
- Update to bzr revision 109364
- Convert OPTIONS to OptionsNG
- Remove redundant patches
- Add patch to add openpty support for 10-CURRENT from Emacs bug# 12040[3]

Mk/bsd.emacs.mk
- Add EMACS_PORT_NAME block for Emacs 24 to bsd.emacs.mk
- Update major version for emacs-devel port
- Take maintainership of bsd.emacs.mk

Thanks to everyone who tested these updates, and provided their feedback.

Submitted by:	http://www.gnu.org/software/emacs/NEWS.24.1[1]
Submitted by:	Yuji TAKANO[2] (via private email), Jan Beich[3]
2012-08-01 15:20:25 +00:00

51 lines
1.4 KiB
C

$FreeBSD$
--- src/coding.c.orig
+++ src/coding.c
@@ -3717,8 +3717,20 @@
else
charset = CHARSET_FROM_ID (charset_id_2);
ONE_MORE_BYTE (c1);
- if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0))
- goto invalid_code;
+ /*
+ * <ESC>N sequence is recognized as SS2 in some ISO2022
+ * encodings. As a workaround, mark invalid only if
+ * <ESC>N + GR in a 7-bit encoding or <ESC>N + GL in an 8-bit
+ * encoding.
+ */
+ if (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) {
+ if (c1 < 0x20 || c1 >= 0x80)
+ goto invalid_code;
+ }
+ else {
+ if (c1 < 0xA0)
+ goto invalid_code;
+ }
break;
case 'O': /* invocation of single-shift-3 */
@@ -3731,8 +3743,20 @@
else
charset = CHARSET_FROM_ID (charset_id_3);
ONE_MORE_BYTE (c1);
- if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0))
- goto invalid_code;
+ /*
+ * <ESC>O sequence by arrow keys is recognized as SS3 in
+ * some ISO2022 encodings. As a workaround, mark invalid only if
+ * <ESC>O + GR in a 7-bit encoding or <ESC>O + GL in an 8-bit
+ * encoding.
+ */
+ if (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) {
+ if (c1 < 0x20 || c1 >= 0x80)
+ goto invalid_code;
+ }
+ else {
+ if (c1 < 0xA0)
+ goto invalid_code;
+ }
break;
case '0': case '2': case '3': case '4': /* start composition */