aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Verona2015-01-22 08:27:13 +0100
committerJoakim Verona2015-01-22 08:27:13 +0100
commit5c1d2b0f06ddb1f6b520b2446ce9e207e5bfc315 (patch)
treec9e3511c8164d2154c91820e0d90521762dc7bdf
parentd6ada5ae0fad7a5c85eb28b102bc460e9fe0aceb (diff)
parent7f4e7dd378c456b498c270b47b46aaae365a72ab (diff)
downloademacs-5c1d2b0f06ddb1f6b520b2446ce9e207e5bfc315.tar.gz
emacs-5c1d2b0f06ddb1f6b520b2446ce9e207e5bfc315.zip
merge master
-rw-r--r--etc/ChangeLog5
-rw-r--r--etc/NEWS5
-rw-r--r--lib-src/ChangeLog6
-rw-r--r--lib-src/Makefile.in16
-rw-r--r--lisp/ChangeLog38
-rw-r--r--lisp/emacs-lisp/bytecomp.el4
-rw-r--r--lisp/emacs-lisp/cl-generic.el5
-rw-r--r--lisp/erc/ChangeLog5
-rw-r--r--lisp/erc/erc-dcc.el3
-rw-r--r--lisp/ffap.el4
-rw-r--r--lisp/files.el2
-rw-r--r--lisp/help.el2
-rw-r--r--lisp/net/ange-ftp.el6
-rw-r--r--lisp/progmodes/etags.el4
-rw-r--r--lisp/progmodes/xref.el73
-rw-r--r--lisp/url/ChangeLog6
-rw-r--r--lisp/url/url-dav.el6
-rw-r--r--src/ChangeLog18
-rw-r--r--src/alloc.c7
-rw-r--r--src/callint.c3
-rw-r--r--src/coding.c2
-rw-r--r--src/dispnew.c10
-rw-r--r--src/eval.c7
-rw-r--r--src/fileio.c40
-rw-r--r--src/fns.c4
-rw-r--r--src/font.c4
-rw-r--r--src/lisp.h10
-rw-r--r--src/xdisp.c8
-rw-r--r--test/automated/eieio-tests.el2
29 files changed, 182 insertions, 123 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 7b64dfb9153..47f61f4d7fd 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,8 @@
12015-01-22 Paul Eggert <eggert@cs.ucla.edu>
2
3 Don't downcase system diagnostics' first letters
4 * NEWS: Document this.
5
12015-01-16 Artur Malabarba <bruce.connor.am@gmail.com> 62015-01-16 Artur Malabarba <bruce.connor.am@gmail.com>
2 7
3 * NEWS: Document installing packages from directories. 8 * NEWS: Document installing packages from directories.
diff --git a/etc/NEWS b/etc/NEWS
index 120d8b920c6..db47033fb35 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -538,6 +538,11 @@ position list returned for such events is now nil.
538These slots used to hold key-shortcut data, but have been obsolete since 538These slots used to hold key-shortcut data, but have been obsolete since
539Emacs-21. 539Emacs-21.
540 540
541** Emacs no longer downcases the first letter of a system diagnostic
542when signaling a file error. For example, it now reports "Permission
543denied" instead of "permission denied". The old behavior was problematic
544in languages like German where downcasing rules depend on grammar.
545
541 546
542* Lisp Changes in Emacs 25.1 547* Lisp Changes in Emacs 25.1
543 548
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index b67038ff81a..c2aedb0afde 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,9 @@
12015-01-22 Ulrich Müller <ulm@gentoo.org>
2
3 * Makefile.in ($(DESTDIR)${archlibdir}): Don't fail if the chown
4 or chgrp command is unsuccessful; the 'update-game-score' program
5 has a fallback for this at runtime.
6
12015-01-21 Ulrich Müller <ulm@gentoo.org> 72015-01-21 Ulrich Müller <ulm@gentoo.org>
2 8
3 * update-game-score.c: Allow the program to run sgid instead 9 * update-game-score.c: Allow the program to run sgid instead
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index 2997f1b35a8..a0bf5bab580 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -265,15 +265,15 @@ $(DESTDIR)${archlibdir}: all
265 touch "$(DESTDIR)${gamedir}/snake-scores"; \ 265 touch "$(DESTDIR)${gamedir}/snake-scores"; \
266 touch "$(DESTDIR)${gamedir}/tetris-scores" 266 touch "$(DESTDIR)${gamedir}/tetris-scores"
267ifneq ($(gameuser),) 267ifneq ($(gameuser),)
268 chown ${gameuser} "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" 268 -if chown ${gameuser} "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" && chmod u+s,go-r "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"; then \
269 chmod u+s,go-r "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" 269 chown ${gameuser} "$(DESTDIR)${gamedir}"; \
270 chown ${gameuser} "$(DESTDIR)${gamedir}" 270 chmod u=rwx,g=rx,o=rx "$(DESTDIR)${gamedir}"; \
271 chmod u=rwx,g=rx,o=rx "$(DESTDIR)${gamedir}" 271 fi
272else ifneq ($(gamegroup),) 272else ifneq ($(gamegroup),)
273 chgrp ${gamegroup} "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" 273 -if chgrp ${gamegroup} "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" && chmod g+s,o-r "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"; then \
274 chmod g+s,o-r "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" 274 chgrp ${gamegroup} "$(DESTDIR)${gamedir}"; \
275 chgrp ${gamegroup} "$(DESTDIR)${gamedir}" 275 chmod u=rwx,g=rwx,o=rx "$(DESTDIR)${gamedir}"; \
276 chmod u=rwx,g=rwx,o=rx "$(DESTDIR)${gamedir}" 276 fi
277endif 277endif
278 exp_archlibdir=`cd "$(DESTDIR)${archlibdir}" && /bin/pwd`; \ 278 exp_archlibdir=`cd "$(DESTDIR)${archlibdir}" && /bin/pwd`; \
279 if [ "$$exp_archlibdir" != "`cd ${srcdir} && /bin/pwd`" ]; then \ 279 if [ "$$exp_archlibdir" != "`cd ${srcdir} && /bin/pwd`" ]; then \
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7aa66bf9ad5..5cceb19ff1a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,41 @@
12015-01-22 Paul Eggert <eggert@cs.ucla.edu>
2
3 Don't downcase system diagnostics' first letters
4 * emacs-lisp/bytecomp.el (byte-compile-file):
5 * ffap.el (find-file-at-point):
6 * files.el (insert-file-1):
7 * net/ange-ftp.el (ange-ftp-barf-if-not-directory)
8 (ange-ftp-copy-file-internal):
9 * progmodes/etags.el (visit-tags-table):
10 Keep diagnostics consistent with system's.
11 * ffap.el (ffap-machine-p):
12 Ignore case while comparing diagnostics.
13
142015-01-22 Stefan Monnier <monnier@iro.umontreal.ca>
15
16 * help.el (help-make-usage): Don't turn a "_" arg into an empty-string
17 arg (bug#19645).
18 * emacs-lisp/cl-generic.el (cl--generic-lambda): Don't confuse a string
19 body with a docstring.
20
212015-01-22 Dmitry Gutov <dgutov@yandex.ru>
22
23 * progmodes/xref.el (xref-location-marker, xref-location-group):
24 Use `cl-defgeneric' and `cl-defmethod' instead of the EIEIO
25 counterparts.
26
27 * progmodes/etags.el (xref-location-marker): Same.
28
29 * progmodes/xref.el (xref--current): Rename from `xref--selected'.
30 (xref--inhibit-mark-current): Rename from
31 `xref--inhibit-mark-selected'. Update the usages.
32 (xref-quit): Reword the docstring. Kill buffers after quitting
33 windows instead of before.
34 (xref--insert-xrefs): Tweak help-echo.
35 (xref--read-identifier-history, xref--read-pattern-history):
36 New variables.
37 (xref--read-identifier, xref-find-apropos): Use them.
38
12015-01-21 Ulrich Müller <ulm@gentoo.org> 392015-01-21 Ulrich Müller <ulm@gentoo.org>
2 40
3 * play/gamegrid.el (gamegrid-add-score-with-update-game-score): 41 * play/gamegrid.el (gamegrid-add-score-with-update-game-score):
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 8440570d755..2bd8d07851b 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1863,8 +1863,8 @@ The value is non-nil if there were no errors, nil if errors."
1863 (signal 'file-error 1863 (signal 'file-error
1864 (list "Opening output file" 1864 (list "Opening output file"
1865 (if (file-exists-p target-file) 1865 (if (file-exists-p target-file)
1866 "cannot overwrite file" 1866 "Cannot overwrite file"
1867 "directory not writable or nonexistent") 1867 "Directory not writable or nonexistent")
1868 target-file))) 1868 target-file)))
1869 (kill-buffer (current-buffer))) 1869 (kill-buffer (current-buffer)))
1870 (if (and byte-compile-generate-call-tree 1870 (if (and byte-compile-generate-call-tree
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
index 8dee9a38ab0..f214faff237 100644
--- a/lisp/emacs-lisp/cl-generic.el
+++ b/lisp/emacs-lisp/cl-generic.el
@@ -228,7 +228,8 @@ This macro can only be used within the lexical scope of a cl-generic method."
228 "Make the lambda expression for a method with ARGS and BODY." 228 "Make the lambda expression for a method with ARGS and BODY."
229 (let ((plain-args ()) 229 (let ((plain-args ())
230 (specializers nil) 230 (specializers nil)
231 (doc-string (if (stringp (car-safe body)) (pop body))) 231 (doc-string (if (and (stringp (car-safe body)) (cdr body))
232 (pop body)))
232 (mandatory t)) 233 (mandatory t))
233 (dolist (arg args) 234 (dolist (arg args)
234 (push (pcase arg 235 (push (pcase arg
@@ -252,7 +253,7 @@ This macro can only be used within the lexical scope of a cl-generic method."
252 ;; destructuring args, `declare' and whatnot). 253 ;; destructuring args, `declare' and whatnot).
253 (pcase (macroexpand fun macroenv) 254 (pcase (macroexpand fun macroenv)
254 (`#'(lambda ,args . ,body) 255 (`#'(lambda ,args . ,body)
255 (let* ((doc-string (and doc-string (stringp (car body)) 256 (let* ((doc-string (and doc-string (stringp (car body)) (cdr body)
256 (pop body))) 257 (pop body)))
257 (cnm (make-symbol "cl--cnm")) 258 (cnm (make-symbol "cl--cnm"))
258 (nmp (make-symbol "cl--nmp")) 259 (nmp (make-symbol "cl--nmp"))
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 1b54fb6a48d..28ac7d38b96 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,8 @@
12015-01-22 Paul Eggert <eggert@cs.ucla.edu>
2
3 Don't downcase system diagnostics' first letters
4 * erc-dcc.el (erc-dcc-server): Ignore case while comparing diagnostics.
5
12014-11-23 Michael Albinus <michael.albinus@gmx.de> 62014-11-23 Michael Albinus <michael.albinus@gmx.de>
2 7
3 * erc-desktop-notifications.el (erc-notifications-bus): 8 * erc-desktop-notifications.el (erc-notifications-bus):
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el
index 9d52c3b7c09..182f1e05921 100644
--- a/lisp/erc/erc-dcc.el
+++ b/lisp/erc/erc-dcc.el
@@ -379,7 +379,7 @@ created subprocess, or nil."
379 (set-process-filter-multibyte process nil))))) 379 (set-process-filter-multibyte process nil)))))
380 (file-error 380 (file-error
381 (unless (and (string= "Cannot bind server socket" (nth 1 err)) 381 (unless (and (string= "Cannot bind server socket" (nth 1 err))
382 (string= "address already in use" (nth 2 err))) 382 (string= "address already in use" (downcase (nth 2 err))))
383 (signal (car err) (cdr err))) 383 (signal (car err) (cdr err)))
384 (setq port (1+ port)) 384 (setq port (1+ port))
385 (unless (< port upper) 385 (unless (< port upper)
@@ -1264,4 +1264,3 @@ other client."
1264;; Local Variables: 1264;; Local Variables:
1265;; indent-tabs-mode: nil 1265;; indent-tabs-mode: nil
1266;; End: 1266;; End:
1267
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 1b8ea60e03b..350a6bdac20 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -476,7 +476,7 @@ Returned values:
476 ;; (file-error "connection failed" "address already in use" 476 ;; (file-error "connection failed" "address already in use"
477 ;; "ftp.uu.net" "ffap-machine-p") 477 ;; "ftp.uu.net" "ffap-machine-p")
478 ((equal mesg "connection failed") 478 ((equal mesg "connection failed")
479 (if (equal (nth 2 error) "permission denied") 479 (if (string= (downcase (nth 2 error)) "permission denied")
480 nil ; host does not exist 480 nil ; host does not exist
481 ;; Other errors mean the host exists: 481 ;; Other errors mean the host exists:
482 (nth 2 error))) 482 (nth 2 error)))
@@ -1439,7 +1439,7 @@ and the functions `ffap-file-at-point' and `ffap-url-at-point'."
1439 (expand-file-name filename))) 1439 (expand-file-name filename)))
1440 ;; User does not want to find a non-existent file: 1440 ;; User does not want to find a non-existent file:
1441 ((signal 'file-error (list "Opening file buffer" 1441 ((signal 'file-error (list "Opening file buffer"
1442 "no such file or directory" 1442 "No such file or directory"
1443 filename))))))) 1443 filename)))))))
1444 1444
1445;; Shortcut: allow {M-x ffap} rather than {M-x find-file-at-point}. 1445;; Shortcut: allow {M-x ffap} rather than {M-x find-file-at-point}.
diff --git a/lisp/files.el b/lisp/files.el
index e9632edacef..ed1943dfc28 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2128,7 +2128,7 @@ This function ensures that none of these modifications will take place."
2128 2128
2129(defun insert-file-1 (filename insert-func) 2129(defun insert-file-1 (filename insert-func)
2130 (if (file-directory-p filename) 2130 (if (file-directory-p filename)
2131 (signal 'file-error (list "Opening input file" "file is a directory" 2131 (signal 'file-error (list "Opening input file" "Is a directory"
2132 filename))) 2132 filename)))
2133 ;; Check whether the file is uncommonly large 2133 ;; Check whether the file is uncommonly large
2134 (abort-if-file-too-large (nth 7 (file-attributes filename)) "insert" filename) 2134 (abort-if-file-too-large (nth 7 (file-attributes filename)) "insert" filename)
diff --git a/lisp/help.el b/lisp/help.el
index 39ec6be1fde..bf724252d5a 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1445,7 +1445,7 @@ the same names as used in the original source code, when possible."
1445 (let ((name (symbol-name arg))) 1445 (let ((name (symbol-name arg)))
1446 (cond 1446 (cond
1447 ((string-match "\\`&" name) arg) 1447 ((string-match "\\`&" name) arg)
1448 ((string-match "\\`_" name) 1448 ((string-match "\\`_." name)
1449 (intern (upcase (substring name 1)))) 1449 (intern (upcase (substring name 1))))
1450 (t (intern (upcase name))))))) 1450 (t (intern (upcase name)))))))
1451 arglist))) 1451 arglist)))
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 17db6e76ec9..52153ad8322 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -1536,8 +1536,8 @@ then kill the related FTP process."
1536 (signal 'file-error 1536 (signal 'file-error
1537 (list "Opening directory" 1537 (list "Opening directory"
1538 (if (file-exists-p directory) 1538 (if (file-exists-p directory)
1539 "not a directory" 1539 "Not a directory"
1540 "no such file or directory") 1540 "No such file or directory")
1541 directory)))) 1541 directory))))
1542 1542
1543;;;; ------------------------------------------------------------ 1543;;;; ------------------------------------------------------------
@@ -3664,7 +3664,7 @@ so return the size on the remote host exactly. See RFC 3659."
3664 3664
3665 (or (file-exists-p filename) 3665 (or (file-exists-p filename)
3666 (signal 'file-error 3666 (signal 'file-error
3667 (list "Copy file" "no such file or directory" filename))) 3667 (list "Copy file" "No such file or directory" filename)))
3668 3668
3669 ;; canonicalize newname if a directory. 3669 ;; canonicalize newname if a directory.
3670 (if (file-directory-p newname) 3670 (if (file-directory-p newname)
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index dc3380d02f6..b470352f8dc 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -308,7 +308,7 @@ file the tag was in."
308 (save-excursion 308 (save-excursion
309 (or (visit-tags-table-buffer file) 309 (or (visit-tags-table-buffer file)
310 (signal 'file-error (list "Visiting tags table" 310 (signal 'file-error (list "Visiting tags table"
311 "file does not exist" 311 "No such file or directory"
312 file))) 312 file)))
313 ;; Set FILE to the expanded name. 313 ;; Set FILE to the expanded name.
314 (setq file tags-file-name))) 314 (setq file tags-file-name)))
@@ -2122,7 +2122,7 @@ for \\[find-tag] (which see)."
2122 (make-instance 'xref-etags-location :tag-info tag-info 2122 (make-instance 'xref-etags-location :tag-info tag-info
2123 :file (expand-file-name file))) 2123 :file (expand-file-name file)))
2124 2124
2125(defmethod xref-location-marker ((l xref-etags-location)) 2125(cl-defmethod xref-location-marker ((l xref-etags-location))
2126 (with-slots (tag-info file) l 2126 (with-slots (tag-info file) l
2127 (let ((buffer (find-file-noselect file))) 2127 (let ((buffer (find-file-noselect file)))
2128 (with-current-buffer buffer 2128 (with-current-buffer buffer
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index ee8125073aa..55405b63fe0 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -66,10 +66,10 @@
66 66
67;; If a backend decides to subclass xref-location it can provide 67;; If a backend decides to subclass xref-location it can provide
68;; methods for some of the following functions: 68;; methods for some of the following functions:
69(defgeneric xref-location-marker (location) 69(cl-defgeneric xref-location-marker (location)
70 "Return the marker for LOCATION.") 70 "Return the marker for LOCATION.")
71 71
72(defgeneric xref-location-group (location) 72(cl-defgeneric xref-location-group (location)
73 "Return a string used to group a set of locations. 73 "Return a string used to group a set of locations.
74This is typically the filename.") 74This is typically the filename.")
75 75
@@ -88,7 +88,7 @@ Line numbers start from 1 and columns from 0.")
88 "Create and return a new xref-file-location." 88 "Create and return a new xref-file-location."
89 (make-instance 'xref-file-location :file file :line line :column column)) 89 (make-instance 'xref-file-location :file file :line line :column column))
90 90
91(defmethod xref-location-marker ((l xref-file-location)) 91(cl-defmethod xref-location-marker ((l xref-file-location))
92 (with-slots (file line column) l 92 (with-slots (file line column) l
93 (with-current-buffer 93 (with-current-buffer
94 (or (get-file-buffer file) 94 (or (get-file-buffer file)
@@ -102,7 +102,7 @@ Line numbers start from 1 and columns from 0.")
102 (move-to-column column) 102 (move-to-column column)
103 (point-marker)))))) 103 (point-marker))))))
104 104
105(defmethod xref-location-group ((l xref-file-location)) 105(cl-defmethod xref-location-group ((l xref-file-location))
106 (oref l :file)) 106 (oref l :file))
107 107
108(defclass xref-buffer-location (xref-location) 108(defclass xref-buffer-location (xref-location)
@@ -113,12 +113,12 @@ Line numbers start from 1 and columns from 0.")
113 "Create and return a new xref-buffer-location." 113 "Create and return a new xref-buffer-location."
114 (make-instance 'xref-buffer-location :buffer buffer :position position)) 114 (make-instance 'xref-buffer-location :buffer buffer :position position))
115 115
116(defmethod xref-location-marker ((l xref-buffer-location)) 116(cl-defmethod xref-location-marker ((l xref-buffer-location))
117 (with-slots (buffer position) l 117 (with-slots (buffer position) l
118 (let ((m (make-marker))) 118 (let ((m (make-marker)))
119 (move-marker m position buffer)))) 119 (move-marker m position buffer))))
120 120
121(defmethod xref-location-group ((l xref-buffer-location)) 121(cl-defmethod xref-location-group ((l xref-buffer-location))
122 (with-slots (buffer) l 122 (with-slots (buffer) l
123 (or (buffer-file-name buffer) 123 (or (buffer-file-name buffer)
124 (format "(buffer %s)" (buffer-name buffer))))) 124 (format "(buffer %s)" (buffer-name buffer)))))
@@ -134,10 +134,10 @@ actual location is not known.")
134 "Create and return a new xref-bogus-location." 134 "Create and return a new xref-bogus-location."
135 (make-instance 'xref-bogus-location :message message)) 135 (make-instance 'xref-bogus-location :message message))
136 136
137(defmethod xref-location-marker ((l xref-bogus-location)) 137(cl-defmethod xref-location-marker ((l xref-bogus-location))
138 (user-error "%s" (oref l :message))) 138 (user-error "%s" (oref l :message)))
139 139
140(defmethod xref-location-group ((_ xref-bogus-location)) "(No location)") 140(cl-defmethod xref-location-group ((_ xref-bogus-location)) "(No location)")
141 141
142;; This should be in elisp-mode.el, but it's preloaded, and we can't 142;; This should be in elisp-mode.el, but it's preloaded, and we can't
143;; preload defclass and defmethod (at least, not yet). 143;; preload defclass and defmethod (at least, not yet).
@@ -151,7 +151,7 @@ actual location is not known.")
151(defun xref-make-elisp-location (symbol type file) 151(defun xref-make-elisp-location (symbol type file)
152 (make-instance 'xref-elisp-location :symbol symbol :type type :file file)) 152 (make-instance 'xref-elisp-location :symbol symbol :type type :file file))
153 153
154(defmethod xref-location-marker ((l xref-elisp-location)) 154(cl-defmethod xref-location-marker ((l xref-elisp-location))
155 (with-slots (symbol type file) l 155 (with-slots (symbol type file) l
156 (let ((buffer-point 156 (let ((buffer-point
157 (pcase type 157 (pcase type
@@ -342,15 +342,15 @@ WINDOW controls how the buffer is displayed:
342(defvar-local xref--temporary-buffers nil 342(defvar-local xref--temporary-buffers nil
343 "List of buffers created by xref code.") 343 "List of buffers created by xref code.")
344 344
345(defvar-local xref--selected nil 345(defvar-local xref--current nil
346 "t if the current buffer has ever been selected. 346 "Non-nil if this buffer was once current, except while displaying xrefs.
347Used for temporary buffers.") 347Used for temporary buffers.")
348 348
349(defvar xref--inhibit-mark-selected nil) 349(defvar xref--inhibit-mark-current nil)
350 350
351(defun xref--mark-selected () 351(defun xref--mark-selected ()
352 (unless xref--inhibit-mark-selected 352 (unless xref--inhibit-mark-current
353 (setq xref--selected t)) 353 (setq xref--current t))
354 (remove-hook 'buffer-list-update-hook #'xref--mark-selected t)) 354 (remove-hook 'buffer-list-update-hook #'xref--mark-selected t))
355 355
356(defun xref--save-to-history (buf win) 356(defun xref--save-to-history (buf win)
@@ -375,7 +375,7 @@ Used for temporary buffers.")
375 (condition-case err 375 (condition-case err
376 (let ((xref-buf (current-buffer)) 376 (let ((xref-buf (current-buffer))
377 (bl (buffer-list)) 377 (bl (buffer-list))
378 (xref--inhibit-mark-selected t)) 378 (xref--inhibit-mark-current t))
379 (xref--goto-location location) 379 (xref--goto-location location)
380 (let ((buf (current-buffer))) 380 (let ((buf (current-buffer)))
381 (unless (memq buf bl) 381 (unless (memq buf bl)
@@ -438,29 +438,28 @@ Used for temporary buffers.")
438 (setq buffer-read-only t)) 438 (setq buffer-read-only t))
439 439
440(defun xref-quit (&optional kill) 440(defun xref-quit (&optional kill)
441 "Perform cleanup, then quit the current window. 441 "Bury temporarily displayed buffers, then quit the current window.
442The cleanup consists of burying all temporarily displayed 442
443buffers, and if KILL is non-nil, of killing all buffers that were 443If KILL is non-nil, kill all buffers that were created in the
444created in the process of showing xrefs. 444process of showing xrefs, and also kill the current buffer.
445 445
446Exceptions are made for buffers switched to by the user in the 446The buffers that the user has otherwise interacted with in the
447meantime, and other window configuration changes. These are 447meantime are preserved."
448preserved."
449 (interactive "P") 448 (interactive "P")
450 (let ((window (selected-window)) 449 (let ((window (selected-window))
451 (history xref--display-history)) 450 (history xref--display-history))
452 (setq xref--display-history nil) 451 (setq xref--display-history nil)
452 (pcase-dolist (`(,buf . ,win) history)
453 (when (and (window-live-p win)
454 (eq buf (window-buffer win)))
455 (quit-window nil win)))
453 (when kill 456 (when kill
454 (let ((xref--inhibit-mark-selected t) 457 (let ((xref--inhibit-mark-current t)
455 kill-buffer-query-functions) 458 kill-buffer-query-functions)
456 (dolist (buf xref--temporary-buffers) 459 (dolist (buf xref--temporary-buffers)
457 (unless (buffer-local-value 'xref--selected buf) 460 (unless (buffer-local-value 'xref--current buf)
458 (kill-buffer buf))) 461 (kill-buffer buf)))
459 (setq xref--temporary-buffers nil))) 462 (setq xref--temporary-buffers nil)))
460 (pcase-dolist (`(,buf . ,win) history)
461 (when (and (window-live-p win)
462 (eq buf (window-buffer win)))
463 (quit-window nil win)))
464 (quit-window kill window))) 463 (quit-window kill window)))
465 464
466(defconst xref-buffer-name "*xref*" 465(defconst xref-buffer-name "*xref*"
@@ -496,7 +495,9 @@ GROUP is a string for decoration purposes and XREF is an
496 'face 'font-lock-keyword-face 495 'face 'font-lock-keyword-face
497 'mouse-face 'highlight 496 'mouse-face 'highlight
498 'keymap xref--button-map 497 'keymap xref--button-map
499 'help-echo "mouse-2: display in another window, RET or mouse-1: navigate") 498 'help-echo
499 (concat "mouse-2: display in another window, "
500 "RET or mouse-1: follow reference"))
500 description)) 501 description))
501 (when (or more1 more2) 502 (when (or more1 more2)
502 (insert "\n"))))) 503 (insert "\n")))))
@@ -535,6 +536,10 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)."
535(defvar xref-show-xrefs-function 'xref--show-xref-buffer 536(defvar xref-show-xrefs-function 'xref--show-xref-buffer
536 "Function to display a list of xrefs.") 537 "Function to display a list of xrefs.")
537 538
539(defvar xref--read-identifier-history nil)
540
541(defvar xref--read-pattern-history nil)
542
538(defun xref--show-xrefs (input kind arg window) 543(defun xref--show-xrefs (input kind arg window)
539 (let* ((bl (buffer-list)) 544 (let* ((bl (buffer-list))
540 (xrefs (funcall xref-find-function kind arg)) 545 (xrefs (funcall xref-find-function kind arg))
@@ -557,7 +562,8 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)."
557 (cond ((or current-prefix-arg (not id)) 562 (cond ((or current-prefix-arg (not id))
558 (completing-read prompt 563 (completing-read prompt
559 (funcall xref-identifier-completion-table-function) 564 (funcall xref-identifier-completion-table-function)
560 nil t id)) 565 nil t id
566 'xref--read-identifier-history))
561 (t id)))) 567 (t id))))
562 568
563 569
@@ -593,12 +599,15 @@ With prefix argument, prompt for the identifier."
593 (interactive (list (xref--read-identifier "Find references of: "))) 599 (interactive (list (xref--read-identifier "Find references of: ")))
594 (xref--show-xrefs identifier 'references identifier nil)) 600 (xref--show-xrefs identifier 'references identifier nil))
595 601
602(declare-function apropos-parse-pattern "apropos" (pattern))
603
596;;;###autoload 604;;;###autoload
597(defun xref-find-apropos (pattern) 605(defun xref-find-apropos (pattern)
598 "Find all meaningful symbols that match PATTERN. 606 "Find all meaningful symbols that match PATTERN.
599The argument has the same meaning as in `apropos'." 607The argument has the same meaning as in `apropos'."
600 (interactive (list (read-from-minibuffer 608 (interactive (list (read-from-minibuffer
601 "Search for pattern (word list or regexp): "))) 609 "Search for pattern (word list or regexp): "
610 nil nil nil 'xref--read-pattern-history)))
602 (require 'apropos) 611 (require 'apropos)
603 (xref--show-xrefs pattern 'apropos 612 (xref--show-xrefs pattern 'apropos
604 (apropos-parse-pattern 613 (apropos-parse-pattern
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 1f5ece02113..920d692d319 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,9 @@
12015-01-22 Paul Eggert <eggert@cs.ucla.edu>
2
3 Don't downcase system diagnostics' first letters
4 * url-dav.el (url-dav-delete-directory, url-dav-delete-file)
5 (url-dav-directory-files): Keep diagnostics consistent with system's.
6
12014-12-12 Lars Magne Ingebrigtsen <larsi@gnus.org> 72014-12-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 8
3 * url-http.el (url-http-parse-headers): `gnutls-available-p' is 9 * url-http.el (url-http-parse-headers): `gnutls-available-p' is
diff --git a/lisp/url/url-dav.el b/lisp/url/url-dav.el
index 65747e93000..61ca0885ec5 100644
--- a/lisp/url/url-dav.el
+++ b/lisp/url/url-dav.el
@@ -741,7 +741,7 @@ files in the collection as well."
741 (if (and (not recursive) 741 (if (and (not recursive)
742 (/= (length props) 1)) 742 (/= (length props) 1))
743 (signal 'file-error (list "Removing directory" 743 (signal 'file-error (list "Removing directory"
744 "directory not empty" url))))) 744 "Directory not empty" url)))))
745 745
746 (mapc (lambda (result) 746 (mapc (lambda (result)
747 (setq status (plist-get (cdr result) 'DAV:status)) 747 (setq status (plist-get (cdr result) 'DAV:status))
@@ -760,7 +760,7 @@ files in the collection as well."
760 url lock-token 760 url lock-token
761 (setq props (url-dav-get-properties url)) 761 (setq props (url-dav-get-properties url))
762 (if (eq (plist-get (cdar props) 'DAV:resourcetype) 'DAV:collection) 762 (if (eq (plist-get (cdar props) 'DAV:resourcetype) 'DAV:collection)
763 (signal 'file-error (list "Removing old name" "is a collection" url))))) 763 (signal 'file-error (list "Removing old name" "Is a collection" url)))))
764 764
765 (mapc (lambda (result) 765 (mapc (lambda (result)
766 (setq status (plist-get (cdr result) 'DAV:status)) 766 (setq status (plist-get (cdr result) 'DAV:status))
@@ -787,7 +787,7 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
787 787
788 (when (and (= (length properties) 1) 788 (when (and (= (length properties) 1)
789 (not (url-dav-file-directory-p url))) 789 (not (url-dav-file-directory-p url)))
790 (signal 'file-error (list "Opening directory" "not a directory" url))) 790 (signal 'file-error (list "Opening directory" "Not a directory" url)))
791 791
792 (while properties 792 (while properties
793 (setq child-props (pop properties) 793 (setq child-props (pop properties)
diff --git a/src/ChangeLog b/src/ChangeLog
index e5e4fe9edb0..8f23dd3833e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,21 @@
12015-01-22 Paul Eggert <eggert@cs.ucla.edu>
2
3 Don't downcase system diagnostics' first letters
4 * fileio.c (report_file_errno): Don't downcase, and simplify.
5 Fixes: bug#19642
6
7 Isolate NIL_IS_ZERO-assuming code better
8 Suggested by Stefan Monnier in:
9 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00588.html
10 * alloc.c (allocate_pseudovector):
11 Use memclear, not memsetnil, to remove a 'verify'.
12 * callint.c (Fcall_interactively):
13 * dispnew.c (realloc_glyph_pool):
14 * xdisp.c (init_iterator):
15 Use memclear, not memset, to remove a 'verify'.
16 * lisp.h (memclear): Rename from memsetnil, and take a byte
17 count rather than a word count. All callers changed.
18
12015-01-20 Paul Eggert <eggert@cs.ucla.edu> 192015-01-20 Paul Eggert <eggert@cs.ucla.edu>
2 20
3 Undo port to hypothetical nonzero Qnil case 21 Undo port to hypothetical nonzero Qnil case
diff --git a/src/alloc.c b/src/alloc.c
index bf0456c6862..571b2b03a29 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3174,11 +3174,8 @@ allocate_pseudovector (int memlen, int lisplen,
3174 eassert (memlen - lisplen <= (1 << PSEUDOVECTOR_REST_BITS) - 1); 3174 eassert (memlen - lisplen <= (1 << PSEUDOVECTOR_REST_BITS) - 1);
3175 eassert (lisplen <= (1 << PSEUDOVECTOR_SIZE_BITS) - 1); 3175 eassert (lisplen <= (1 << PSEUDOVECTOR_SIZE_BITS) - 1);
3176 3176
3177 /* Only the first LISPLEN slots will be traced normally by the GC. 3177 /* Only the first LISPLEN slots will be traced normally by the GC. */
3178 Since Qnil == 0, we can memset Lisp and non-Lisp data at one go. */ 3178 memclear (v->contents, zerolen * word_size);
3179 verify (NIL_IS_ZERO);
3180 memsetnil (v->contents, zerolen);
3181
3182 XSETPVECTYPESIZE (v, tag, lisplen, memlen - lisplen); 3179 XSETPVECTYPESIZE (v, tag, lisplen, memlen - lisplen);
3183 return v; 3180 return v;
3184} 3181}
diff --git a/src/callint.c b/src/callint.c
index 3a595b57d77..165d374dd62 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -509,8 +509,7 @@ invoke it. If KEYS is omitted or nil, the return value of
509 visargs = args + nargs; 509 visargs = args + nargs;
510 varies = (signed char *) (visargs + nargs); 510 varies = (signed char *) (visargs + nargs);
511 511
512 verify (NIL_IS_ZERO); 512 memclear (args, nargs * (2 * word_size + 1));
513 memset (args, 0, nargs * (2 * word_size + 1));
514 513
515 GCPRO5 (prefix_arg, function, *args, *visargs, up_event); 514 GCPRO5 (prefix_arg, function, *args, *visargs, up_event);
516 gcpro3.nvars = nargs; 515 gcpro3.nvars = nargs;
diff --git a/src/coding.c b/src/coding.c
index b95c0a5f825..43ebbe06856 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -11273,7 +11273,7 @@ internal character representation. */);
11273 11273
11274 { 11274 {
11275 Lisp_Object args[coding_arg_undecided_max]; 11275 Lisp_Object args[coding_arg_undecided_max];
11276 memsetnil (args, ARRAYELTS (args)); 11276 memclear (args, sizeof args);
11277 11277
11278 Lisp_Object plist[16]; 11278 Lisp_Object plist[16];
11279 plist[0] = intern_c_string (":name"); 11279 plist[0] = intern_c_string (":name");
diff --git a/src/dispnew.c b/src/dispnew.c
index 8c48ae065ac..e614ceef122 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1343,14 +1343,8 @@ realloc_glyph_pool (struct glyph_pool *pool, struct dim matrix_dim)
1343 ptrdiff_t old_nglyphs = pool->nglyphs; 1343 ptrdiff_t old_nglyphs = pool->nglyphs;
1344 pool->glyphs = xpalloc (pool->glyphs, &pool->nglyphs, 1344 pool->glyphs = xpalloc (pool->glyphs, &pool->nglyphs,
1345 needed - old_nglyphs, -1, sizeof *pool->glyphs); 1345 needed - old_nglyphs, -1, sizeof *pool->glyphs);
1346 1346 memclear (pool->glyphs + old_nglyphs,
1347 /* Redisplay relies on nil as the object of special glyphs 1347 (pool->nglyphs - old_nglyphs) * sizeof *pool->glyphs);
1348 (truncation and continuation glyphs and also blanks used to
1349 extend each line on a TTY), so verify that memset does this. */
1350 verify (NIL_IS_ZERO);
1351
1352 memset (pool->glyphs + old_nglyphs, 0,
1353 (pool->nglyphs - old_nglyphs) * sizeof *pool->glyphs);
1354 } 1348 }
1355 1349
1356 /* Remember the number of rows and columns because (a) we use them 1350 /* Remember the number of rows and columns because (a) we use them
diff --git a/src/eval.c b/src/eval.c
index ddf6535cabc..e649c152a5d 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2299,7 +2299,8 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
2299 /* Avoid making funcall cons up a yet another new vector of arguments 2299 /* Avoid making funcall cons up a yet another new vector of arguments
2300 by explicitly supplying nil's for optional values. */ 2300 by explicitly supplying nil's for optional values. */
2301 SAFE_ALLOCA_LISP (funcall_args, 1 + XSUBR (fun)->max_args); 2301 SAFE_ALLOCA_LISP (funcall_args, 1 + XSUBR (fun)->max_args);
2302 memsetnil (funcall_args + numargs + 1, XSUBR (fun)->max_args - numargs); 2302 memclear (funcall_args + numargs + 1,
2303 (XSUBR (fun)->max_args - numargs) * word_size);
2303 funcall_nargs = 1 + XSUBR (fun)->max_args; 2304 funcall_nargs = 1 + XSUBR (fun)->max_args;
2304 } 2305 }
2305 else 2306 else
@@ -2693,8 +2694,8 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
2693 eassert (XSUBR (fun)->max_args <= ARRAYELTS (internal_argbuf)); 2694 eassert (XSUBR (fun)->max_args <= ARRAYELTS (internal_argbuf));
2694 internal_args = internal_argbuf; 2695 internal_args = internal_argbuf;
2695 memcpy (internal_args, args + 1, numargs * word_size); 2696 memcpy (internal_args, args + 1, numargs * word_size);
2696 memsetnil (internal_args + numargs, 2697 memclear (internal_args + numargs,
2697 XSUBR (fun)->max_args - numargs); 2698 (XSUBR (fun)->max_args - numargs) * word_size);
2698 } 2699 }
2699 else 2700 else
2700 internal_args = args + 1; 2701 internal_args = args + 1;
diff --git a/src/fileio.c b/src/fileio.c
index ff6720d4ae2..d0fd08a742e 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -186,37 +186,17 @@ void
186report_file_errno (char const *string, Lisp_Object name, int errorno) 186report_file_errno (char const *string, Lisp_Object name, int errorno)
187{ 187{
188 Lisp_Object data = CONSP (name) || NILP (name) ? name : list1 (name); 188 Lisp_Object data = CONSP (name) || NILP (name) ? name : list1 (name);
189 Lisp_Object errstring;
190 char *str;
191
192 synchronize_system_messages_locale (); 189 synchronize_system_messages_locale ();
193 str = strerror (errorno); 190 char *str = strerror (errorno);
194 errstring = code_convert_string_norecord (build_unibyte_string (str), 191 Lisp_Object errstring
195 Vlocale_coding_system, 0); 192 = code_convert_string_norecord (build_unibyte_string (str),
196 193 Vlocale_coding_system, 0);
197 while (1) 194 Lisp_Object errdata = Fcons (errstring, data);
198 switch (errorno) 195
199 { 196 if (errorno == EEXIST)
200 case EEXIST: 197 xsignal (Qfile_already_exists, errdata);
201 xsignal (Qfile_already_exists, Fcons (errstring, data)); 198 else
202 break; 199 xsignal (Qfile_error, Fcons (build_string (string), errdata));
203 default:
204 /* System error messages are capitalized. Downcase the initial
205 unless it is followed by a slash. (The slash case caters to
206 error messages that begin with "I/O" or, in German, "E/A".) */
207 if (STRING_MULTIBYTE (errstring)
208 && ! EQ (Faref (errstring, make_number (1)), make_number ('/')))
209 {
210 int c;
211
212 str = SSDATA (errstring);
213 c = STRING_CHAR ((unsigned char *) str);
214 Faset (errstring, make_number (0), make_number (downcase (c)));
215 }
216
217 xsignal (Qfile_error,
218 Fcons (build_string (string), Fcons (errstring, data)));
219 }
220} 200}
221 201
222/* Signal a file-access failure that set errno. STRING describes the 202/* Signal a file-access failure that set errno. STRING describes the
diff --git a/src/fns.c b/src/fns.c
index d177294480a..a4b2e6d8e85 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -2524,7 +2524,7 @@ mapcar1 (EMACS_INT leni, Lisp_Object *vals, Lisp_Object fn, Lisp_Object seq)
2524 if (vals) 2524 if (vals)
2525 { 2525 {
2526 /* Don't let vals contain any garbage when GC happens. */ 2526 /* Don't let vals contain any garbage when GC happens. */
2527 memsetnil (vals, leni); 2527 memclear (vals, leni * word_size);
2528 2528
2529 GCPRO3 (dummy, fn, seq); 2529 GCPRO3 (dummy, fn, seq);
2530 gcpro1.var = vals; 2530 gcpro1.var = vals;
@@ -3700,7 +3700,7 @@ larger_vector (Lisp_Object vec, ptrdiff_t incr_min, ptrdiff_t nitems_max)
3700 new_size = old_size + incr; 3700 new_size = old_size + incr;
3701 v = allocate_vector (new_size); 3701 v = allocate_vector (new_size);
3702 memcpy (v->contents, XVECTOR (vec)->contents, old_size * sizeof *v->contents); 3702 memcpy (v->contents, XVECTOR (vec)->contents, old_size * sizeof *v->contents);
3703 memsetnil (v->contents + old_size, new_size - old_size); 3703 memclear (v->contents + old_size, incr * word_size);
3704 XSETVECTOR (vec, v); 3704 XSETVECTOR (vec, v);
3705 return vec; 3705 return vec;
3706} 3706}
diff --git a/src/font.c b/src/font.c
index 190b33a8ef0..d05742ce2bf 100644
--- a/src/font.c
+++ b/src/font.c
@@ -989,14 +989,14 @@ font_expand_wildcards (Lisp_Object *field, int n)
989 if (i == 0 || ! NILP (tmp[i - 1])) 989 if (i == 0 || ! NILP (tmp[i - 1]))
990 /* None of TMP[X] corresponds to Jth field. */ 990 /* None of TMP[X] corresponds to Jth field. */
991 return -1; 991 return -1;
992 memsetnil (field + j, range[i].from - j); 992 memclear (field + j, (range[i].from - j) * word_size);
993 j = range[i].from; 993 j = range[i].from;
994 } 994 }
995 field[j++] = tmp[i]; 995 field[j++] = tmp[i];
996 } 996 }
997 if (! NILP (tmp[n - 1]) && j < XLFD_REGISTRY_INDEX) 997 if (! NILP (tmp[n - 1]) && j < XLFD_REGISTRY_INDEX)
998 return -1; 998 return -1;
999 memsetnil (field + j, XLFD_LAST_INDEX - j); 999 memclear (field + j, (XLFD_LAST_INDEX - j) * word_size);
1000 if (INTEGERP (field[XLFD_ENCODING_INDEX])) 1000 if (INTEGERP (field[XLFD_ENCODING_INDEX]))
1001 field[XLFD_ENCODING_INDEX] 1001 field[XLFD_ENCODING_INDEX]
1002 = Fintern (Fnumber_to_string (field[XLFD_ENCODING_INDEX]), Qnil); 1002 = Fintern (Fnumber_to_string (field[XLFD_ENCODING_INDEX]), Qnil);
diff --git a/src/lisp.h b/src/lisp.h
index f1e6945f43a..76a9ed8f159 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1513,13 +1513,15 @@ gc_aset (Lisp_Object array, ptrdiff_t idx, Lisp_Object val)
1513 to find such assumptions later if we change Qnil to be nonzero. */ 1513 to find such assumptions later if we change Qnil to be nonzero. */
1514enum { NIL_IS_ZERO = XLI_BUILTIN_LISPSYM (iQnil) == 0 }; 1514enum { NIL_IS_ZERO = XLI_BUILTIN_LISPSYM (iQnil) == 0 };
1515 1515
1516/* Set a Lisp_Object array V's N entries to nil. */ 1516/* Clear the object addressed by P, with size NBYTES, so that all its
1517 bytes are zero and all its Lisp values are nil. */
1517INLINE void 1518INLINE void
1518memsetnil (Lisp_Object *v, ptrdiff_t n) 1519memclear (void *p, ptrdiff_t nbytes)
1519{ 1520{
1520 eassert (0 <= n); 1521 eassert (0 <= nbytes);
1521 verify (NIL_IS_ZERO); 1522 verify (NIL_IS_ZERO);
1522 memset (v, 0, n * sizeof *v); 1523 /* Since Qnil is zero, memset suffices. */
1524 memset (p, 0, nbytes);
1523} 1525}
1524 1526
1525/* If a struct is made to look like a vector, this macro returns the length 1527/* If a struct is made to look like a vector, this macro returns the length
diff --git a/src/xdisp.c b/src/xdisp.c
index 5e57e0588cf..280be6bd7a1 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2752,13 +2752,7 @@ init_iterator (struct it *it, struct window *w,
2752 row = MATRIX_HEADER_LINE_ROW (w->desired_matrix); 2752 row = MATRIX_HEADER_LINE_ROW (w->desired_matrix);
2753 } 2753 }
2754 2754
2755 /* Clear IT. */ 2755 memclear (it, sizeof *it);
2756
2757 /* The code assumes it->object and other Lisp_Object components are
2758 set to nil, so verify that memset does this. */
2759 verify (NIL_IS_ZERO);
2760 memset (it, 0, sizeof *it);
2761
2762 it->current.overlay_string_index = -1; 2756 it->current.overlay_string_index = -1;
2763 it->current.dpvec_index = -1; 2757 it->current.dpvec_index = -1;
2764 it->base_face_id = remapped_base_face_id; 2758 it->base_face_id = remapped_base_face_id;
diff --git a/test/automated/eieio-tests.el b/test/automated/eieio-tests.el
index e0120b4b5b8..847aefd63fc 100644
--- a/test/automated/eieio-tests.el
+++ b/test/automated/eieio-tests.el
@@ -655,7 +655,7 @@ Do not override for `prot-2'."
655 (oref eitest-p1 slot-1) 655 (oref eitest-p1 slot-1)
656 (oref eitest-p2 slot-1) 656 (oref eitest-p2 slot-1)
657 ;; Accessing protected slot out of context used to fail, but we dropped this 657 ;; Accessing protected slot out of context used to fail, but we dropped this
658 ;; feature, since it was underused and noone noticed that the check was 658 ;; feature, since it was underused and no one noticed that the check was
659 ;; incorrect (much too loose). 659 ;; incorrect (much too loose).
660 ;;PROTECTED (should-error (oref eitest-p1 slot-2) :type 'invalid-slot-name) 660 ;;PROTECTED (should-error (oref eitest-p1 slot-2) :type 'invalid-slot-name)
661 ;; Access protected slot in method 661 ;; Access protected slot in method