[COMMIT] Don't crash when ERROR_CHECK_TEXT, itext_ichar_eql()
8 years
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1489281572 0
# Sun Mar 12 01:19:32 2017 +0000
# Node ID 68c079d5d2cfece266b448b3412d7667c87c86d0
# Parent 55b8780e42f49fe8abaeb84784316dfc4727b70b
Don't crash when ERROR_CHECK_TEXT, itext_ichar_eql()
src/ChangeLog addition:
2017-03-12 Aidan Kehoe <kehoea(a)parhasard.net>
* text.h (itext_ichar_eql):
Don't crash when ERROR_CHECK_TEXT is turned on …
[View More]and we're comparing
an ASCII CH to a non-ASCII *str.
diff -r 55b8780e42f4 -r 68c079d5d2cf src/ChangeLog
--- a/src/ChangeLog Sun Mar 12 01:16:13 2017 +0000
+++ b/src/ChangeLog Sun Mar 12 01:19:32 2017 +0000
@@ -1,3 +1,9 @@
+2017-03-12 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * text.h (itext_ichar_eql):
+ Don't crash when ERROR_CHECK_TEXT is turned on and we're comparing
+ an ASCII CH to a non-ASCII *str.
+
2017-03-11 Aidan Kehoe <kehoea(a)parhasard.net>
* redisplay-xlike-inc.c (separate_textual_runs_xft_mule):
diff -r 55b8780e42f4 -r 68c079d5d2cf src/text.h
--- a/src/text.h Sun Mar 12 01:16:13 2017 +0000
+++ b/src/text.h Sun Mar 12 01:19:32 2017 +0000
@@ -1914,7 +1914,7 @@
if (ichar_ascii_p (ch))
/* This is fine, since ASCII characters are not part of the subsequent
octets of non-ASCII characters. */
- return simple_itext_ichar (str) == ch;
+ return *str == (Ibyte) ch;
#ifdef MULE
return non_ascii_itext_ichar (str) == ch;
#endif
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)
[View Less]
[COMMIT] Use valid_unicode_leading_surrogate correctly in separate_t_r_xft_mule().
8 years
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1489244504 0
# Sat Mar 11 15:01:44 2017 +0000
# Node ID 983dba76721858b22ec0249092ac251354449368
# Parent 3c65e6055691e8ef6705f25cf30477c483890aaa
Use valid_unicode_leading_surrogate correctly in separate_t_r_xft_mule().
src/ChangeLog addition:
2017-03-11 Aidan Kehoe <kehoea(a)parhasard.net>
* redisplay-xlike-inc.c (separate_textual_runs_xft_mule):…
[View More]
Correct a thinko here introduced in the last change, the new name
is valid_unicode_leading_surrogate(). Thank you for the report,
Mike Sperber!
diff -r 3c65e6055691 -r 983dba767218 src/ChangeLog
--- a/src/ChangeLog Fri Mar 10 21:54:07 2017 +0000
+++ b/src/ChangeLog Sat Mar 11 15:01:44 2017 +0000
@@ -1,3 +1,10 @@
+2017-03-11 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * redisplay-xlike-inc.c (separate_textual_runs_xft_mule):
+ Correct a thinko here introduced in the last change, the new name
+ is valid_unicode_leading_surrogate(). Thank you for the report,
+ Mike Sperber!
+
2017-03-10 Aidan Kehoe <kehoea(a)parhasard.net>
Get the recent redisplay changes building on mswindows with
diff -r 3c65e6055691 -r 983dba767218 src/redisplay-xlike-inc.c
--- a/src/redisplay-xlike-inc.c Fri Mar 10 21:54:07 2017 +0000
+++ b/src/redisplay-xlike-inc.c Sat Mar 11 15:01:44 2017 +0000
@@ -283,7 +283,7 @@
runs_so_far++;
}
- if (valid_utf_16_leading_surrogate (*((XftChar16 *) (text_storage))))
+ if (valid_unicode_leading_surrogate (*((XftChar16 *) (text_storage))))
{
text_storage += sizeof (XftChar16);
}
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)
[View Less]
[COMMIT] Correct a merging problem with X11 server-side fonts and non-ASCII text.
8 years
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1489249734 0
# Sat Mar 11 16:28:54 2017 +0000
# Node ID a9aed431763dcc4a4b7a79c30c410be07fec9ffb
# Parent 983dba76721858b22ec0249092ac251354449368
Correct a merging problem with X11 server-side fonts and non-ASCII text.
2017-03-11 Aidan Kehoe <kehoea(a)parhasard.net>
[...]
* redisplay-xlike-inc.c (separate_textual_runs_mule):
And correct a …
[View More]problem with non-ASCII text introduced to the
server-side X11 redisplay code while merging the unicode-internal
branch.
diff -r 983dba767218 -r a9aed431763d src/ChangeLog
--- a/src/ChangeLog Sat Mar 11 15:01:44 2017 +0000
+++ b/src/ChangeLog Sat Mar 11 16:28:54 2017 +0000
@@ -4,6 +4,10 @@
Correct a thinko here introduced in the last change, the new name
is valid_unicode_leading_surrogate(). Thank you for the report,
Mike Sperber!
+ * redisplay-xlike-inc.c (separate_textual_runs_mule):
+ And correct a problem with non-ASCII text introduced to the
+ server-side X11 redisplay code while merging the unicode-internal
+ branch.
2017-03-10 Aidan Kehoe <kehoea(a)parhasard.net>
diff -r 983dba767218 -r a9aed431763d src/redisplay-xlike-inc.c
--- a/src/redisplay-xlike-inc.c Sat Mar 11 15:01:44 2017 +0000
+++ b/src/redisplay-xlike-inc.c Sat Mar 11 16:28:54 2017 +0000
@@ -323,7 +323,7 @@
Lisp_Object prev_charset = Qunbound, ccl_prog;
int runs_so_far = 0;
const Ibyte *end = str + len;
- int dimension = 1, graphic = 0, need_ccl_conversion = 0;
+ int dimension = 1, need_ccl_conversion = 0;
struct ccl_program char_converter;
int translate_to_ucs_2 = 0;
@@ -376,8 +376,6 @@
First, classify font.
If the font is indexed by UCS-2, set `translate_to_ucs_2'.
Else if the charset has a CCL program, set `need_ccl_conversion'.
- Else if the font is indexed by an ISO 2022 "graphic register",
- set `graphic'.
These flags are almost mutually exclusive, but we're sloppy
about resetting "shadowed" flags. So the flags must be checked
in the proper order in computing byte1 and byte2, below. */
@@ -445,38 +443,23 @@
make_fixnum (byte2),
&byte1, &byte2, 1);
}
- else if (graphic == 0)
+ else if (EQ (charset, Vcharset_ascii) && byte2 != CANT_DISPLAY_CHAR)
{
- /* Only do the ASCII optimization if the attributes of the
- charset reflect the attributes of the normal ASCII set,
- so that the user can override with translate_to_ucs_2 or
- a CCL conversion if he or she so wishes. */
- if (EQ (charset, Vcharset_ascii))
- {
- const Ibyte *nonascii;
+ const Ibyte *nonascii;
- nonascii = skip_ascii (str, end);
- memcpy (text_storage, str, nonascii - str);
- text_storage += nonascii - str;
- str = nonascii;
- continue;
- }
-
- byte1 &= 0x7F;
- byte2 &= 0x7F;
- }
- else
- {
- byte1 |= 0x80;
- byte2 |= 0x80;
+ nonascii = skip_ascii (str, end);
+ memcpy (text_storage, str, nonascii - str);
+ text_storage += nonascii - str;
+ str = nonascii;
+ continue;
}
- *text_storage++ = (Extbyte) byte1;
if (2 == dimension)
{
- *text_storage++ = (Extbyte) byte2;
+ *text_storage++ = (Extbyte) byte1;
}
+ *text_storage++ = (Extbyte) byte2;
INC_IBYTEPTR (str);
}
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)
[View Less]
[COMMIT] Remove duplicate info on widget.el, wid-edit.el from widget.texi.
8 years, 1 month
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1489095584 0
# Thu Mar 09 21:39:44 2017 +0000
# Node ID 63ae8a489fedd3f97b77eb92ad239d441371ee37
# Parent 1fd2ad984351828b216d1d6c5c83831c5ac62f67
Remove duplicate info on widget.el, wid-edit.el from widget.texi.
man/ChangeLog addition:
2017-03-09 Aidan Kehoe <kehoea(a)parhasard.net>
* widget.texi (Introduction):
Remove duplicated info on widget.…
[View More]el, wid-edit.el, as documented in
tracker issue 847. Thank you FKtPp and Steven Mitchell!
diff -r 1fd2ad984351 -r 63ae8a489fed man/ChangeLog
--- a/man/ChangeLog Thu Mar 09 08:52:31 2017 +0000
+++ b/man/ChangeLog Thu Mar 09 21:39:44 2017 +0000
@@ -1,3 +1,9 @@
+2017-03-09 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * widget.texi (Introduction):
+ Remove duplicated info on widget.el, wid-edit.el, as documented in
+ tracker issue 847. Thank you FKtPp and Steven Mitchell!
+
2017-02-11 Aidan Kehoe <kehoea(a)parhasard.net>
* lispref/keymaps.texi (Key Sequences):
diff -r 1fd2ad984351 -r 63ae8a489fed man/widget.texi
--- a/man/widget.texi Thu Mar 09 08:52:31 2017 +0000
+++ b/man/widget.texi Thu Mar 09 21:39:44 2017 +0000
@@ -209,18 +209,6 @@
it will be autoloaded when needed.
@end table
-In order to minimize the code that is loaded by users who does not
-create any widgets, the code has been split in two files:
-
-@table @file
-@item widget.el
-This will declare the user variables, define the function
-@code{widget-define}, and autoload the function @code{widget-create}.
-@item wid-edit.el
-Everything else is here, there is no reason to load it explicitly, as
-it will be autoloaded when needed.
-@end table
-
@node User Interface, Programming Example, Introduction, Top
@comment node-name, next, previous, up
@chapter User Interface
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)
[View Less]
[COMMIT] Replace (char-to-string X) with (list X) where appropriate, core code.
8 years, 1 month
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1489049551 0
# Thu Mar 09 08:52:31 2017 +0000
# Node ID 1fd2ad984351828b216d1d6c5c83831c5ac62f67
# Parent 46c42be3543e897e4a9cf66084dbd732f16052a1
Replace (char-to-string X) with (list X) where appropriate, core code.
2017-03-09 Aidan Kehoe <kehoea(a)parhasard.net>
* disp-table.el (standard-display-g1):
* disp-table.el (standard-display-graphic):
*…
[View More] disp-table.el (standard-display-underline):
* files.el (make-backup-file-name-1):
* files.el (wildcard-to-regexp):
* gtk-file-dialog.el (gtk-file-dialog-update-dropdown):
* info.el (Info-all-case-regexp):
* info.el (Info-scroll-next):
* map-ynp.el (map-y-or-n-p):
* menubar.el (menu-item-generate-accelerator-spec):
* menubar.el (menu-max-items):
* minibuf.el (get-user-response):
* package-admin.el (package-admin-check-manifest):
In contexts like (concat ... (char-to-string x) ...), (list x) is
a more idiomatic and faster way to construct a sequence. Use it.
* autoload.el (autoload-featurep-protect-autoloads):
The fixnum-char mapping for values less than #x100 is stable, no
need to construct the string "\x00-\xff" at runtime.
diff -r 46c42be3543e -r 1fd2ad984351 lisp/ChangeLog
--- a/lisp/ChangeLog Sat Mar 04 00:07:32 2017 +0000
+++ b/lisp/ChangeLog Thu Mar 09 08:52:31 2017 +0000
@@ -1,3 +1,26 @@
+2017-03-09 Aidan Kehoe <kehoea(a)parhasard.net>
+
+
+ * disp-table.el (standard-display-g1):
+ * disp-table.el (standard-display-graphic):
+ * disp-table.el (standard-display-underline):
+ * files.el (make-backup-file-name-1):
+ * files.el (wildcard-to-regexp):
+ * gtk-file-dialog.el (gtk-file-dialog-update-dropdown):
+ * info.el (Info-all-case-regexp):
+ * info.el (Info-scroll-next):
+ * map-ynp.el (map-y-or-n-p):
+ * menubar.el (menu-item-generate-accelerator-spec):
+ * menubar.el (menu-max-items):
+ * minibuf.el (get-user-response):
+ * package-admin.el (package-admin-check-manifest):
+ In contexts like (concat ... (char-to-string x) ...), (list x) is
+ a more idiomatic and faster way to construct a sequence. Use it.
+
+ * autoload.el (autoload-featurep-protect-autoloads):
+ The fixnum-char mapping for values less than #x100 is stable, no
+ need to construct the string "\x00-\xff" at runtime.
+
2017-03-04 Aidan Kehoe <kehoea(a)parhasard.net>
* startup.el (normal-top-level):
diff -r 46c42be3543e -r 1fd2ad984351 lisp/auto-save.el
--- a/lisp/auto-save.el Sat Mar 04 00:07:32 2017 +0000
+++ b/lisp/auto-save.el Thu Mar 09 08:52:31 2017 +0000
@@ -409,7 +409,7 @@
(if (< char 16)
(upcase (format "=0%x" char))
(upcase (format "=%x" char)))
- (char-to-string char))))
+ (list char))))
str ""))
(defun auto-save-unescape-name (str)
@@ -423,7 +423,7 @@
(code (parse-integer str :start (match-beginning 1)
:end (match-end 2) :radix 16)))
(setq tmp (concat tmp (substring str 0 start)
- (char-to-string code))
+ (list code))
str (substring str (match-end 0)))))
(setq tmp (concat tmp str))
tmp))
diff -r 46c42be3543e -r 1fd2ad984351 lisp/autoload.el
--- a/lisp/autoload.el Sat Mar 04 00:07:32 2017 +0000
+++ b/lisp/autoload.el Thu Mar 09 08:52:31 2017 +0000
@@ -1078,8 +1078,7 @@
(progn
(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)))
+ (skip-chars-forward "\x00-\xff")
(eq (point) (point-max))))
(setq buffer-file-coding-system 'raw-text-unix)
(setq buffer-file-coding-system 'escape-quoted))
diff -r 46c42be3543e -r 1fd2ad984351 lisp/disp-table.el
--- a/lisp/disp-table.el Sat Mar 04 00:07:32 2017 +0000
+++ b/lisp/disp-table.el Thu Mar 09 08:52:31 2017 +0000
@@ -192,7 +192,7 @@
the SO/SI characters."
(frob-display-table
(lambda (x)
- (put-char-table c (concat "\016" (char-to-string sc) "\017") x))
+ (put-char-table c (concat "\016" (list sc) "\017") x))
locale '(tty)))
;;;###autoload
@@ -201,7 +201,7 @@
This only has an effect on TTY devices and assumes VT100-compatible escapes."
(frob-display-table
(lambda (x)
- (put-char-table c (concat "\e(0" (char-to-string gc) "\e(B") x))
+ (put-char-table c (concat "\e(0" (list gc) "\e(B") x))
locale '(tty)))
;;;###autoload
diff -r 46c42be3543e -r 1fd2ad984351 lisp/files.el
--- a/lisp/files.el Sat Mar 04 00:07:32 2017 +0000
+++ b/lisp/files.el Thu Mar 09 08:52:31 2017 +0000
@@ -2542,7 +2542,7 @@
(defun make-backup-file-name-1 (file)
"Subroutine of `make-backup-file-name' and `find-backup-file-name'."
(let ((alist backup-directory-alist)
- elt backup-directory dir-sep-string)
+ elt backup-directory)
(while alist
(setq elt (pop alist))
(if (string-match (car elt) file)
@@ -2565,14 +2565,13 @@
;; Replace any invalid file-name characters (for the
;; case of backing up remote files).
(setq file (expand-file-name (convert-standard-filename file)))
- (setq dir-sep-string (char-to-string directory-sep-char))
(if (eq (aref file 1) ?:)
- (setq file (concat dir-sep-string
+ (setq file (concat (list directory-sep-char)
"drive_"
- (char-to-string (downcase (aref file 0)))
+ (list (downcase (aref file 0)))
(if (eq (aref file 2) directory-sep-char)
""
- dir-sep-string)
+ (list directory-sep-char))
(substring file 2)))))
;; Make the name unique by substituting directory
;; separators. It may not really be worth bothering about
@@ -3991,7 +3990,7 @@
((eq ch ?$) "\\$")
((eq ch ?\\) "\\\\") ; probably cannot happen...
((eq ch ??) "[^\000]")
- (t (char-to-string ch)))))
+ (t (list ch)))))
(setq i (1+ i)))))
;; Shell wildcards should match the entire filename,
;; not its part. Make the regexp say so.
diff -r 46c42be3543e -r 1fd2ad984351 lisp/gtk-file-dialog.el
--- a/lisp/gtk-file-dialog.el Sat Mar 04 00:07:32 2017 +0000
+++ b/lisp/gtk-file-dialog.el Thu Mar 09 08:52:31 2017 +0000
@@ -108,7 +108,7 @@
(entries nil))
(while components
(push (concat "/" (mapconcat 'identity (reverse components)
- (char-to-string directory-sep-char)))
+ (list directory-sep-char)))
entries)
(pop components))
(push (expand-file-name "." "~/") entries)
diff -r 46c42be3543e -r 1fd2ad984351 lisp/info.el
--- a/lisp/info.el Sat Mar 04 00:07:32 2017 +0000
+++ b/lisp/info.el Thu Mar 09 08:52:31 2017 +0000
@@ -1453,12 +1453,12 @@
(and (>= c ?a) (<= c ?z)))
(setq regexp (concat regexp
"["
- (char-to-string (downcase c))
+ (list (downcase c))
"\\|"
- (char-to-string (upcase c))
+ (list (upcase c))
"]")))
(t
- (setq regexp (concat regexp (char-to-string c)))))
+ (setq regexp (concat regexp (list c)))))
(setq i (1+ i)))
regexp))
@@ -2225,7 +2225,7 @@
(message "Hit %s again to go to next node"
(if (= last-command-char 0)
"mouse button"
- (key-description (char-to-string last-command-char))))
+ (key-description (list last-command-char))))
(Info-page-next)
(setq this-command 'Info))
(scroll-up arg)))
diff -r 46c42be3543e -r 1fd2ad984351 lisp/map-ynp.el
--- a/lisp/map-ynp.el Sat Mar 04 00:07:32 2017 +0000
+++ b/lisp/map-ynp.el Thu Mar 09 08:52:31 2017 +0000
@@ -130,7 +130,7 @@
(key-description
(if (characterp (car elt))
;; XEmacs
- (char-to-string (car elt))
+ (list (car elt))
(car elt))))
action-alist ", ")
" ")
diff -r 46c42be3543e -r 1fd2ad984351 lisp/menubar.el
--- a/lisp/menubar.el Sat Mar 04 00:07:32 2017 +0000
+++ b/lisp/menubar.el Thu Mar 09 08:52:31 2017 +0000
@@ -522,7 +522,7 @@
(setq n (1- n)))
(setq m n))
(if (<= m 26)
- (concat "%_" (char-to-string (+ m (- ?a 1))) " ")
+ (concat "%_" (list (+ m (- ?a 1))) " ")
"")))
(t "")))
diff -r 46c42be3543e -r 1fd2ad984351 lisp/minibuf.el
--- a/lisp/minibuf.el Sat Mar 04 00:07:32 2017 +0000
+++ b/lisp/minibuf.el Thu Mar 09 08:52:31 2017 +0000
@@ -2204,12 +2204,12 @@
(let* ((answers (remove-if-not #'consp answers))
(possible
(gettext
- (labels ((car-to-string-if (x)
+ (labels ((car-to-sequence-if (x)
(setq x (car x))
- (if (stringp x) x (char-to-string x))))
- (concat (mapconcat #'car-to-string-if
+ (if (stringp x) x (list x))))
+ (concat (mapconcat #'car-to-sequence-if
(butlast answers) ", ") " or "
- (car-to-string-if (car (last answers)))))))
+ (car-to-sequence-if (car (last answers)))))))
(question (gettext question))
(p (format "%s(%s) " question possible)))
(block nil
diff -r 46c42be3543e -r 1fd2ad984351 lisp/mule/ethio-util.el
--- a/lisp/mule/ethio-util.el Sat Mar 04 00:07:32 2017 +0000
+++ b/lisp/mule/ethio-util.el Thu Mar 09 08:52:31 2017 +0000
@@ -1498,7 +1498,7 @@
(delete-char 1)
(insert
(compose-string
- (concat (char-to-string (ethio-ethiocode-to-char newch)) "$(3%s(B"))))
+ (concat (list (ethio-ethiocode-to-char newch)) "$(3%s(B"))))
;; simple vowel modification
(t
diff -r 46c42be3543e -r 1fd2ad984351 lisp/package-admin.el
--- a/lisp/package-admin.el Sat Mar 04 00:07:32 2017 +0000
+++ b/lisp/package-admin.el Thu Mar 09 08:52:31 2017 +0000
@@ -282,8 +282,7 @@
(save-excursion ;; Probably redundant.
(set-buffer (get-buffer pkg-outbuf)) ;; Probably already the current buffer.
(goto-char (point-min))
- (setq regexp (concat "\\bpkginfo"
- (char-to-string directory-sep-char)
+ (setq regexp (concat "\\bpkginfo" (list directory-sep-char)
"MANIFEST\\...*"))
;; Look for the manifest.
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)
[View Less]
[PATCH][AC] Bind an uninterned #:buffer, rather than #:ntl-buffer, #'normal-top-level
8 years, 1 month
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1488586052 0
# Sat Mar 04 00:07:32 2017 +0000
# Node ID 46c42be3543e897e4a9cf66084dbd732f16052a1
# Parent 0058a7e5c57777d2182ae59044d1e736e714d3f2
Bind an uninterned #:buffer, rather than #:ntl-buffer, #'normal-top-level
2017-03-04 Aidan Kehoe <kehoea(a)parhasard.net>
* startup.el (normal-top-level):
Bind an uninterned #:buffer, rather than #:ntl-…
[View More]buffer, which is
less distracting in backtraces.
(Commit chiefly done to help get the xemacs-commit hook posting
again.)
diff -r 0058a7e5c577 -r 46c42be3543e lisp/ChangeLog
--- a/lisp/ChangeLog Fri Mar 03 23:22:25 2017 +0000
+++ b/lisp/ChangeLog Sat Mar 04 00:07:32 2017 +0000
@@ -1,3 +1,11 @@
+2017-03-04 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * startup.el (normal-top-level):
+ Bind an uninterned #:buffer, rather than #:ntl-buffer, which is
+ less distracting in backtraces.
+ (Commit chiefly done to help get the xemacs-commit hook posting
+ again.)
+
2017-02-20 Aidan Kehoe <kehoea(a)parhasard.net>
* cl-macs.el:
diff -r 0058a7e5c577 -r 46c42be3543e lisp/startup.el
--- a/lisp/startup.el Fri Mar 03 23:22:25 2017 +0000
+++ b/lisp/startup.el Sat Mar 04 00:07:32 2017 +0000
@@ -550,7 +550,7 @@
;; function (which will not be called recursively, and so won't
;; shadow itself) and doesn't require consing a closure at
;; runtime:
- (cons 'progn (subst '#:ntl-buffer 'ntl-buffer body :test #'eq))))
+ (cons 'progn (subst '#:buffer 'ntl-buffer body :test #'eq))))
(replace-ntl-buffer
(let ((ntl-buffer (current-buffer)))
(labels ((after-command-line (&optional error-data)
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)
[View Less]
[PATCH][AC] If START is specified, adjust the returned value accordingly, #'string-match-p
8 years, 1 month
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1488583345 0
# Fri Mar 03 23:22:25 2017 +0000
# Node ID 0058a7e5c57777d2182ae59044d1e736e714d3f2
# Parent 6a06b0c47664b3d83e9c6261d0a8bb1d0dae0620
If START is specified, adjust the returned value accordingly, #'string-match-p
src/ChangeLog addition:
2017-03-03 Aidan Kehoe <kehoea(a)parhasard.net>
* search.c (Fstring_match_p):
If START is specified,…
[View More] adjust the returned value accordingly.
tests/ChangeLog addition:
2017-03-03 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/regexp-tests.el:
Check that START is taken into account with a successful result in
#'string-match-p.
diff -r 6a06b0c47664 -r 0058a7e5c577 src/ChangeLog
--- a/src/ChangeLog Fri Mar 03 20:39:24 2017 +0000
+++ b/src/ChangeLog Fri Mar 03 23:22:25 2017 +0000
@@ -1,3 +1,8 @@
+2017-03-03 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * search.c (Fstring_match_p):
+ If START is specified, adjust the returned value accordingly.
+
2017-02-20 Aidan Kehoe <kehoea(a)parhasard.net>
* elhash.c:
diff -r 6a06b0c47664 -r 0058a7e5c577 src/search.c
--- a/src/search.c Fri Mar 03 20:39:24 2017 +0000
+++ b/src/search.c Fri Mar 03 23:22:25 2017 +0000
@@ -652,7 +652,7 @@
!NILP (bufp->case_fold_search),
ERROR_ME, 0);
return result < 0 ? Qnil
- : make_fixnum (string_index_byte_to_char (string, result));
+ : make_fixnum (string_index_byte_to_char (string, result + bstart));
}
diff -r 6a06b0c47664 -r 0058a7e5c577 tests/ChangeLog
--- a/tests/ChangeLog Fri Mar 03 20:39:24 2017 +0000
+++ b/tests/ChangeLog Fri Mar 03 23:22:25 2017 +0000
@@ -1,3 +1,9 @@
+2017-03-03 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/regexp-tests.el:
+ Check that START is taken into account with a successful result in
+ #'string-match-p.
+
2017-02-18 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/regexp-tests.el:
diff -r 6a06b0c47664 -r 0058a7e5c577 tests/automated/regexp-tests.el
--- a/tests/automated/regexp-tests.el Fri Mar 03 20:39:24 2017 +0000
+++ b/tests/automated/regexp-tests.el Fri Mar 03 23:22:25 2017 +0000
@@ -69,6 +69,9 @@
(Assert (string-match "�" "�"))
(Assert (not (string-match "�" "�")))
+ (Assert (eql (string-match-p "=[0-9a-f]" "=00=af" (length "=00"))
+ (length "=00")))
+
(let ((preserve (list 0 most-positive-fixnum (/ most-positive-fixnum 4)
(/ most-positive-fixnum 2))))
(store-match-data preserve)
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)
[View Less]
[PATCH][C psgml] Change running-xemacs to (featurep 'xemacs), which bytecomp.el knows about
8 years, 1 month
Aidan Kehoe
And this annoyed me as I was doing the previous change.
APPROVE COMMIT psgml
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1488572202 0
# Fri Mar 03 20:16:42 2017 +0000
# Node ID e8aec82924b4d160e6ffd5b867d5d9b876eb7a41
# Parent 62b07faa58ac420b3d5d4703bf994098dd60e4ec
Change running-xemacs to (featurep 'xemacs), which bytecomp.el knows about
2017-03-03 Aidan Kehoe <kehoea(a)parhasard.net>
[...]
* psgml-debug.el (load):
* psgml-parse.…
[View More]el (sgml-set-buffer-multibyte):
* psgml.el (sgml-mouse-region):
* psgml.el (and):
* psgml.el (sgml-options-menu-items):
* psgml.el (sgml-mode):
* psgml.el (xml-mode):
running-xemacs -> (featurep 'xemacs), which the byte compiler
knows to reduce to a constant.
diff -r 62b07faa58ac -r e8aec82924b4 ChangeLog
--- a/ChangeLog Fri Mar 03 20:12:17 2017 +0000
+++ b/ChangeLog Fri Mar 03 20:16:42 2017 +0000
@@ -4,6 +4,16 @@
Only remove SGML from the menu if we have menubar support, avoid
annoying backtraces on TTY-only builds.
+ * psgml-debug.el (load):
+ * psgml-parse.el (sgml-set-buffer-multibyte):
+ * psgml.el (sgml-mouse-region):
+ * psgml.el (and):
+ * psgml.el (sgml-options-menu-items):
+ * psgml.el (sgml-mode):
+ * psgml.el (xml-mode):
+ running-xemacs -> (featurep 'xemacs), which the byte compiler
+ knows to reduce to a constant.
+
2014-06-29 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.49 released.
diff -r 62b07faa58ac -r e8aec82924b4 psgml-debug.el
--- a/psgml-debug.el Fri Mar 03 20:12:17 2017 +0000
+++ b/psgml-debug.el Fri Mar 03 20:16:42 2017 +0000
@@ -118,7 +118,7 @@
)
(eval-when (load)
- (unless running-xemacs ;; XEmacs change
+ (unless (featurep 'xemacs) ;; XEmacs change
(def-edebug-spec sgml-with-parser-syntax (&rest form))
(def-edebug-spec sgml-with-parser-syntax-ro (&rest form))
(def-edebug-spec sgml-skip-upto (sexp))
diff -r 62b07faa58ac -r e8aec82924b4 psgml-html.el
--- a/psgml-html.el Fri Mar 03 20:12:17 2017 +0000
+++ b/psgml-html.el Fri Mar 03 20:16:42 2017 +0000
@@ -267,7 +267,7 @@
;; font-lock setup for various emacsen: XEmacs, Emacs 19.29+, Emacs <19.29.
;; By Ulrik Dickow <dickow(a)nbi.dk>. (Last update: 05-Sep-1995).
- (cond (running-xemacs ; XEmacs/Lucid
+ (cond ((featurep 'xemacs) ; XEmacs/Lucid
(put major-mode 'font-lock-keywords-case-fold-search t))
;; XEmacs (19.13, at least) guesses the rest correctly.
;; If any older XEmacsen don't, then tell me.
diff -r 62b07faa58ac -r e8aec82924b4 psgml-parse.el
--- a/psgml-parse.el Fri Mar 03 20:12:17 2017 +0000
+++ b/psgml-parse.el Fri Mar 03 20:16:42 2017 +0000
@@ -354,7 +354,7 @@
(sgml-debug "Restoring buffer mod: %s" buffer-modified)))))
(defun sgml-set-buffer-multibyte (flag)
- (cond (running-xemacs
+ (cond ((featurep 'xemacs)
flag)
((and (boundp 'emacs-major-version) (>= emacs-major-version 20))
(set-buffer-multibyte
diff -r 62b07faa58ac -r e8aec82924b4 psgml-sysdep.el
--- a/psgml-sysdep.el Fri Mar 03 20:12:17 2017 +0000
+++ b/psgml-sysdep.el Fri Mar 03 20:16:42 2017 +0000
@@ -4,7 +4,7 @@
(require 'psgml)
(cond
;; XEmacs change
- (running-xemacs
+ ((featurep 'xemacs)
(require 'psgml-xemacs))
(t
(require 'psgml-other)))
diff -r 62b07faa58ac -r e8aec82924b4 psgml.el
--- a/psgml.el Fri Mar 03 20:12:17 2017 +0000
+++ b/psgml.el Fri Mar 03 20:16:42 2017 +0000
@@ -885,7 +885,7 @@
(defun sgml-mouse-region ()
(let (start end)
(cond
- (running-xemacs ;; XEmacs change
+ ((featurep 'xemacs) ;; XEmacs change
(cond
((null (mark-marker)) nil)
(t (setq start (region-beginning)
@@ -1109,12 +1109,12 @@
;; XEmacs change: psgml-xemacs hasn't been necessarily pulled in before
;; we need this.
(eval-and-compile
- (and running-xemacs
+ (and (featurep 'xemacs)
(autoload 'sgml-make-options-menu "psgml-xemacs")))
(defun sgml-options-menu-items (vars)
;; XEmacs change: use sgml-make-options-menu on XEmacs
- (if running-xemacs
+ (if (featurep 'xemacs)
(sgml-make-options-menu vars)
(mapcar (lambda (var)
(let ((desc (format "%s [%s]"
@@ -1360,7 +1360,7 @@
(make-local-variable 'indent-line-function)
(setq indent-line-function 'sgml-indent-line)
(make-local-variable 'mode-line-format)
- (if running-xemacs ;; XEmacs change
+ (if (featurep 'xemacs) ;; XEmacs change
;; Modify mode-line-format with subst (suggested by wing)
;; Apart from requiring CL at runtime, this doesn't work in Emacs
;; 21. It's the sort of thing which-func is supposed to do...
@@ -1381,7 +1381,7 @@
(add-to-list 'text-property-default-nonsticky '(face . t)))
(make-local-hook 'post-command-hook)
(add-hook 'post-command-hook 'sgml-command-post 'append 'local)
- (unless running-xemacs ;; XEmacs change
+ (unless (featurep 'xemacs) ;; XEmacs change
;; XEmacs 20.4 doesn't handle local activate-menubar-hook
;; it tries to call the function `t' when using the menubar
(make-local-hook 'activate-menubar-hook))
@@ -1413,7 +1413,7 @@
`sgml-indent-data' is non-nil."
;; XEmacs change: use HTML font lock keywords. Urk, this is bad!
(cond
- (running-xemacs
+ ((featurep 'xemacs)
(require 'psgml-html)
(put 'xml-mode 'font-lock-defaults '(html-font-lock-keywords nil t))))
(setq sgml-xml-p t)
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)
[View Less]
[PATCH][C psgml] Only remove SGML from the menu if we have menubar support, #'html-mode
8 years, 1 month
Aidan Kehoe
This is annoying me a little as I build the website.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1488571937 0
# Fri Mar 03 20:12:17 2017 +0000
# Node ID 62b07faa58ac420b3d5d4703bf994098dd60e4ec
# Parent 4082c3ff2ff190bb0b506fdf4fe48d1d697fde4e
Only remove SGML from the menu if we have menubar support, #'html-mode
2017-03-03 Aidan Kehoe <kehoea(a)parhasard.net>
* psgml-html.el (html-mode):
Only remove SGML from the menu if we have menubar …
[View More]support, avoid
annoying backtraces on TTY-only builds.
diff -r 4082c3ff2ff1 -r 62b07faa58ac ChangeLog
--- a/ChangeLog Sun Jun 29 21:46:49 2014 +0200
+++ b/ChangeLog Fri Mar 03 20:12:17 2017 +0000
@@ -1,3 +1,9 @@
+2017-03-03 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * psgml-html.el (html-mode):
+ Only remove SGML from the menu if we have menubar support, avoid
+ annoying backtraces on TTY-only builds.
+
2014-06-29 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.49 released.
diff -r 4082c3ff2ff1 -r 62b07faa58ac psgml-html.el
--- a/psgml-html.el Sun Jun 29 21:46:49 2014 +0200
+++ b/psgml-html.el Fri Mar 03 20:12:17 2017 +0000
@@ -313,7 +313,7 @@
(setq sgml-menu-name "HTML")
(easy-menu-add sgml-html-menu)
(html-helper-rebuild-menu)
- (unless (featurep 'infodock)
+ (unless (or (featurep 'infodock) (not (featurep 'menubar)))
(delete-menu-item '("SGML"))))
(defvar html-helper-imenu-regexp
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)
[View Less]