aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier2013-10-29 22:45:53 -0400
committerStefan Monnier2013-10-29 22:45:53 -0400
commitae4002ce294f21a82979edacef39f82d8e4cd1cc (patch)
treed0f2e23db27b13aeb9066c534661f04032fb36d8 /lisp
parent53b39e8977941c6b60deeeca3c0e54da9ec7961a (diff)
downloademacs-ae4002ce294f21a82979edacef39f82d8e4cd1cc.tar.gz
emacs-ae4002ce294f21a82979edacef39f82d8e4cd1cc.zip
Cleanup namespace of dos-w32.el.
* lisp/dos-w32.el (minibuffer-history-case-insensitive-variables) (path-separator, null-device, buffer-file-coding-system) (lpr-headers-switches): Check system-type before modifying them. (find-buffer-file-type-coding-system): Mark obsolete. (w32-find-file-not-found-set-buffer-file-coding-system): Rename from find-file-not-found-set-buffer-file-coding-system. (w32-untranslated-filesystem-list, w32-untranslated-canonical-name): (w32-add-untranslated-filesystem, w32-remove-untranslated-filesystem) (w32-direct-print-region-use-command-dot-com, w32-untranslated-file-p): (w32-direct-print-region-helper, w32-direct-print-region-function) (w32-direct-ps-print-region-function): Rename by adding a "w32-" prefix. * lisp/startup.el (normal-top-level-add-subdirs-to-load-path): * lisp/ps-print.el (ps-print-region-function): * lisp/lpr.el (print-region-function): Use new name. * lisp/simple.el (copy-region-as-kill): Fix call to region-extract-function. * lisp/emacs-lisp/bytecomp.el (byte-defop-compiler): Add new `2-and' handler. (byte-compile-and-folded): New function. (=, <, >, <=, >=): Use it.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog21
-rw-r--r--lisp/dos-w32.el126
-rw-r--r--lisp/emacs-lisp/bytecomp.el21
-rw-r--r--lisp/lpr.el2
-rw-r--r--lisp/ps-print.el2
-rw-r--r--lisp/simple.el2
-rw-r--r--lisp/startup.el4
7 files changed, 111 insertions, 67 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d2c99e75f56..a0cf681dcea 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,26 @@
12013-10-30 Stefan Monnier <monnier@iro.umontreal.ca> 12013-10-30 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * simple.el (copy-region-as-kill): Fix call to region-extract-function.
4
5 * emacs-lisp/bytecomp.el (byte-defop-compiler): Add new `2-and' handler.
6 (byte-compile-and-folded): New function.
7 (=, <, >, <=, >=): Use it.
8
9 * dos-w32.el (minibuffer-history-case-insensitive-variables)
10 (path-separator, null-device, buffer-file-coding-system)
11 (lpr-headers-switches): Check system-type before modifying them.
12 (find-buffer-file-type-coding-system): Mark obsolete.
13 (w32-find-file-not-found-set-buffer-file-coding-system): Rename from
14 find-file-not-found-set-buffer-file-coding-system.
15 (w32-untranslated-filesystem-list, w32-untranslated-canonical-name):
16 (w32-add-untranslated-filesystem, w32-remove-untranslated-filesystem)
17 (w32-direct-print-region-use-command-dot-com, w32-untranslated-file-p):
18 (w32-direct-print-region-helper, w32-direct-print-region-function)
19 (w32-direct-ps-print-region-function): Rename by adding a "w32-" prefix.
20 * startup.el (normal-top-level-add-subdirs-to-load-path):
21 * ps-print.el (ps-print-region-function):
22 * lpr.el (print-region-function): Use new name.
23
3 * subr.el (custom-declare-variable-early): Remove function. 24 * subr.el (custom-declare-variable-early): Remove function.
4 (custom-declare-variable-list): Remove var. 25 (custom-declare-variable-list): Remove var.
5 (error, user-error): Remove `while' loop. 26 (error, user-error): Remove `while' loop.
diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el
index 0573caa6c23..a556d30dc12 100644
--- a/lisp/dos-w32.el
+++ b/lisp/dos-w32.el
@@ -29,13 +29,12 @@
29;;; Code: 29;;; Code:
30 30
31;; Use ";" instead of ":" as a path separator (from files.el). 31;; Use ";" instead of ":" as a path separator (from files.el).
32(setq path-separator ";") 32(when (memq system-type '(ms-dos windows-nt))
33 33 (setq path-separator ";")
34(setq minibuffer-history-case-insensitive-variables 34 (push 'file-name-history minibuffer-history-case-insensitive-variables)
35 (cons 'file-name-history minibuffer-history-case-insensitive-variables)) 35 ;; Set the null device (for compile.el).
36 36 (setq null-device "NUL")
37;; Set the null device (for compile.el). 37 (setq-default buffer-file-coding-system 'undecided-dos))
38(setq null-device "NUL")
39 38
40;; For distinguishing file types based upon suffixes. DEPRECATED, DO NOT USE! 39;; For distinguishing file types based upon suffixes. DEPRECATED, DO NOT USE!
41(defcustom file-name-buffer-file-type-alist 40(defcustom file-name-buffer-file-type-alist
@@ -67,18 +66,16 @@ This variable is deprecated, not used anywhere, and will soon be deleted."
67 'file-coding-system-alist 66 'file-coding-system-alist
68 "24.4") 67 "24.4")
69 68
70(setq-default buffer-file-coding-system 'undecided-dos)
71
72(defun find-buffer-file-type-coding-system (command) 69(defun find-buffer-file-type-coding-system (command)
73 "Choose a coding system for a file operation in COMMAND. 70 "Choose a coding system for a file operation in COMMAND.
74COMMAND is a list that specifies the operation, an I/O primitive, as its 71COMMAND is a list that specifies the operation, an I/O primitive, as its
75CAR, and the arguments that might be given to that operation as its CDR. 72CAR, and the arguments that might be given to that operation as its CDR.
76If operation is `insert-file-contents', the coding system is chosen based 73If operation is `insert-file-contents', the coding system is chosen based
77upon the filename (the CAR of the arguments beyond the operation), the contents 74upon the filename (the CAR of the arguments beyond the operation), the contents
78of `untranslated-filesystem-list' and `file-name-buffer-file-type-alist', 75of `w32-untranslated-filesystem-list' and `file-name-buffer-file-type-alist',
79and whether the file exists: 76and whether the file exists:
80 77
81 If it matches in `untranslated-filesystem-list': 78 If it matches in `w32-untranslated-filesystem-list':
82 If the file exists: `undecided' 79 If the file exists: `undecided'
83 If the file does not exist: `undecided-unix' 80 If the file does not exist: `undecided-unix'
84 Otherwise: 81 Otherwise:
@@ -95,7 +92,7 @@ upon the value of `buffer-file-coding-system'. If
95Otherwise, it is `undecided-dos'. 92Otherwise, it is `undecided-dos'.
96 93
97The most common situation is when DOS and Unix files are read and 94The most common situation is when DOS and Unix files are read and
98written, and their names do not match in `untranslated-filesystem-list'. 95written, and their names do not match in `w32-untranslated-filesystem-list'.
99In these cases, the coding system initially will be `undecided'. 96In these cases, the coding system initially will be `undecided'.
100As the file is read in the DOS case, the coding system will be 97As the file is read in the DOS case, the coding system will be
101changed to `undecided-dos' as CR/LFs are detected. As the file 98changed to `undecided-dos' as CR/LFs are detected. As the file
@@ -135,7 +132,7 @@ when writing the file."
135 (file-name-directory target))))) 132 (file-name-directory target)))))
136 (setq undecided t)) 133 (setq undecided t))
137 ;; Next check for a non-DOS file system. 134 ;; Next check for a non-DOS file system.
138 ((untranslated-file-p target) 135 ((w32-untranslated-file-p target)
139 (setq undecided-unix t))) 136 (setq undecided-unix t)))
140 (cond (undecided-unix '(undecided-unix . undecided-unix)) 137 (cond (undecided-unix '(undecided-unix . undecided-unix))
141 (undecided '(undecided . undecided)) 138 (undecided '(undecided . undecided))
@@ -149,11 +146,14 @@ when writing the file."
149 ;; buffer, because normally buffer-file-coding-system is non-nil 146 ;; buffer, because normally buffer-file-coding-system is non-nil
150 ;; in a file-visiting buffer. 147 ;; in a file-visiting buffer.
151 '(undecided-dos . undecided-dos)))))) 148 '(undecided-dos . undecided-dos))))))
149(make-obsolete 'find-buffer-file-type-coding-system nil "24.4")
152 150
153(defun find-file-binary (filename) 151(defun find-file-binary (filename)
154 "Visit file FILENAME and treat it as binary." 152 "Visit file FILENAME and treat it as binary."
153 ;; FIXME: Why here rather than in files.el?
154 ;; FIXME: Can't we use find-file-literally for the same purposes?
155 (interactive "FFind file binary: ") 155 (interactive "FFind file binary: ")
156 (let ((coding-system-for-read 'no-conversion)) 156 (let ((coding-system-for-read 'no-conversion)) ;; FIXME: undecided-unix?
157 (find-file filename))) 157 (find-file filename)))
158 158
159(defun find-file-text (filename) 159(defun find-file-text (filename)
@@ -162,7 +162,7 @@ when writing the file."
162 (let ((coding-system-for-read 'undecided-dos)) 162 (let ((coding-system-for-read 'undecided-dos))
163 (find-file filename))) 163 (find-file filename)))
164 164
165(defun find-file-not-found-set-buffer-file-coding-system () 165(defun w32-find-file-not-found-set-buffer-file-coding-system ()
166 (with-current-buffer (current-buffer) 166 (with-current-buffer (current-buffer)
167 (let ((coding buffer-file-coding-system)) 167 (let ((coding buffer-file-coding-system))
168 ;; buffer-file-coding-system is already set by 168 ;; buffer-file-coding-system is already set by
@@ -171,49 +171,50 @@ when writing the file."
171 ;; the EOL conversion, if required by the user. 171 ;; the EOL conversion, if required by the user.
172 (when (and (null coding-system-for-read) 172 (when (and (null coding-system-for-read)
173 (or inhibit-eol-conversion 173 (or inhibit-eol-conversion
174 (untranslated-file-p (buffer-file-name)))) 174 (w32-untranslated-file-p (buffer-file-name))))
175 (setq coding (coding-system-change-eol-conversion coding 0)) 175 (setq coding (coding-system-change-eol-conversion coding 0))
176 (setq buffer-file-coding-system coding)) 176 (setq buffer-file-coding-system coding))
177 nil))) 177 nil)))
178 178
179;;; To set the default coding system on new files. 179;; To set the default coding system on new files.
180(add-hook 'find-file-not-found-functions 180(add-hook 'find-file-not-found-functions
181 'find-file-not-found-set-buffer-file-coding-system) 181 'w32-find-file-not-found-set-buffer-file-coding-system)
182 182
183;;; To accommodate filesystems that do not require CR/LF translation. 183;;; To accommodate filesystems that do not require CR/LF translation.
184(defvar untranslated-filesystem-list nil 184(define-obsolete-variable-alias 'untranslated-filesystem-list
185 'w32-untranslated-filesystem-list "24.4")
186(defvar w32-untranslated-filesystem-list nil
185 "List of filesystems that require no CR/LF translation when reading 187 "List of filesystems that require no CR/LF translation when reading
186and writing files. Each filesystem in the list is a string naming 188and writing files. Each filesystem in the list is a string naming
187the directory prefix corresponding to the filesystem.") 189the directory prefix corresponding to the filesystem.")
188 190
189(defun untranslated-canonical-name (filename) 191(defun w32-untranslated-canonical-name (filename)
190 "Return FILENAME in a canonicalized form for use with the functions 192 "Return FILENAME in a canonicalized form for use with the functions
191dealing with untranslated filesystems." 193dealing with untranslated filesystems."
192 (if (memq system-type '(ms-dos windows-nt cygwin)) 194 (if (memq system-type '(ms-dos windows-nt cygwin))
193 ;; The canonical form for DOS/W32 is with A-Z downcased and all 195 ;; The canonical form for DOS/W32 is with A-Z downcased and all
194 ;; directory separators changed to directory-sep-char. 196 ;; directory separators changed to directory-sep-char.
195 (let ((name nil)) 197 (let ((name
196 (setq name (mapconcat 198 (mapconcat (lambda (char)
197 (lambda (char) 199 (char-to-string (if (and (<= ?A char ?Z))
198 (if (and (<= ?A char) (<= char ?Z)) 200 (+ (- char ?A) ?a)
199 (char-to-string (+ (- char ?A) ?a)) 201 char)))
200 (char-to-string char))) 202 filename nil)))
201 filename nil))
202 ;; Use expand-file-name to canonicalize directory separators, except 203 ;; Use expand-file-name to canonicalize directory separators, except
203 ;; with bare drive letters (which would have the cwd appended). 204 ;; with bare drive letters (which would have the cwd appended).
204 ;; Avoid expanding names that could trigger ange-ftp to prompt 205 ;; Avoid expanding names that could trigger ange-ftp to prompt
205 ;; for passwords, though. 206 ;; for passwords, though.
206 (if (or (string-match-p "^.:$" name) 207 (if (or (string-match-p "^.:\\'" name)
207 (string-match-p "^/[^/:]+:" name)) 208 (string-match-p "^/[^/:]+:" name))
208 name 209 name
209 (expand-file-name name))) 210 (expand-file-name name)))
210 filename)) 211 filename))
211 212
212(defun untranslated-file-p (filename) 213(defun w32-untranslated-file-p (filename)
213 "Return t if FILENAME is on a filesystem that does not require 214 "Return t if FILENAME is on a filesystem that does not require
214CR/LF translation, and nil otherwise." 215CR/LF translation, and nil otherwise."
215 (let ((fs (untranslated-canonical-name filename)) 216 (let ((fs (w32-untranslated-canonical-name filename))
216 (ufs-list untranslated-filesystem-list) 217 (ufs-list w32-untranslated-filesystem-list)
217 (found nil)) 218 (found nil))
218 (while (and (not found) ufs-list) 219 (while (and (not found) ufs-list)
219 (if (string-match-p (concat "^" (car ufs-list)) fs) 220 (if (string-match-p (concat "^" (car ufs-list)) fs)
@@ -221,7 +222,9 @@ CR/LF translation, and nil otherwise."
221 (setq ufs-list (cdr ufs-list)))) 222 (setq ufs-list (cdr ufs-list))))
222 found)) 223 found))
223 224
224(defun add-untranslated-filesystem (filesystem) 225(define-obsolete-function-alias 'add-untranslated-filesystem
226 'w32-add-untranslated-filesystem "24.4")
227(defun w32-add-untranslated-filesystem (filesystem)
225 "Add FILESYSTEM to the list of filesystems that do not require 228 "Add FILESYSTEM to the list of filesystems that do not require
226CR/LF translation. FILESYSTEM is a string containing the directory 229CR/LF translation. FILESYSTEM is a string containing the directory
227prefix corresponding to the filesystem. For example, for a Unix 230prefix corresponding to the filesystem. For example, for a Unix
@@ -230,25 +233,29 @@ filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"."
230 ;; with a directory, but RET returns the current buffer's file, not 233 ;; with a directory, but RET returns the current buffer's file, not
231 ;; its directory. 234 ;; its directory.
232 (interactive "DUntranslated file system: ") 235 (interactive "DUntranslated file system: ")
233 (let ((fs (untranslated-canonical-name filesystem))) 236 (let ((fs (w32-untranslated-canonical-name filesystem)))
234 (if (member fs untranslated-filesystem-list) 237 (if (member fs w32-untranslated-filesystem-list)
235 untranslated-filesystem-list 238 w32-untranslated-filesystem-list
236 (setq untranslated-filesystem-list 239 (push fs w32-untranslated-filesystem-list))))
237 (cons fs untranslated-filesystem-list))))) 240
238 241
239(defun remove-untranslated-filesystem (filesystem) 242(define-obsolete-function-alias 'remove-untranslated-filesystem
243 'w32-remove-untranslated-filesystem "24.4")
244(defun w32-remove-untranslated-filesystem (filesystem)
240 "Remove FILESYSTEM from the list of filesystems that do not require 245 "Remove FILESYSTEM from the list of filesystems that do not require
241CR/LF translation. FILESYSTEM is a string containing the directory 246CR/LF translation. FILESYSTEM is a string containing the directory
242prefix corresponding to the filesystem. For example, for a Unix 247prefix corresponding to the filesystem. For example, for a Unix
243filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"." 248filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"."
244 (interactive "fUntranslated file system: ") 249 (interactive "fUntranslated file system: ")
245 (setq untranslated-filesystem-list 250 (setq w32-untranslated-filesystem-list
246 (delete (untranslated-canonical-name filesystem) 251 (delete (w32-untranslated-canonical-name filesystem)
247 untranslated-filesystem-list))) 252 w32-untranslated-filesystem-list)))
248 253
249;;; Support for printing under DOS/Windows, see lpr.el and ps-print.el. 254;;; Support for printing under DOS/Windows, see lpr.el and ps-print.el.
250 255
251(defcustom direct-print-region-use-command-dot-com t 256(define-obsolete-variable-alias 'direct-print-region-use-command-dot-com
257 'w32-direct-print-region-use-command-dot-com "24.4")
258(defcustom w32-direct-print-region-use-command-dot-com t
252 "If non-nil, use command.com to print on Windows 9x." 259 "If non-nil, use command.com to print on Windows 9x."
253 :type 'boolean 260 :type 'boolean
254 :group 'dos-fns 261 :group 'dos-fns
@@ -256,7 +263,7 @@ filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"."
256 263
257;; Function to actually send data to the printer port. 264;; Function to actually send data to the printer port.
258;; Supports writing directly, and using various programs. 265;; Supports writing directly, and using various programs.
259(defun direct-print-region-helper (printer 266(defun w32-direct-print-region-helper (printer
260 start end 267 start end
261 lpr-prog 268 lpr-prog
262 _delete-text _buf _display 269 _delete-text _buf _display
@@ -332,7 +339,7 @@ filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"."
332 ((and (eq system-type 'windows-nt) 339 ((and (eq system-type 'windows-nt)
333 (getenv "winbootdir") 340 (getenv "winbootdir")
334 ;; Allow cop-out so command.com isn't invoked 341 ;; Allow cop-out so command.com isn't invoked
335 direct-print-region-use-command-dot-com 342 w32-direct-print-region-use-command-dot-com
336 ;; file-attributes fails on LPT ports on Windows 9x but 343 ;; file-attributes fails on LPT ports on Windows 9x but
337 ;; not on NT, so handle both cases for safety. 344 ;; not on NT, so handle both cases for safety.
338 (eq (or (nth 7 (file-attributes printer)) 0) 0)) 345 (eq (or (nth 7 (file-attributes printer)) 0) 0))
@@ -351,10 +358,12 @@ filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"."
351 358
352(declare-function default-printer-name "w32fns.c") 359(declare-function default-printer-name "w32fns.c")
353 360
354(defun direct-print-region-function (start end 361(define-obsolete-function-alias 'direct-print-region-function
355 &optional lpr-prog 362 'w32-direct-print-region-function "24.4")
356 delete-text buf display 363(defun w32-direct-print-region-function (start end
357 &rest rest) 364 &optional lpr-prog
365 delete-text buf display
366 &rest rest)
358 "DOS/Windows-specific function to print the region on a printer. 367 "DOS/Windows-specific function to print the region on a printer.
359Writes the region to the device or file which is a value of 368Writes the region to the device or file which is a value of
360`printer-name' (which see), unless the value of `lpr-command' 369`printer-name' (which see), unless the value of `lpr-command'
@@ -382,8 +391,8 @@ indicates a specific program should be invoked."
382 (or (eq coding-system-for-write 'no-conversion) 391 (or (eq coding-system-for-write 'no-conversion)
383 (setq coding-system-for-write 392 (setq coding-system-for-write
384 (aref eol-type 1))) ; force conversion to DOS EOLs 393 (aref eol-type 1))) ; force conversion to DOS EOLs
385 (direct-print-region-helper printer start end lpr-prog 394 (w32-direct-print-region-helper printer start end lpr-prog
386 delete-text buf display rest))) 395 delete-text buf display rest)))
387 396
388(defvar lpr-headers-switches) 397(defvar lpr-headers-switches)
389 398
@@ -395,14 +404,17 @@ indicates a specific program should be invoked."
395;; then requests to print page headers will be silently 404;; then requests to print page headers will be silently
396;; ignored, and `print-buffer' and `print-region' produce 405;; ignored, and `print-buffer' and `print-region' produce
397;; the same output as `lpr-buffer' and `lpr-region', accordingly. 406;; the same output as `lpr-buffer' and `lpr-region', accordingly.
398(setq lpr-headers-switches "(page headers are not supported)") 407(when (memq system-type '(ms-dos windows-nt))
408 (setq lpr-headers-switches "(page headers are not supported)"))
399 409
400(defvar ps-printer-name) 410(defvar ps-printer-name)
401 411
402(defun direct-ps-print-region-function (start end 412(define-obsolete-function-alias 'direct-ps-print-region-function
403 &optional lpr-prog 413 'w32-direct-ps-print-region-function "24.4")
404 delete-text buf display 414(defun w32-direct-ps-print-region-function (start end
405 &rest rest) 415 &optional lpr-prog
416 delete-text buf display
417 &rest rest)
406 "DOS/Windows-specific function to print the region on a PostScript printer. 418 "DOS/Windows-specific function to print the region on a PostScript printer.
407Writes the region to the device or file which is a value of 419Writes the region to the device or file which is a value of
408`ps-printer-name' (which see), unless the value of `ps-lpr-command' 420`ps-printer-name' (which see), unless the value of `ps-lpr-command'
@@ -413,8 +425,8 @@ indicates a specific program should be invoked."
413 (symbol-value 'dos-ps-printer)) 425 (symbol-value 'dos-ps-printer))
414 ps-printer-name 426 ps-printer-name
415 (default-printer-name)))) 427 (default-printer-name))))
416 (direct-print-region-helper printer start end lpr-prog 428 (w32-direct-print-region-helper printer start end lpr-prog
417 delete-text buf display rest))) 429 delete-text buf display rest)))
418 430
419;(setq ps-lpr-command "gs") 431;(setq ps-lpr-command "gs")
420 432
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 35c7c391870..e0d474bbb9f 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -3175,6 +3175,7 @@ If it is nil, then the handler is \"byte-compile-SYMBOL.\""
3175 '((0 . byte-compile-no-args) 3175 '((0 . byte-compile-no-args)
3176 (1 . byte-compile-one-arg) 3176 (1 . byte-compile-one-arg)
3177 (2 . byte-compile-two-args) 3177 (2 . byte-compile-two-args)
3178 (2-and . byte-compile-and-folded)
3178 (3 . byte-compile-three-args) 3179 (3 . byte-compile-three-args)
3179 (0-1 . byte-compile-zero-or-one-arg) 3180 (0-1 . byte-compile-zero-or-one-arg)
3180 (1-2 . byte-compile-one-or-two-args) 3181 (1-2 . byte-compile-one-or-two-args)
@@ -3256,11 +3257,11 @@ If it is nil, then the handler is \"byte-compile-SYMBOL.\""
3256(byte-defop-compiler cons 2) 3257(byte-defop-compiler cons 2)
3257(byte-defop-compiler aref 2) 3258(byte-defop-compiler aref 2)
3258(byte-defop-compiler set 2) 3259(byte-defop-compiler set 2)
3259(byte-defop-compiler (= byte-eqlsign) 2) 3260(byte-defop-compiler (= byte-eqlsign) 2-and)
3260(byte-defop-compiler (< byte-lss) 2) 3261(byte-defop-compiler (< byte-lss) 2-and)
3261(byte-defop-compiler (> byte-gtr) 2) 3262(byte-defop-compiler (> byte-gtr) 2-and)
3262(byte-defop-compiler (<= byte-leq) 2) 3263(byte-defop-compiler (<= byte-leq) 2-and)
3263(byte-defop-compiler (>= byte-geq) 2) 3264(byte-defop-compiler (>= byte-geq) 2-and)
3264(byte-defop-compiler get 2) 3265(byte-defop-compiler get 2)
3265(byte-defop-compiler nth 2) 3266(byte-defop-compiler nth 2)
3266(byte-defop-compiler substring 2-3) 3267(byte-defop-compiler substring 2-3)
@@ -3324,6 +3325,16 @@ If it is nil, then the handler is \"byte-compile-SYMBOL.\""
3324 (byte-compile-form (nth 2 form)) 3325 (byte-compile-form (nth 2 form))
3325 (byte-compile-out (get (car form) 'byte-opcode) 0))) 3326 (byte-compile-out (get (car form) 'byte-opcode) 0)))
3326 3327
3328(defun byte-compile-and-folded (form)
3329 "Compile calls to functions like `<='.
3330These implicitly `and' together a bunch of two-arg bytecodes."
3331 (let ((l (length form)))
3332 (cond
3333 ((< l 3) (byte-compile-form `(progn ,(nth 1 form) t)))
3334 ((= l 3) (byte-compile-two-args form))
3335 (t (byte-compile-form `(and (,(car form) ,(nth 1 form) ,(nth 2 form))
3336 (,(car form) ,@(nthcdr 2 form))))))))
3337
3327(defun byte-compile-three-args (form) 3338(defun byte-compile-three-args (form)
3328 (if (not (= (length form) 4)) 3339 (if (not (= (length form) 4))
3329 (byte-compile-subr-wrong-args form 3) 3340 (byte-compile-subr-wrong-args form 3)
diff --git a/lisp/lpr.el b/lisp/lpr.el
index 5aed3bcc484..0e960517159 100644
--- a/lisp/lpr.el
+++ b/lisp/lpr.el
@@ -132,7 +132,7 @@ and print the result."
132 132
133(defcustom print-region-function 133(defcustom print-region-function
134 (if (memq system-type '(ms-dos windows-nt)) 134 (if (memq system-type '(ms-dos windows-nt))
135 #'direct-print-region-function 135 #'w32-direct-print-region-function
136 #'call-process-region) 136 #'call-process-region)
137 "Function to call to print the region on a printer. 137 "Function to call to print the region on a printer.
138See definition of `print-region-1' for calling conventions." 138See definition of `print-region-1' for calling conventions."
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 5ece9cb966b..50a44701906 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -1772,7 +1772,7 @@ See `ps-lpr-command'."
1772 1772
1773(defcustom ps-print-region-function 1773(defcustom ps-print-region-function
1774 (if (memq system-type '(ms-dos windows-nt)) 1774 (if (memq system-type '(ms-dos windows-nt))
1775 #'direct-ps-print-region-function 1775 #'w32-direct-ps-print-region-function
1776 #'call-process-region) 1776 #'call-process-region)
1777 "Specify a function to print the region on a PostScript printer. 1777 "Specify a function to print the region on a PostScript printer.
1778See definition of `call-process-region' for calling conventions. The fourth 1778See definition of `call-process-region' for calling conventions. The fourth
diff --git a/lisp/simple.el b/lisp/simple.el
index 49108025a40..ca2088eeb24 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3676,7 +3676,7 @@ some text between BEG and END, but we're copying the region.
3676This command's old key binding has been given to `kill-ring-save'." 3676This command's old key binding has been given to `kill-ring-save'."
3677 (interactive "r\np") 3677 (interactive "r\np")
3678 (let ((str (if region 3678 (let ((str (if region
3679 (funcall region-extract-function) 3679 (funcall region-extract-function nil)
3680 (filter-buffer-substring beg end)))) 3680 (filter-buffer-substring beg end))))
3681 (if (eq last-command 'kill-region) 3681 (if (eq last-command 'kill-region)
3682 (kill-append str (< end beg)) 3682 (kill-append str (< end beg))
diff --git a/lisp/startup.el b/lisp/startup.el
index cc40f9ec8e9..3f4923afb2e 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -441,8 +441,8 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
441 (let* ((this-dir (car dirs)) 441 (let* ((this-dir (car dirs))
442 (contents (directory-files this-dir)) 442 (contents (directory-files this-dir))
443 (default-directory this-dir) 443 (default-directory this-dir)
444 (canonicalized (if (fboundp 'untranslated-canonical-name) 444 (canonicalized (if (fboundp 'w32-untranslated-canonical-name)
445 (untranslated-canonical-name this-dir)))) 445 (w32-untranslated-canonical-name this-dir))))
446 ;; The Windows version doesn't report meaningful inode numbers, so 446 ;; The Windows version doesn't report meaningful inode numbers, so
447 ;; use the canonicalized absolute file name of the directory instead. 447 ;; use the canonicalized absolute file name of the directory instead.
448 (setq attrs (or canonicalized 448 (setq attrs (or canonicalized