aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2011-04-04 23:45:27 -0700
committerPaul Eggert2011-04-04 23:45:27 -0700
commitca23cc8840efb1354ebe16c6bb99bf1f8880e9b6 (patch)
treee95220daac6b9ffb47966df747308a11c0623179
parentd5efd1d1b54595db795d6fddb32404cc74923d77 (diff)
parentb87a82007428428e2f24af64a59799402bb1651e (diff)
downloademacs-ca23cc8840efb1354ebe16c6bb99bf1f8880e9b6.tar.gz
emacs-ca23cc8840efb1354ebe16c6bb99bf1f8880e9b6.zip
Merge from mainline.
-rw-r--r--etc/NEWS7
-rw-r--r--lisp/ChangeLog113
-rw-r--r--lisp/bs.el36
-rw-r--r--lisp/custom.el14
-rw-r--r--lisp/dired-aux.el39
-rw-r--r--lisp/dired.el14
-rw-r--r--lisp/ehelp.el6
-rw-r--r--lisp/emacs-lisp/package.el2
-rw-r--r--lisp/emacs-lisp/re-builder.el4
-rw-r--r--lisp/epa-dired.el2
-rw-r--r--lisp/epa-file.el2
-rw-r--r--lisp/epa-hook.el2
-rw-r--r--lisp/epa-mail.el4
-rw-r--r--lisp/epa.el14
-rw-r--r--lisp/epg.el40
-rw-r--r--lisp/files.el3
-rw-r--r--lisp/find-dired.el75
-rw-r--r--lisp/gnus/ChangeLog17
-rw-r--r--lisp/gnus/gnus-start.el4
-rw-r--r--lisp/gnus/gnus-sum.el11
-rw-r--r--lisp/gnus/nnimap.el8
-rw-r--r--lisp/gnus/nntp.el7
-rw-r--r--lisp/help-fns.el8
-rw-r--r--lisp/hexl.el8
-rw-r--r--lisp/linum.el6
-rw-r--r--lisp/makefile.w32-in4
-rw-r--r--lisp/net/network-stream.el (renamed from lisp/gnus/proto-stream.el)210
-rw-r--r--lisp/net/rcirc.el3
-rw-r--r--lisp/progmodes/grep.el37
-rw-r--r--lisp/progmodes/idlwave.el19
-rw-r--r--lisp/startup.el3
-rw-r--r--lisp/subr.el22
-rw-r--r--lisp/textmodes/flyspell.el34
-rw-r--r--lisp/url/ChangeLog12
-rw-r--r--lisp/url/url-cookie.el5
-rw-r--r--lisp/url/url-gw.el39
-rw-r--r--src/ChangeLog47
-rw-r--r--src/eval.c2
-rw-r--r--src/keyboard.c3
-rw-r--r--src/nsfont.m5
-rw-r--r--src/nsterm.m7
-rw-r--r--src/xdisp.c46
42 files changed, 579 insertions, 365 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 521741100f1..6b7fd303dde 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -349,6 +349,7 @@ between applications.
349 349
350*** To return to the previous behavior, do the following: 350*** To return to the previous behavior, do the following:
351 351
352**** Change `select-active-regions' to nil.
352**** Change `mouse-drag-copy-region' to t. 353**** Change `mouse-drag-copy-region' to t.
353**** Change `x-select-enable-primary' to t (on X only). 354**** Change `x-select-enable-primary' to t (on X only).
354**** Change `x-select-enable-clipboard' to nil. 355**** Change `x-select-enable-clipboard' to nil.
@@ -773,6 +774,12 @@ sc.el, x-menu.el, rnews.el, rnewspost.el
773 774
774* Lisp changes in Emacs 24.1 775* Lisp changes in Emacs 24.1
775 776
777** `open-network-stream' can now be used to open an encrypted stream.
778It now accepts an optional `:type' parameter for initiating a TLS
779connection, directly or via STARTTLS. To do STARTTLS, additional
780parameters (`:end-of-command', `:success', `:capabilities-command')
781must also be supplied.
782
776** Code can now use lexical scoping by default instead of dynamic scoping. 783** Code can now use lexical scoping by default instead of dynamic scoping.
777The `lexical-binding' variable lets code use lexical scoping for local 784The `lexical-binding' variable lets code use lexical scoping for local
778variables. It is typically set via file-local variables, in which case it 785variables. It is typically set via file-local variables, in which case it
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 288199fd702..2a58b306111 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,98 @@
12011-04-05 Deniz Dogan <deniz@dogan.se>
2
3 * net/rcirc.el: Update my e-mail address.
4 (rcirc-mode-map): Remove M-o binding.
5
62011-04-05 Chong Yidong <cyd@stupidchicken.com>
7
8 * startup.el (command-line): Save the cursor's theme-face
9 directly, instead of using face-override-spec.
10
11 * custom.el (load-theme): Minor optimization in assigning faces.
12
132011-04-04 Juanma Barranquero <lekktu@gmail.com>
14
15 * help-fns.el (describe-variable): Complete all variables having
16 documentation, including keywords.
17 http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00112.html
18
192011-04-04 Juanma Barranquero <lekktu@gmail.com>
20
21 Convert to lexical-binding.
22
23 * bs.el (bs-refresh, bs-sort-buffer-interns-are-last)
24 (bs--get-marked-string, bs--get-modified-string)
25 (bs--get-readonly-string, bs--get-size-string, bs--get-name)
26 (bs--get-mode-name, bs--get-file-name): Mark unused arguments.
27 (bs--configuration-name-for-prefix-arg): Rename argument PREFIX-ARG.
28
29 * ehelp.el (electric-help-execute-extended)
30 (electric-help-ctrl-x-prefix):
31 * hexl.el (hexl-revert-buffer-function):
32 * linum.el (linum-after-change, linum-after-scroll):
33 * emacs-lisp/re-builder.el (reb-auto-update): Mark unused arguments.
34
35 * help-fns.el (help-describe-category-set): Remove unused ERR variable.
36
372011-04-04 Daiki Ueno <ueno@unixuser.org>
38
39 * epa-dired.el:
40 * epa-mail.el:
41 * epa-hook.el:
42 * epa-file.el:
43 * epa.el:
44 * epg.el: Use lexical binding.
45
462011-04-03 Chong Yidong <cyd@stupidchicken.com>
47
48 * dired-aux.el (dired-create-files): Add docstring (Bug#7970).
49
50 * textmodes/flyspell.el (flyspell-word): Recognize default
51 dictionary case for flyspell-mark-duplications-exceptions. Use
52 regexp matching for languages.
53 (flyspell-mark-duplications-exceptions): Add "that" and "had" for
54 default dictionary (Bug#7926).
55
562011-04-02 Chong Yidong <cyd@stupidchicken.com>
57
58 * emacs-lisp/package.el (package--with-work-buffer): Recognize
59 https URLs.
60
61 * net/network-stream.el: Move from gnus/proto-stream.el. Change
62 prefix to network-stream throughout.
63 (open-protocol-stream): Merge into open-network-stream, leaving
64 open-protocol-stream as an alias. Handle nil BUFFER args.
65
66 * subr.el (open-network-stream): Move to net/network-stream.el.
67
682011-04-02 Glenn Morris <rgm@gnu.org>
69
70 * find-dired.el (find-exec-terminator): New option.
71 (find-ls-option): Test for -ls support.
72 (find-ls-subdir-switches): Test for -b in find-ls-option.
73 (find-dired, find-grep-dired): Doc fixes.
74 (find-dired): Use find-exec-terminator.
75
76 * find-dired.el (find-ls-option, find-ls-subdir-switches)
77 (find-grep-options): Do not autoload these defcustoms, remove purecopy.
78 (find-name-arg): Remove purecopy.
79
80 * progmodes/grep.el (grep-find-use-xargs): Doc fix.
81 (grep-compute-defaults): Check for `-exec COMMAND +' support.
82 Set grep-find-use-xargs, grep-find-command, and grep-find-template
83 accordingly. Don't add the null-device if not needed.
84
85 * files.el (save-some-buffers): Doc fix.
86
872011-04-02 Eli Zaretskii <eliz@gnu.org>
88
89 * makefile.w32-in (EMACS): Default to ../src/$(BLD)/emacs.exe.
90
912011-04-01 Juanma Barranquero <lekktu@gmail.com>
92
93 * progmodes/idlwave.el (idlwave-one-key-select, idlwave-list-abbrevs):
94 Use `dolist' rather than `mapcar'.
95
12011-04-01 Stefan Monnier <monnier@iro.umontreal.ca> 962011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
2 97
3 Add lexical binding. 98 Add lexical binding.
@@ -182,14 +277,14 @@
182 * textmodes/css.el: 277 * textmodes/css.el:
183 * startup.el: 278 * startup.el:
184 * uniquify.el: 279 * uniquify.el:
185 * minibuffer.el: 280 * minibuffer.el:
186 * newcomment.el: 281 * newcomment.el:
187 * reveal.el: 282 * reveal.el:
188 * server.el: 283 * server.el:
189 * mpc.el: 284 * mpc.el:
190 * emacs-lisp/smie.el: 285 * emacs-lisp/smie.el:
191 * doc-view.el: 286 * doc-view.el:
192 * dired.el: 287 * dired.el:
193 * abbrev.el: Use lexical binding. 288 * abbrev.el: Use lexical binding.
194 289
1952011-04-01 Eli Zaretskii <eliz@gnu.org> 2902011-04-01 Eli Zaretskii <eliz@gnu.org>
@@ -203,7 +298,7 @@
2032011-03-31 Tassilo Horn <tassilo@member.fsf.org> 2982011-03-31 Tassilo Horn <tassilo@member.fsf.org>
204 299
205 * net/rcirc.el (rcirc-handler-001): Only authenticate, if there's 300 * net/rcirc.el (rcirc-handler-001): Only authenticate, if there's
206 an entry for that server in rcirc-authinfo. (Bug#8385) 301 an entry for that server in rcirc-authinfo. (Bug#8385)
207 302
2082011-03-31 Glenn Morris <rgm@gnu.org> 3032011-03-31 Glenn Morris <rgm@gnu.org>
209 304
diff --git a/lisp/bs.el b/lisp/bs.el
index 1f90304f1da..72b3e4c6fef 100644
--- a/lisp/bs.el
+++ b/lisp/bs.el
@@ -1,4 +1,4 @@
1;;; bs.el --- menu for selecting and displaying buffers 1;;; bs.el --- menu for selecting and displaying buffers -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 1998-2011 Free Software Foundation, Inc. 3;; Copyright (C) 1998-2011 Free Software Foundation, Inc.
4;; Author: Olaf Sylvester <Olaf.Sylvester@netsurf.de> 4;; Author: Olaf Sylvester <Olaf.Sylvester@netsurf.de>
@@ -693,7 +693,7 @@ Refresh whole Buffer Selection Menu."
693 (call-interactively 'bs-set-configuration) 693 (call-interactively 'bs-set-configuration)
694 (bs--redisplay t)) 694 (bs--redisplay t))
695 695
696(defun bs-refresh (&rest ignored) 696(defun bs-refresh (&rest _ignored)
697 "Refresh whole Buffer Selection Menu. 697 "Refresh whole Buffer Selection Menu.
698Arguments are IGNORED (for `revert-buffer')." 698Arguments are IGNORED (for `revert-buffer')."
699 (interactive) 699 (interactive)
@@ -1017,7 +1017,7 @@ A value of t means BUFFER belongs to no file.
1017A value of nil means BUFFER belongs to a file." 1017A value of nil means BUFFER belongs to a file."
1018 (not (buffer-file-name buffer))) 1018 (not (buffer-file-name buffer)))
1019 1019
1020(defun bs-sort-buffer-interns-are-last (b1 b2) 1020(defun bs-sort-buffer-interns-are-last (_b1 b2)
1021 "Function for sorting internal buffers at the end of all buffers." 1021 "Function for sorting internal buffers at the end of all buffers."
1022 (string-match-p "^\\*" (buffer-name b2))) 1022 (string-match-p "^\\*" (buffer-name b2)))
1023 1023
@@ -1262,7 +1262,7 @@ or a string."
1262 fun) 1262 fun)
1263 (t (apply fun args)))) 1263 (t (apply fun args))))
1264 1264
1265(defun bs--get-marked-string (start-buffer all-buffers) 1265(defun bs--get-marked-string (start-buffer _all-buffers)
1266 "Return a string which describes whether current buffer is marked. 1266 "Return a string which describes whether current buffer is marked.
1267START-BUFFER is the buffer where we started buffer selection. 1267START-BUFFER is the buffer where we started buffer selection.
1268ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu. 1268ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu.
@@ -1287,25 +1287,25 @@ The result string is one of `bs-string-current', `bs-string-current-marked',
1287 (t 1287 (t
1288 bs-string-show-always))) 1288 bs-string-show-always)))
1289 1289
1290(defun bs--get-modified-string (start-buffer all-buffers) 1290(defun bs--get-modified-string (_start-buffer _all-buffers)
1291 "Return a string which describes whether current buffer is modified. 1291 "Return a string which describes whether current buffer is modified.
1292START-BUFFER is the buffer where we started buffer selection. 1292START-BUFFER is the buffer where we started buffer selection.
1293ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu." 1293ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu."
1294 (if (buffer-modified-p) "*" " ")) 1294 (if (buffer-modified-p) "*" " "))
1295 1295
1296(defun bs--get-readonly-string (start-buffer all-buffers) 1296(defun bs--get-readonly-string (_start-buffer _all-buffers)
1297 "Return a string which describes whether current buffer is read only. 1297 "Return a string which describes whether current buffer is read only.
1298START-BUFFER is the buffer where we started buffer selection. 1298START-BUFFER is the buffer where we started buffer selection.
1299ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu." 1299ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu."
1300 (if buffer-read-only "%" " ")) 1300 (if buffer-read-only "%" " "))
1301 1301
1302(defun bs--get-size-string (start-buffer all-buffers) 1302(defun bs--get-size-string (_start-buffer _all-buffers)
1303 "Return a string which describes the size of current buffer. 1303 "Return a string which describes the size of current buffer.
1304START-BUFFER is the buffer where we started buffer selection. 1304START-BUFFER is the buffer where we started buffer selection.
1305ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu." 1305ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu."
1306 (int-to-string (buffer-size))) 1306 (int-to-string (buffer-size)))
1307 1307
1308(defun bs--get-name (start-buffer all-buffers) 1308(defun bs--get-name (_start-buffer _all-buffers)
1309 "Return name of current buffer for Buffer Selection Menu. 1309 "Return name of current buffer for Buffer Selection Menu.
1310The name of current buffer gets additional text properties 1310The name of current buffer gets additional text properties
1311for mouse highlighting. 1311for mouse highlighting.
@@ -1315,13 +1315,13 @@ ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu."
1315 'help-echo "mouse-2: select this buffer, mouse-3: select in other frame" 1315 'help-echo "mouse-2: select this buffer, mouse-3: select in other frame"
1316 'mouse-face 'highlight)) 1316 'mouse-face 'highlight))
1317 1317
1318(defun bs--get-mode-name (start-buffer all-buffers) 1318(defun bs--get-mode-name (start-buffer _all-buffers)
1319 "Return the name of mode of current buffer for Buffer Selection Menu. 1319 "Return the name of mode of current buffer for Buffer Selection Menu.
1320START-BUFFER is the buffer where we started buffer selection. 1320START-BUFFER is the buffer where we started buffer selection.
1321ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu." 1321ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu."
1322 (format-mode-line mode-name nil nil start-buffer)) 1322 (format-mode-line mode-name nil nil start-buffer))
1323 1323
1324(defun bs--get-file-name (start-buffer all-buffers) 1324(defun bs--get-file-name (_start-buffer _all-buffers)
1325 "Return string for column 'File' in Buffer Selection Menu. 1325 "Return string for column 'File' in Buffer Selection Menu.
1326This is the variable `buffer-file-name' of current buffer. 1326This is the variable `buffer-file-name' of current buffer.
1327If not visiting a file, `list-buffers-directory' is returned instead. 1327If not visiting a file, `list-buffers-directory' is returned instead.
@@ -1420,18 +1420,18 @@ for buffer selection."
1420 (bs-show-in-buffer liste) 1420 (bs-show-in-buffer liste)
1421 (bs-message-without-log "%s" (bs--current-config-message))))) 1421 (bs-message-without-log "%s" (bs--current-config-message)))))
1422 1422
1423(defun bs--configuration-name-for-prefix-arg (prefix-arg) 1423(defun bs--configuration-name-for-prefix-arg (prefix)
1424 "Convert prefix argument PREFIX-ARG to a name of a buffer configuration. 1424 "Convert prefix argument PREFIX to a name of a buffer configuration.
1425If PREFIX-ARG is nil return `bs-default-configuration'. 1425If PREFIX is nil return `bs-default-configuration'.
1426If PREFIX-ARG is an integer return PREFIX-ARG element of `bs-configurations'. 1426If PREFIX is an integer return PREFIX element of `bs-configurations'.
1427Otherwise return `bs-alternative-configuration'." 1427Otherwise return `bs-alternative-configuration'."
1428 (cond ;; usually activation 1428 (cond ;; usually activation
1429 ((null prefix-arg) 1429 ((null prefix)
1430 bs-default-configuration) 1430 bs-default-configuration)
1431 ;; call with integer as prefix argument 1431 ;; call with integer as prefix argument
1432 ((integerp prefix-arg) 1432 ((integerp prefix)
1433 (if (and (< 0 prefix-arg) (<= prefix-arg (length bs-configurations))) 1433 (if (and (< 0 prefix) (<= prefix (length bs-configurations)))
1434 (car (nth (1- prefix-arg) bs-configurations)) 1434 (car (nth (1- prefix) bs-configurations))
1435 bs-default-configuration)) 1435 bs-default-configuration))
1436 ;; call by prefix argument C-u 1436 ;; call by prefix argument C-u
1437 (t bs-alternative-configuration))) 1437 (t bs-alternative-configuration)))
diff --git a/lisp/custom.el b/lisp/custom.el
index 5b5592698d8..964d8d9ea4a 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -1151,6 +1151,20 @@ Return t if THEME was successfully loaded, nil otherwise."
1151 (custom-theme-load-confirm hash)) 1151 (custom-theme-load-confirm hash))
1152 (let ((custom--inhibit-theme-enable t)) 1152 (let ((custom--inhibit-theme-enable t))
1153 (eval-buffer)) 1153 (eval-buffer))
1154 ;; Optimization: if the theme changes the `default' face, put that
1155 ;; entry first. This avoids some `frame-set-background-mode' rigmarole
1156 ;; by assigning the new background immediately.
1157 (let* ((settings (get theme 'theme-settings))
1158 (tail settings)
1159 found)
1160 (while (and tail (not found))
1161 (and (eq (nth 0 (car tail)) 'theme-face)
1162 (eq (nth 1 (car tail)) 'default)
1163 (setq found (car tail)))
1164 (setq tail (cdr tail)))
1165 (if found
1166 (put theme 'theme-settings (cons found (delq found settings)))))
1167 ;; Finally, enable the theme.
1154 (unless no-enable 1168 (unless no-enable
1155 (enable-theme theme)) 1169 (enable-theme theme))
1156 t)))) 1170 t))))
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 9ab1fcb0e2b..6ff7ff7d77d 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1363,33 +1363,28 @@ Special value `always' suppresses confirmation."
1363;; The basic function for half a dozen variations on cp/mv/ln/ln -s. 1363;; The basic function for half a dozen variations on cp/mv/ln/ln -s.
1364(defun dired-create-files (file-creator operation fn-list name-constructor 1364(defun dired-create-files (file-creator operation fn-list name-constructor
1365 &optional marker-char) 1365 &optional marker-char)
1366 "Create one or more new files from a list of existing files FN-LIST.
1367This function also handles querying the user, updating Dired
1368buffers, and displaying a success or failure message.
1366 1369
1367;; Create a new file for each from a list of existing files. The user 1370FILE-CREATOR should be a function. It is called once for each
1368;; is queried, dired buffers are updated, and at the end a success or 1371file in FN-LIST, and must create a new file, querying the user
1369;; failure message is displayed 1372and updating Dired buffers as necessary. It should accept three
1373arguments: the old file name, the new name, and an argument
1374OK-IF-ALREADY-EXISTS with the same meaning as in `copy-file'.
1370 1375
1371;; FILE-CREATOR must accept three args: oldfile newfile ok-if-already-exists 1376OPERATION should be a capitalized string describing the operation
1377performed (e.g. `Copy'). It is used for error logging.
1372 1378
1373;; It is called for each file and must create newfile, the entry of 1379FN-LIST is the list of files to copy (full absolute file names).
1374;; which will be added. The user will be queried if the file already
1375;; exists. If oldfile is removed by FILE-CREATOR (i.e, it is a
1376;; rename), it is FILE-CREATOR's responsibility to update dired
1377;; buffers. FILE-CREATOR must abort by signaling a file-error if it
1378;; could not create newfile. The error is caught and logged.
1379 1380
1380;; OPERATION (a capitalized string, e.g. `Copy') describes the 1381NAME-CONSTRUCTOR should be a function accepting a single
1381;; operation performed. It is used for error logging. 1382argument, the name of an old file, and returning either the
1382 1383corresponding new file name or nil to skip.
1383;; FN-LIST is the list of files to copy (full absolute file names).
1384
1385;; NAME-CONSTRUCTOR returns a newfile for every oldfile, or nil to
1386;; skip. If it skips files for other reasons than a direct user
1387;; query, it is supposed to tell why (using dired-log).
1388
1389;; Optional MARKER-CHAR is a character with which to mark every
1390;; newfile's entry, or t to use the current marker character if the
1391;; oldfile was marked.
1392 1384
1385Optional MARKER-CHAR is a character with which to mark every
1386newfile's entry, or t to use the current marker character if the
1387old file was marked."
1393 (let (dired-create-files-failures failures 1388 (let (dired-create-files-failures failures
1394 skipped (success-count 0) (total (length fn-list))) 1389 skipped (success-count 0) (total (length fn-list)))
1395 (let (to overwrite-query 1390 (let (to overwrite-query
diff --git a/lisp/dired.el b/lisp/dired.el
index d72e0aad55f..73a716d0bff 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -3629,7 +3629,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
3629;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command 3629;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
3630;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown 3630;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown
3631;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff 3631;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
3632;;;;;; dired-diff) "dired-aux" "dired-aux.el" "2d805d6766bd7970cd446413b4ed4ce0") 3632;;;;;; dired-diff) "dired-aux" "dired-aux.el" "0488aa71a7abdb8dcc9ce90201114ebc")
3633;;; Generated autoloads from dired-aux.el 3633;;; Generated autoloads from dired-aux.el
3634 3634
3635(autoload 'dired-diff "dired-aux" "\ 3635(autoload 'dired-diff "dired-aux" "\
@@ -3766,7 +3766,7 @@ can be produced by `dired-get-marked-files', for example.
3766\(fn COMMAND &optional ARG FILE-LIST)" t nil) 3766\(fn COMMAND &optional ARG FILE-LIST)" t nil)
3767 3767
3768(autoload 'dired-run-shell-command "dired-aux" "\ 3768(autoload 'dired-run-shell-command "dired-aux" "\
3769Not documented 3769
3770 3770
3771\(fn COMMAND)" nil nil) 3771\(fn COMMAND)" nil nil)
3772 3772
@@ -3785,7 +3785,7 @@ command with a prefix argument (the value does not matter).
3785\(fn &optional ARG FMT)" t nil) 3785\(fn &optional ARG FMT)" t nil)
3786 3786
3787(autoload 'dired-compress-file "dired-aux" "\ 3787(autoload 'dired-compress-file "dired-aux" "\
3788Not documented 3788
3789 3789
3790\(fn FILE)" nil nil) 3790\(fn FILE)" nil nil)
3791 3791
@@ -3834,12 +3834,12 @@ See Info node `(emacs)Subdir switches' for more details.
3834\(fn &optional ARG TEST-FOR-SUBDIR)" t nil) 3834\(fn &optional ARG TEST-FOR-SUBDIR)" t nil)
3835 3835
3836(autoload 'dired-add-file "dired-aux" "\ 3836(autoload 'dired-add-file "dired-aux" "\
3837Not documented 3837
3838 3838
3839\(fn FILENAME &optional MARKER-CHAR)" nil nil) 3839\(fn FILENAME &optional MARKER-CHAR)" nil nil)
3840 3840
3841(autoload 'dired-remove-file "dired-aux" "\ 3841(autoload 'dired-remove-file "dired-aux" "\
3842Not documented 3842
3843 3843
3844\(fn FILE)" nil nil) 3844\(fn FILE)" nil nil)
3845 3845
@@ -3849,12 +3849,12 @@ Create or update the line for FILE in all Dired buffers it would belong in.
3849\(fn FILE)" nil nil) 3849\(fn FILE)" nil nil)
3850 3850
3851(autoload 'dired-copy-file "dired-aux" "\ 3851(autoload 'dired-copy-file "dired-aux" "\
3852Not documented 3852
3853 3853
3854\(fn FROM TO OK-FLAG)" nil nil) 3854\(fn FROM TO OK-FLAG)" nil nil)
3855 3855
3856(autoload 'dired-rename-file "dired-aux" "\ 3856(autoload 'dired-rename-file "dired-aux" "\
3857Not documented 3857
3858 3858
3859\(fn FILE NEWNAME OK-IF-ALREADY-EXISTS)" nil nil) 3859\(fn FILE NEWNAME OK-IF-ALREADY-EXISTS)" nil nil)
3860 3860
diff --git a/lisp/ehelp.el b/lisp/ehelp.el
index 7745957b4c3..b2bcf1f85cb 100644
--- a/lisp/ehelp.el
+++ b/lisp/ehelp.el
@@ -1,4 +1,4 @@
1;;; ehelp.el --- bindings for electric-help mode 1;;; ehelp.el --- bindings for electric-help mode -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 1986, 1995, 2000-2011 Free Software Foundation, Inc. 3;; Copyright (C) 1986, 1995, 2000-2011 Free Software Foundation, Inc.
4 4
@@ -347,14 +347,14 @@ will select it.)"
347 347
348;; This is to be bound to M-x in ehelp mode. Retains ehelp buffer and then 348;; This is to be bound to M-x in ehelp mode. Retains ehelp buffer and then
349;; continues with execute-extended-command. 349;; continues with execute-extended-command.
350(defun electric-help-execute-extended (prefixarg) 350(defun electric-help-execute-extended (_prefixarg)
351 (interactive "p") 351 (interactive "p")
352 (setq electric-help-form-to-execute '(execute-extended-command nil)) 352 (setq electric-help-form-to-execute '(execute-extended-command nil))
353 (electric-help-retain)) 353 (electric-help-retain))
354 354
355;; This is to be buond to C-x in ehelp mode. Retains ehelp buffer and then 355;; This is to be buond to C-x in ehelp mode. Retains ehelp buffer and then
356;; continues with ctrl-x prefix. 356;; continues with ctrl-x prefix.
357(defun electric-help-ctrl-x-prefix (prefixarg) 357(defun electric-help-ctrl-x-prefix (_prefixarg)
358 (interactive "p") 358 (interactive "p")
359 (setq electric-help-form-to-execute '(progn (message nil) (setq unread-command-char ?\C-x))) 359 (setq electric-help-form-to-execute '(progn (message nil) (setq unread-command-char ?\C-x)))
360 (electric-help-retain)) 360 (electric-help-retain))
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 5dc2938fe08..6aecc3615f3 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -652,7 +652,7 @@ FILE is the name of a file relative to that base location.
652This macro retrieves FILE from LOCATION into a temporary buffer, 652This macro retrieves FILE from LOCATION into a temporary buffer,
653and evaluates BODY while that buffer is current. This work 653and evaluates BODY while that buffer is current. This work
654buffer is killed afterwards. Return the last value in BODY." 654buffer is killed afterwards. Return the last value in BODY."
655 `(let* ((http (string-match "\\`http:" ,location)) 655 `(let* ((http (string-match "\\`https?:" ,location))
656 (buffer 656 (buffer
657 (if http 657 (if http
658 (url-retrieve-synchronously (concat ,location ,file)) 658 (url-retrieve-synchronously (concat ,location ,file))
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 59a30d62b02..50a65eb6bbb 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -1,4 +1,4 @@
1;;; re-builder.el --- building Regexps with visual feedback 1;;; re-builder.el --- building Regexps with visual feedback -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 1999-2011 Free Software Foundation, Inc. 3;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
4 4
@@ -506,7 +506,7 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions."
506 (reb-update-regexp) 506 (reb-update-regexp)
507 (reb-update-overlays subexp)) 507 (reb-update-overlays subexp))
508 508
509(defun reb-auto-update (beg end lenold &optional force) 509(defun reb-auto-update (_beg _end _lenold &optional force)
510 "Called from `after-update-functions' to update the display. 510 "Called from `after-update-functions' to update the display.
511BEG, END and LENOLD are passed in from the hook. 511BEG, END and LENOLD are passed in from the hook.
512An actual update is only done if the regexp has changed or if the 512An actual update is only done if the regexp has changed or if the
diff --git a/lisp/epa-dired.el b/lisp/epa-dired.el
index db1ddd7ce56..0834a8df23a 100644
--- a/lisp/epa-dired.el
+++ b/lisp/epa-dired.el
@@ -1,4 +1,4 @@
1;;; epa-dired.el --- the EasyPG Assistant, dired extension 1;;; epa-dired.el --- the EasyPG Assistant, dired extension -*- lexical-binding: t -*-
2;; Copyright (C) 2006-2011 Free Software Foundation, Inc. 2;; Copyright (C) 2006-2011 Free Software Foundation, Inc.
3 3
4;; Author: Daiki Ueno <ueno@unixuser.org> 4;; Author: Daiki Ueno <ueno@unixuser.org>
diff --git a/lisp/epa-file.el b/lisp/epa-file.el
index b0f9d2dffb2..aa9915d8cfa 100644
--- a/lisp/epa-file.el
+++ b/lisp/epa-file.el
@@ -1,4 +1,4 @@
1;;; epa-file.el --- the EasyPG Assistant, transparent file encryption 1;;; epa-file.el --- the EasyPG Assistant, transparent file encryption -*- lexical-binding: t -*-
2;; Copyright (C) 2006-2011 Free Software Foundation, Inc. 2;; Copyright (C) 2006-2011 Free Software Foundation, Inc.
3 3
4;; Author: Daiki Ueno <ueno@unixuser.org> 4;; Author: Daiki Ueno <ueno@unixuser.org>
diff --git a/lisp/epa-hook.el b/lisp/epa-hook.el
index 1dbc95bb7d5..652ab19ba65 100644
--- a/lisp/epa-hook.el
+++ b/lisp/epa-hook.el
@@ -1,4 +1,4 @@
1;;; epa-hook.el --- preloaded code to enable epa-file.el 1;;; epa-hook.el --- preloaded code to enable epa-file.el -*- lexical-binding: t -*-
2;; Copyright (C) 2006-2011 Free Software Foundation, Inc. 2;; Copyright (C) 2006-2011 Free Software Foundation, Inc.
3 3
4;; Author: Daiki Ueno <ueno@unixuser.org> 4;; Author: Daiki Ueno <ueno@unixuser.org>
diff --git a/lisp/epa-mail.el b/lisp/epa-mail.el
index 6e358541118..a3f11f78675 100644
--- a/lisp/epa-mail.el
+++ b/lisp/epa-mail.el
@@ -1,4 +1,4 @@
1;;; epa-mail.el --- the EasyPG Assistant, minor-mode for mail composer 1;;; epa-mail.el --- the EasyPG Assistant, minor-mode for mail composer -*- lexical-binding: t -*-
2;; Copyright (C) 2006-2011 Free Software Foundation, Inc. 2;; Copyright (C) 2006-2011 Free Software Foundation, Inc.
3 3
4;; Author: Daiki Ueno <ueno@unixuser.org> 4;; Author: Daiki Ueno <ueno@unixuser.org>
@@ -117,7 +117,7 @@ Don't use this command in Lisp programs!"
117 (save-excursion 117 (save-excursion
118 (let ((verbose current-prefix-arg) 118 (let ((verbose current-prefix-arg)
119 (context (epg-make-context epa-protocol)) 119 (context (epg-make-context epa-protocol))
120 recipients-string recipients recipient-key) 120 recipients-string recipients recipient-key sign)
121 (goto-char (point-min)) 121 (goto-char (point-min))
122 (save-restriction 122 (save-restriction
123 (narrow-to-region (point) 123 (narrow-to-region (point)
diff --git a/lisp/epa.el b/lisp/epa.el
index 43e202c1b16..d4f4fab2eed 100644
--- a/lisp/epa.el
+++ b/lisp/epa.el
@@ -1,4 +1,4 @@
1;;; epa.el --- the EasyPG Assistant 1;;; epa.el --- the EasyPG Assistant -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 2006-2011 Free Software Foundation, Inc. 3;; Copyright (C) 2006-2011 Free Software Foundation, Inc.
4 4
@@ -269,7 +269,7 @@ You should bind this variable with `let', but do not set it globally.")
269 :action 'epa--key-widget-action 269 :action 'epa--key-widget-action
270 :help-echo 'epa--key-widget-help-echo) 270 :help-echo 'epa--key-widget-help-echo)
271 271
272(defun epa--key-widget-action (widget &optional event) 272(defun epa--key-widget-action (widget &optional _event)
273 (save-selected-window 273 (save-selected-window
274 (epa--show-key (widget-get widget :value)))) 274 (epa--show-key (widget-get widget :value))))
275 275
@@ -460,7 +460,7 @@ If ARG is non-nil, mark the key."
460 (list nil))) 460 (list nil)))
461 (epa--list-keys name t)) 461 (epa--list-keys name t))
462 462
463(defun epa--key-list-revert-buffer (&optional ignore-auto noconfirm) 463(defun epa--key-list-revert-buffer (&optional _ignore-auto _noconfirm)
464 (apply #'epa--list-keys epa-list-keys-arguments)) 464 (apply #'epa--list-keys epa-list-keys-arguments))
465 465
466(defun epa--marked-keys () 466(defun epa--marked-keys ()
@@ -490,13 +490,13 @@ If ARG is non-nil, mark the key."
490- `\\[epa-mark-key]' to mark a key on the line 490- `\\[epa-mark-key]' to mark a key on the line
491- `\\[epa-unmark-key]' to unmark a key on the line\n")) 491- `\\[epa-unmark-key]' to unmark a key on the line\n"))
492 (widget-create 'link 492 (widget-create 'link
493 :notify (lambda (&rest ignore) (abort-recursive-edit)) 493 :notify (lambda (&rest _ignore) (abort-recursive-edit))
494 :help-echo 494 :help-echo
495 (substitute-command-keys 495 (substitute-command-keys
496 "Click here or \\[abort-recursive-edit] to cancel") 496 "Click here or \\[abort-recursive-edit] to cancel")
497 "Cancel") 497 "Cancel")
498 (widget-create 'link 498 (widget-create 'link
499 :notify (lambda (&rest ignore) (exit-recursive-edit)) 499 :notify (lambda (&rest _ignore) (exit-recursive-edit))
500 :help-echo 500 :help-echo
501 (substitute-command-keys 501 (substitute-command-keys
502 "Click here or \\[exit-recursive-edit] to finish") 502 "Click here or \\[exit-recursive-edit] to finish")
@@ -649,7 +649,7 @@ If SECRET is non-nil, list secret keys instead of public keys."
649 (format "Passphrase for %s %s: " key-id (cdr entry)) 649 (format "Passphrase for %s %s: " key-id (cdr entry))
650 (format "Passphrase for %s: " key-id))))))) 650 (format "Passphrase for %s: " key-id)))))))
651 651
652(defun epa-progress-callback-function (context what char current total 652(defun epa-progress-callback-function (_context what _char current total
653 handback) 653 handback)
654 (message "%s%d%% (%d/%d)" (or handback 654 (message "%s%d%% (%d/%d)" (or handback
655 (concat what ": ")) 655 (concat what ": "))
@@ -964,7 +964,7 @@ See the reason described in the `epa-verify-region' documentation."
964(eval-and-compile 964(eval-and-compile
965 (if (fboundp 'select-safe-coding-system) 965 (if (fboundp 'select-safe-coding-system)
966 (defalias 'epa--select-safe-coding-system 'select-safe-coding-system) 966 (defalias 'epa--select-safe-coding-system 'select-safe-coding-system)
967 (defun epa--select-safe-coding-system (from to) 967 (defun epa--select-safe-coding-system (_from _to)
968 buffer-file-coding-system))) 968 buffer-file-coding-system)))
969 969
970;;;###autoload 970;;;###autoload
diff --git a/lisp/epg.el b/lisp/epg.el
index c096ec6df98..348ad970b14 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -1,4 +1,4 @@
1;;; epg.el --- the EasyPG Library 1;;; epg.el --- the EasyPG Library -*- lexical-binding: t -*-
2;; Copyright (C) 1999-2000, 2002-2011 Free Software Foundation, Inc. 2;; Copyright (C) 1999-2000, 2002-2011 Free Software Foundation, Inc.
3 3
4;; Author: Daiki Ueno <ueno@unixuser.org> 4;; Author: Daiki Ueno <ueno@unixuser.org>
@@ -1223,7 +1223,7 @@ This function is for internal use only."
1223 (defalias 'epg--decode-coding-string 'decode-coding-string) 1223 (defalias 'epg--decode-coding-string 'decode-coding-string)
1224 (defalias 'epg--decode-coding-string 'identity))) 1224 (defalias 'epg--decode-coding-string 'identity)))
1225 1225
1226(defun epg--status-USERID_HINT (context string) 1226(defun epg--status-USERID_HINT (_context string)
1227 (if (string-match "\\`\\([^ ]+\\) \\(.*\\)" string) 1227 (if (string-match "\\`\\([^ ]+\\) \\(.*\\)" string)
1228 (let* ((key-id (match-string 1 string)) 1228 (let* ((key-id (match-string 1 string))
1229 (user-id (match-string 2 string)) 1229 (user-id (match-string 2 string))
@@ -1238,14 +1238,14 @@ This function is for internal use only."
1238 (setq epg-user-id-alist (cons (cons key-id user-id) 1238 (setq epg-user-id-alist (cons (cons key-id user-id)
1239 epg-user-id-alist)))))) 1239 epg-user-id-alist))))))
1240 1240
1241(defun epg--status-NEED_PASSPHRASE (context string) 1241(defun epg--status-NEED_PASSPHRASE (_context string)
1242 (if (string-match "\\`\\([^ ]+\\)" string) 1242 (if (string-match "\\`\\([^ ]+\\)" string)
1243 (setq epg-key-id (match-string 1 string)))) 1243 (setq epg-key-id (match-string 1 string))))
1244 1244
1245(defun epg--status-NEED_PASSPHRASE_SYM (context string) 1245(defun epg--status-NEED_PASSPHRASE_SYM (_context _string)
1246 (setq epg-key-id 'SYM)) 1246 (setq epg-key-id 'SYM))
1247 1247
1248(defun epg--status-NEED_PASSPHRASE_PIN (context string) 1248(defun epg--status-NEED_PASSPHRASE_PIN (_context _string)
1249 (setq epg-key-id 'PIN)) 1249 (setq epg-key-id 'PIN))
1250 1250
1251(eval-and-compile 1251(eval-and-compile
@@ -1308,11 +1308,11 @@ This function is for internal use only."
1308 (if encoded-passphrase-with-new-line 1308 (if encoded-passphrase-with-new-line
1309 (epg--clear-string encoded-passphrase-with-new-line)))))) 1309 (epg--clear-string encoded-passphrase-with-new-line))))))
1310 1310
1311(defun epg--prompt-GET_BOOL (context string) 1311(defun epg--prompt-GET_BOOL (_context string)
1312 (let ((entry (assoc string epg-prompt-alist))) 1312 (let ((entry (assoc string epg-prompt-alist)))
1313 (y-or-n-p (if entry (cdr entry) (concat string "? "))))) 1313 (y-or-n-p (if entry (cdr entry) (concat string "? ")))))
1314 1314
1315(defun epg--prompt-GET_BOOL-untrusted_key.override (context string) 1315(defun epg--prompt-GET_BOOL-untrusted_key.override (_context _string)
1316 (y-or-n-p (if (and (equal (car epg-last-status) "USERID_HINT") 1316 (y-or-n-p (if (and (equal (car epg-last-status) "USERID_HINT")
1317 (string-match "\\`\\([^ ]+\\) \\(.*\\)" 1317 (string-match "\\`\\([^ ]+\\) \\(.*\\)"
1318 (cdr epg-last-status))) 1318 (cdr epg-last-status)))
@@ -1467,31 +1467,31 @@ This function is for internal use only."
1467 signature 1467 signature
1468 (string-to-number (match-string 7 string) 16))))) 1468 (string-to-number (match-string 7 string) 16)))))
1469 1469
1470(defun epg--status-TRUST_UNDEFINED (context string) 1470(defun epg--status-TRUST_UNDEFINED (context _string)
1471 (let ((signature (car (epg-context-result-for context 'verify)))) 1471 (let ((signature (car (epg-context-result-for context 'verify))))
1472 (if (and signature 1472 (if (and signature
1473 (eq (epg-signature-status signature) 'good)) 1473 (eq (epg-signature-status signature) 'good))
1474 (epg-signature-set-validity signature 'undefined)))) 1474 (epg-signature-set-validity signature 'undefined))))
1475 1475
1476(defun epg--status-TRUST_NEVER (context string) 1476(defun epg--status-TRUST_NEVER (context _string)
1477 (let ((signature (car (epg-context-result-for context 'verify)))) 1477 (let ((signature (car (epg-context-result-for context 'verify))))
1478 (if (and signature 1478 (if (and signature
1479 (eq (epg-signature-status signature) 'good)) 1479 (eq (epg-signature-status signature) 'good))
1480 (epg-signature-set-validity signature 'never)))) 1480 (epg-signature-set-validity signature 'never))))
1481 1481
1482(defun epg--status-TRUST_MARGINAL (context string) 1482(defun epg--status-TRUST_MARGINAL (context _string)
1483 (let ((signature (car (epg-context-result-for context 'verify)))) 1483 (let ((signature (car (epg-context-result-for context 'verify))))
1484 (if (and signature 1484 (if (and signature
1485 (eq (epg-signature-status signature) 'marginal)) 1485 (eq (epg-signature-status signature) 'marginal))
1486 (epg-signature-set-validity signature 'marginal)))) 1486 (epg-signature-set-validity signature 'marginal))))
1487 1487
1488(defun epg--status-TRUST_FULLY (context string) 1488(defun epg--status-TRUST_FULLY (context _string)
1489 (let ((signature (car (epg-context-result-for context 'verify)))) 1489 (let ((signature (car (epg-context-result-for context 'verify))))
1490 (if (and signature 1490 (if (and signature
1491 (eq (epg-signature-status signature) 'good)) 1491 (eq (epg-signature-status signature) 'good))
1492 (epg-signature-set-validity signature 'full)))) 1492 (epg-signature-set-validity signature 'full))))
1493 1493
1494(defun epg--status-TRUST_ULTIMATE (context string) 1494(defun epg--status-TRUST_ULTIMATE (context _string)
1495 (let ((signature (car (epg-context-result-for context 'verify)))) 1495 (let ((signature (car (epg-context-result-for context 'verify))))
1496 (if (and signature 1496 (if (and signature
1497 (eq (epg-signature-status signature) 'good)) 1497 (eq (epg-signature-status signature) 'good))
@@ -1541,10 +1541,10 @@ This function is for internal use only."
1541 (string-to-number (match-string 3 string))) 1541 (string-to-number (match-string 3 string)))
1542 (epg-context-result-for context 'encrypted-to))))) 1542 (epg-context-result-for context 'encrypted-to)))))
1543 1543
1544(defun epg--status-DECRYPTION_FAILED (context string) 1544(defun epg--status-DECRYPTION_FAILED (context _string)
1545 (epg-context-set-result-for context 'decryption-failed t)) 1545 (epg-context-set-result-for context 'decryption-failed t))
1546 1546
1547(defun epg--status-DECRYPTION_OKAY (context string) 1547(defun epg--status-DECRYPTION_OKAY (context _string)
1548 (epg-context-set-result-for context 'decryption-okay t)) 1548 (epg-context-set-result-for context 'decryption-okay t))
1549 1549
1550(defun epg--status-NODATA (context string) 1550(defun epg--status-NODATA (context string)
@@ -1566,13 +1566,13 @@ This function is for internal use only."
1566 (epg--time-from-seconds string))) 1566 (epg--time-from-seconds string)))
1567 (epg-context-result-for context 'error)))) 1567 (epg-context-result-for context 'error))))
1568 1568
1569(defun epg--status-KEYREVOKED (context string) 1569(defun epg--status-KEYREVOKED (context _string)
1570 (epg-context-set-result-for 1570 (epg-context-set-result-for
1571 context 'key 1571 context 'key
1572 (cons '(key-revoked) 1572 (cons '(key-revoked)
1573 (epg-context-result-for context 'error)))) 1573 (epg-context-result-for context 'error))))
1574 1574
1575(defun epg--status-BADARMOR (context string) 1575(defun epg--status-BADARMOR (context _string)
1576 (epg-context-set-result-for 1576 (epg-context-set-result-for
1577 context 'error 1577 context 'error
1578 (cons '(bad-armor) 1578 (cons '(bad-armor)
@@ -1589,7 +1589,7 @@ This function is for internal use only."
1589 (match-string 2 string))) 1589 (match-string 2 string)))
1590 (epg-context-result-for context 'error))))) 1590 (epg-context-result-for context 'error)))))
1591 1591
1592(defun epg--status-NO_RECP (context string) 1592(defun epg--status-NO_RECP (context _string)
1593 (epg-context-set-result-for 1593 (epg-context-set-result-for
1594 context 'error 1594 context 'error
1595 (cons '(no-recipients) 1595 (cons '(no-recipients)
@@ -1626,13 +1626,13 @@ This function is for internal use only."
1626 (cons 'fingerprint (match-string 2 string))) 1626 (cons 'fingerprint (match-string 2 string)))
1627 (epg-context-result-for context 'generate-key))))) 1627 (epg-context-result-for context 'generate-key)))))
1628 1628
1629(defun epg--status-KEY_NOT_CREATED (context string) 1629(defun epg--status-KEY_NOT_CREATED (context _string)
1630 (epg-context-set-result-for 1630 (epg-context-set-result-for
1631 context 'error 1631 context 'error
1632 (cons '(key-not-created) 1632 (cons '(key-not-created)
1633 (epg-context-result-for context 'error)))) 1633 (epg-context-result-for context 'error))))
1634 1634
1635(defun epg--status-IMPORTED (context string) 1635(defun epg--status-IMPORTED (_context string)
1636 (if (string-match "\\`\\([^ ]+\\) \\(.*\\)" string) 1636 (if (string-match "\\`\\([^ ]+\\) \\(.*\\)" string)
1637 (let* ((key-id (match-string 1 string)) 1637 (let* ((key-id (match-string 1 string))
1638 (user-id (match-string 2 string)) 1638 (user-id (match-string 2 string))
@@ -1694,7 +1694,7 @@ This function is for internal use only."
1694 (epg-context-result-for context 'import-status))) 1694 (epg-context-result-for context 'import-status)))
1695 (epg-context-set-result-for context 'import-status nil))) 1695 (epg-context-set-result-for context 'import-status nil)))
1696 1696
1697(defun epg-passphrase-callback-function (context key-id handback) 1697(defun epg-passphrase-callback-function (context key-id _handback)
1698 (if (eq key-id 'SYM) 1698 (if (eq key-id 'SYM)
1699 (read-passwd "Passphrase for symmetric encryption: " 1699 (read-passwd "Passphrase for symmetric encryption: "
1700 (eq (epg-context-operation context) 'encrypt)) 1700 (eq (epg-context-operation context) 'encrypt))
diff --git a/lisp/files.el b/lisp/files.el
index 38047f2fa43..e87c25f3575 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4607,6 +4607,9 @@ You can answer `y' to save, `n' not to save, `C-r' to look at the
4607buffer in question with `view-buffer' before deciding or `d' to 4607buffer in question with `view-buffer' before deciding or `d' to
4608view the differences using `diff-buffer-with-file'. 4608view the differences using `diff-buffer-with-file'.
4609 4609
4610This command first saves any buffers where `buffer-save-without-query' is
4611non-nil, without asking.
4612
4610Optional argument (the prefix) non-nil means save all with no questions. 4613Optional argument (the prefix) non-nil means save all with no questions.
4611Optional second argument PRED determines which buffers are considered: 4614Optional second argument PRED determines which buffers are considered:
4612If PRED is nil, all the file-visiting buffers are considered. 4615If PRED is nil, all the file-visiting buffers are considered.
diff --git a/lisp/find-dired.el b/lisp/find-dired.el
index 144d6633be4..a2b196dc029 100644
--- a/lisp/find-dired.el
+++ b/lisp/find-dired.el
@@ -33,36 +33,62 @@
33 :group 'dired 33 :group 'dired
34 :prefix "find-") 34 :prefix "find-")
35 35
36;; FIXME this option does not really belong in this file, it's more general.
37;; Eg cf some tests in grep.el.
38(defcustom find-exec-terminator
39 (if (eq 0
40 (ignore-errors
41 (process-file find-program nil nil nil
42 null-device "-exec" "echo" "{}" "+")))
43 "+"
44 (shell-quote-argument ";"))
45 "String that terminates \"find -exec COMMAND {} \".
46The value should include any needed quoting for the shell.
47Common values are \"+\" and \"\\\\;\", with the former more efficient
48than the latter."
49 :version "24.1"
50 :group 'find-dired
51 :type 'string)
52
36;; find's -ls corresponds to these switches. 53;; find's -ls corresponds to these switches.
37;; Note -b, at least GNU find quotes spaces etc. in filenames 54;; Note -b, at least GNU find quotes spaces etc. in filenames
38;;;###autoload
39(defcustom find-ls-option 55(defcustom find-ls-option
40 (if (eq system-type 'berkeley-unix) (purecopy '("-ls" . "-gilsb")) 56 (if (eq 0
41 (purecopy '("-exec ls -ld {} \\;" . "-ld"))) 57 (ignore-errors
58 (process-file find-program nil nil nil null-device "-ls")))
59 (cons "-ls"
60 (if (eq system-type 'berkeley-unix)
61 "-gilsb"
62 "-dilsb"))
63 (cons
64 (format "-exec ls -ld {} %s" find-exec-terminator)
65 "-ld"))
42 "Description of the option to `find' to produce an `ls -l'-type listing. 66 "Description of the option to `find' to produce an `ls -l'-type listing.
43This is a cons of two strings (FIND-OPTION . LS-SWITCHES). FIND-OPTION 67This is a cons of two strings (FIND-OPTION . LS-SWITCHES). FIND-OPTION
44gives the option (or options) to `find' that produce the desired output. 68gives the option (or options) to `find' that produce the desired output.
45LS-SWITCHES is a list of `ls' switches to tell dired how to parse the output." 69LS-SWITCHES is a list of `ls' switches to tell dired how to parse the output."
70 :version "24.1" ; add tests for -ls and -exec + support
46 :type '(cons (string :tag "Find Option") 71 :type '(cons (string :tag "Find Option")
47 (string :tag "Ls Switches")) 72 (string :tag "Ls Switches"))
48 :group 'find-dired) 73 :group 'find-dired)
49 74
50;;;###autoload 75(defcustom find-ls-subdir-switches
51(defcustom find-ls-subdir-switches (purecopy "-al") 76 (if (string-match "-[a-z]*b" (cdr find-ls-option))
77 "-alb"
78 "-al")
52 "`ls' switches for inserting subdirectories in `*Find*' buffers. 79 "`ls' switches for inserting subdirectories in `*Find*' buffers.
53This should contain the \"-l\" switch. 80This should contain the \"-l\" switch.
54Use the \"-F\" or \"-b\" switches if and only if you also use 81Use the \"-F\" or \"-b\" switches if and only if you also use
55them for `find-ls-option'." 82them for `find-ls-option'."
83 :version "24.1" ; add -b test
56 :type 'string 84 :type 'string
57 :group 'find-dired 85 :group 'find-dired)
58 :version "22.1")
59 86
60;;;###autoload
61(defcustom find-grep-options 87(defcustom find-grep-options
62 (purecopy (if (or (eq system-type 'berkeley-unix) 88 (if (or (eq system-type 'berkeley-unix)
63 (string-match "solaris2" system-configuration) 89 (string-match "solaris2" system-configuration)
64 (string-match "irix" system-configuration)) 90 (string-match "irix" system-configuration))
65 "-s" "-q")) 91 "-s" "-q")
66 "Option to grep to be as silent as possible. 92 "Option to grep to be as silent as possible.
67On Berkeley systems, this is `-s'; on Posix, and with GNU grep, `-q' does it. 93On Berkeley systems, this is `-s'; on Posix, and with GNU grep, `-q' does it.
68On other systems, the closest you can come is to use `-l'." 94On other systems, the closest you can come is to use `-l'."
@@ -71,9 +97,9 @@ On other systems, the closest you can come is to use `-l'."
71 97
72;; This used to be autoloaded (see bug#4387). 98;; This used to be autoloaded (see bug#4387).
73(defcustom find-name-arg 99(defcustom find-name-arg
74 (purecopy (if read-file-name-completion-ignore-case 100 (if read-file-name-completion-ignore-case
75 "-iname" 101 "-iname"
76 "-name")) 102 "-name")
77 "Argument used to specify file name pattern. 103 "Argument used to specify file name pattern.
78If `read-file-name-completion-ignore-case' is non-nil, -iname is used so that 104If `read-file-name-completion-ignore-case' is non-nil, -iname is used so that
79find also ignores case. Otherwise, -name is used." 105find also ignores case. Otherwise, -name is used."
@@ -92,12 +118,12 @@ find also ignores case. Otherwise, -name is used."
92;;;###autoload 118;;;###autoload
93(defun find-dired (dir args) 119(defun find-dired (dir args)
94 "Run `find' and go into Dired mode on a buffer of the output. 120 "Run `find' and go into Dired mode on a buffer of the output.
95The command run (after changing into DIR) is 121The command run (after changing into DIR) is essentially
96 122
97 find . \\( ARGS \\) -ls 123 find . \\( ARGS \\) -ls
98 124
99except that the variable `find-ls-option' specifies what to use 125except that the car of the variable `find-ls-option' specifies what to
100as the final argument." 126use in place of \"-ls\" as the final argument."
101 (interactive (list (read-directory-name "Run find in directory: " nil "" t) 127 (interactive (list (read-directory-name "Run find in directory: " nil "" t)
102 (read-string "Run find (with args): " find-args 128 (read-string "Run find (with args): " find-args
103 '(find-args-history . 1)))) 129 '(find-args-history . 1))))
@@ -138,11 +164,12 @@ as the final argument."
138 " " args " " 164 " " args " "
139 (shell-quote-argument ")") 165 (shell-quote-argument ")")
140 " ")) 166 " "))
141 (if (equal (car find-ls-option) "-exec ls -ld {} \\;") 167 (if (string-match "\\`\\(.*\\) {} \\(\\\\;\\|+\\)\\'"
142 (concat "-exec ls -ld " 168 (car find-ls-option))
169 (format "%s %s %s"
170 (match-string 1 (car find-ls-option))
143 (shell-quote-argument "{}") 171 (shell-quote-argument "{}")
144 " " 172 find-exec-terminator)
145 (shell-quote-argument ";"))
146 (car find-ls-option)))) 173 (car find-ls-option))))
147 ;; Start the find process. 174 ;; Start the find process.
148 (shell-command (concat args "&") (current-buffer)) 175 (shell-command (concat args "&") (current-buffer))
@@ -216,9 +243,14 @@ The command run (after changing into DIR) is
216 "Find files in DIR containing a regexp REGEXP and start Dired on output. 243 "Find files in DIR containing a regexp REGEXP and start Dired on output.
217The command run (after changing into DIR) is 244The command run (after changing into DIR) is
218 245
219 find . -exec grep -s -e REGEXP {} \\\; -ls 246 find . \\( -type f -exec `grep-program' `find-grep-options' \\
247 -e REGEXP {} \\; \\) -ls
220 248
221Thus ARG can also contain additional grep options." 249where the car of the variable `find-ls-option' specifies what to
250use in place of \"-ls\" as the final argument."
251 ;; Doc used to say "Thus ARG can also contain additional grep options."
252 ;; i) Presumably ARG == REGEXP?
253 ;; ii) No it can't have options, since it gets shell-quoted.
222 (interactive "DFind-grep (directory): \nsFind-grep (grep regexp): ") 254 (interactive "DFind-grep (directory): \nsFind-grep (grep regexp): ")
223 ;; find -exec doesn't allow shell i/o redirections in the command, 255 ;; find -exec doesn't allow shell i/o redirections in the command,
224 ;; or we could use `grep -l >/dev/null' 256 ;; or we could use `grep -l >/dev/null'
@@ -231,6 +263,7 @@ Thus ARG can also contain additional grep options."
231 " " 263 " "
232 (shell-quote-argument "{}") 264 (shell-quote-argument "{}")
233 " " 265 " "
266 ;; Doesn't work with "+".
234 (shell-quote-argument ";")))) 267 (shell-quote-argument ";"))))
235 268
236(defun find-dired-filter (proc string) 269(defun find-dired-filter (proc string)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 37faf83fd12..64cc6eb4f8b 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,8 +1,25 @@
12011-04-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * gnus-sum.el (gnus-update-marks): Reinstate the code to not alter
4 marks on non-selected articles.
5
62011-04-02 Chong Yidong <cyd@stupidchicken.com>
7
8 * proto-stream.el: Move to Emacs core, at net/network-stream.el.
9
10 * nnimap.el (nnimap-open-connection-1): Pass explicit :end-of-command
11 parameter to open-protocol-stream.
12
12011-04-01 Julien Danjou <julien@danjou.info> 132011-04-01 Julien Danjou <julien@danjou.info>
2 14
3 * mm-view.el (mm-display-inline-fontify): Do not fontify with 15 * mm-view.el (mm-display-inline-fontify): Do not fontify with
4 fundamental-mode. 16 fundamental-mode.
5 17
182011-04-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
19
20 * gnus-start.el (gnus-get-unread-articles): Don't try to contact denied
21 servers.
22
62011-03-30 Lars Magne Ingebrigtsen <larsi@gnus.org> 232011-03-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
7 24
8 * gnus-sum.el (gnus-update-marks): Revert intersection change, which 25 * gnus-sum.el (gnus-update-marks): Revert intersection change, which
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index afded87fe37..fa582c58aee 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -1723,7 +1723,9 @@ If SCAN, request a scan of that group as well."
1723 ;; Do the rest of the retrieval. 1723 ;; Do the rest of the retrieval.
1724 (dolist (elem type-cache) 1724 (dolist (elem type-cache)
1725 (destructuring-bind (method method-type infos early-data) elem 1725 (destructuring-bind (method method-type infos early-data) elem
1726 (when (and method infos) 1726 (when (and method infos
1727 (not (eq (gnus-server-status method)
1728 'denied)))
1727 (let ((updatep (gnus-check-backend-function 1729 (let ((updatep (gnus-check-backend-function
1728 'request-update-info (car method)))) 1730 'request-update-info (car method))))
1729 ;; See if any of the groups from this method require updating. 1731 ;; See if any of the groups from this method require updating.
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 10aa4e12dcf..e3ae1d7f528 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -6070,12 +6070,15 @@ If SELECT-ARTICLES, only select those articles from GROUP."
6070 (let* ((old (cdr (assq (cdr type) (gnus-info-marks info)))) 6070 (let* ((old (cdr (assq (cdr type) (gnus-info-marks info))))
6071 ;; Don't do anything about marks for articles we 6071 ;; Don't do anything about marks for articles we
6072 ;; didn't actually get any headers for. 6072 ;; didn't actually get any headers for.
6073 (existing (gnus-compress-sequence gnus-newsgroup-articles))
6074 (del 6073 (del
6075 (gnus-remove-from-range (gnus-copy-sequence old) list)) 6074 (gnus-list-range-intersection
6075 gnus-newsgroup-articles
6076 (gnus-remove-from-range (gnus-copy-sequence old) list)))
6076 (add 6077 (add
6077 (gnus-remove-from-range 6078 (gnus-list-range-intersection
6078 (gnus-copy-sequence list) old))) 6079 gnus-newsgroup-articles
6080 (gnus-remove-from-range
6081 (gnus-copy-sequence list) old))))
6079 (when add 6082 (when add
6080 (push (list add 'add (list (cdr type))) delta-marks)) 6083 (push (list add 'add (list (cdr type))) delta-marks))
6081 (when del 6084 (when del
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index fa09c7ff165..afdea185dd3 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -31,7 +31,11 @@
31 (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) 31 (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
32 32
33(eval-and-compile 33(eval-and-compile
34 (require 'nnheader)) 34 (require 'nnheader)
35 ;; In Emacs 24, `open-protocol-stream' is an autoloaded alias for
36 ;; `make-network-stream'.
37 (unless (fboundp 'open-protocol-stream)
38 (require 'proto-stream)))
35 39
36(eval-when-compile 40(eval-when-compile
37 (require 'cl)) 41 (require 'cl))
@@ -45,7 +49,6 @@
45(require 'tls) 49(require 'tls)
46(require 'parse-time) 50(require 'parse-time)
47(require 'nnmail) 51(require 'nnmail)
48(require 'proto-stream)
49 52
50(autoload 'auth-source-forget+ "auth-source") 53(autoload 'auth-source-forget+ "auth-source")
51(autoload 'auth-source-search "auth-source") 54(autoload 'auth-source-search "auth-source")
@@ -365,6 +368,7 @@ textual parts.")
365 :return-list t 368 :return-list t
366 :shell-command nnimap-shell-program 369 :shell-command nnimap-shell-program
367 :capability-command "1 CAPABILITY\r\n" 370 :capability-command "1 CAPABILITY\r\n"
371 :end-of-command "\r\n"
368 :success " OK " 372 :success " OK "
369 :starttls-function 373 :starttls-function
370 (lambda (capabilities) 374 (lambda (capabilities)
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el
index fa765e17463..3285da513e8 100644
--- a/lisp/gnus/nntp.el
+++ b/lisp/gnus/nntp.el
@@ -27,13 +27,16 @@
27 27
28;; For Emacs <22.2 and XEmacs. 28;; For Emacs <22.2 and XEmacs.
29(eval-and-compile 29(eval-and-compile
30 (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) 30 (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))
31 ;; In Emacs 24, `open-protocol-stream' is an autoloaded alias for
32 ;; `make-network-stream'.
33 (unless (fboundp 'open-protocol-stream)
34 (require 'proto-stream)))
31 35
32(require 'nnheader) 36(require 'nnheader)
33(require 'nnoo) 37(require 'nnoo)
34(require 'gnus-util) 38(require 'gnus-util)
35(require 'gnus) 39(require 'gnus)
36(require 'proto-stream)
37(require 'gnus-group) ;; gnus-group-name-charset 40(require 'gnus-group) ;; gnus-group-name-charset
38 41
39(nnoo-declare nntp) 42(nnoo-declare nntp)
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 392e894965c..206a9af3a90 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -1,4 +1,4 @@
1;;; help-fns.el --- Complex help functions 1;;; help-fns.el --- Complex help functions -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 1985-1986, 1993-1994, 1998-2011 3;; Copyright (C) 1985-1986, 1993-1994, 1998-2011
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
@@ -635,8 +635,8 @@ it is displayed along with the global value."
635 "Describe variable: ") 635 "Describe variable: ")
636 obarray 636 obarray
637 (lambda (vv) 637 (lambda (vv)
638 (or (special-variable-p vv) 638 (or (get vv 'variable-documentation)
639 (get vv 'variable-documentation))) 639 (and (boundp vv) (not (keywordp vv)))))
640 t nil nil 640 t nil nil
641 (if (symbolp v) (symbol-name v)))) 641 (if (symbolp v) (symbol-name v))))
642 (list (if (equal val "") 642 (list (if (equal val "")
@@ -879,7 +879,7 @@ BUFFER defaults to the current buffer."
879 (insert (cond 879 (insert (cond
880 ((null value) "default") 880 ((null value) "default")
881 ((char-table-p value) "deeper char-table ...") 881 ((char-table-p value) "deeper char-table ...")
882 (t (condition-case err 882 (t (condition-case nil
883 (category-set-mnemonics value) 883 (category-set-mnemonics value)
884 (error "invalid")))))) 884 (error "invalid"))))))
885 885
diff --git a/lisp/hexl.el b/lisp/hexl.el
index dd142f7cda4..fdafd97cdab 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -1,4 +1,4 @@
1;;; hexl.el --- edit a file in a hex dump format using the hexl filter 1;;; hexl.el --- edit a file in a hex dump format using the hexl filter -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 1989, 1994, 1998, 2001-2011 Free Software Foundation, Inc. 3;; Copyright (C) 1989, 1994, 1998, 2001-2011 Free Software Foundation, Inc.
4 4
@@ -355,7 +355,7 @@ You can use \\[hexl-find-file] to visit a file in Hexl mode.
355 355
356 (hexl-mode--setq-local 'require-final-newline nil) 356 (hexl-mode--setq-local 'require-final-newline nil)
357 357
358 358
359 (hexl-mode--setq-local 'font-lock-defaults '(hexl-font-lock-keywords t)) 359 (hexl-mode--setq-local 'font-lock-defaults '(hexl-font-lock-keywords t))
360 360
361 (hexl-mode--setq-local 'revert-buffer-function 361 (hexl-mode--setq-local 'revert-buffer-function
@@ -437,7 +437,7 @@ and edit the file in `hexl-mode'."
437 (if (not (eq major-mode 'hexl-mode)) 437 (if (not (eq major-mode 'hexl-mode))
438 (hexl-mode))) 438 (hexl-mode)))
439 439
440(defun hexl-revert-buffer-function (ignore-auto noconfirm) 440(defun hexl-revert-buffer-function (_ignore-auto _noconfirm)
441 (let ((coding-system-for-read 'no-conversion) 441 (let ((coding-system-for-read 'no-conversion)
442 revert-buffer-function) 442 revert-buffer-function)
443 ;; Call the original `revert-buffer' without code conversion; also 443 ;; Call the original `revert-buffer' without code conversion; also
@@ -492,7 +492,7 @@ With arg, don't unhexlify buffer."
492 ;; since some of them may affect the minor modes. 492 ;; since some of them may affect the minor modes.
493 (dolist (mm mms) 493 (dolist (mm mms)
494 (funcall (car mm) (if (cdr mm) 1 -1)))) 494 (funcall (car mm) (if (cdr mm) 1 -1))))
495 495
496 (force-mode-line-update)) 496 (force-mode-line-update))
497 497
498(defun hexl-maybe-dehexlify-buffer () 498(defun hexl-maybe-dehexlify-buffer ()
diff --git a/lisp/linum.el b/lisp/linum.el
index 11e6a7f8b4f..db6e4c49977 100644
--- a/lisp/linum.el
+++ b/lisp/linum.el
@@ -1,4 +1,4 @@
1;;; linum.el --- display line numbers in the left margin 1;;; linum.el --- display line numbers in the left margin -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 2008-2011 Free Software Foundation, Inc. 3;; Copyright (C) 2008-2011 Free Software Foundation, Inc.
4 4
@@ -174,14 +174,14 @@ and you have to scroll or press \\[recenter-top-bottom] to update the numbers."
174 (setq line (1+ line))) 174 (setq line (1+ line)))
175 (set-window-margins win width (cdr (window-margins win))))) 175 (set-window-margins win width (cdr (window-margins win)))))
176 176
177(defun linum-after-change (beg end len) 177(defun linum-after-change (beg end _len)
178 ;; update overlays on deletions, and after newlines are inserted 178 ;; update overlays on deletions, and after newlines are inserted
179 (when (or (= beg end) 179 (when (or (= beg end)
180 (= end (point-max)) 180 (= end (point-max))
181 (string-match-p "\n" (buffer-substring-no-properties beg end))) 181 (string-match-p "\n" (buffer-substring-no-properties beg end)))
182 (linum-update-current))) 182 (linum-update-current)))
183 183
184(defun linum-after-scroll (win start) 184(defun linum-after-scroll (win _start)
185 (linum-update (window-buffer win))) 185 (linum-update (window-buffer win)))
186 186
187;; (defun linum-after-size (frame) 187;; (defun linum-after-size (frame)
diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in
index ed2fe4031b7..c844a8f6630 100644
--- a/lisp/makefile.w32-in
+++ b/lisp/makefile.w32-in
@@ -27,9 +27,9 @@ lisp = $(CURDIR)
27srcdir = $(CURDIR)/.. 27srcdir = $(CURDIR)/..
28 28
29# You can specify a different executable on the make command line, 29# You can specify a different executable on the make command line,
30# e.g. "make EMACS=../src/emacs ...". 30# e.g. "make EMACS=../bin/emacs ...".
31 31
32EMACS = $(THISDIR)/../bin/emacs.exe 32EMACS = ../src/$(BLD)/emacs.exe
33 33
34# Command line flags for Emacs. 34# Command line flags for Emacs.
35 35
diff --git a/lisp/gnus/proto-stream.el b/lisp/net/network-stream.el
index 45cc974e7a9..070cd2641db 100644
--- a/lisp/gnus/proto-stream.el
+++ b/lisp/net/network-stream.el
@@ -1,4 +1,4 @@
1;;; proto-stream.el --- negotiating TLS, STARTTLS and other connections 1;;; network-stream.el --- open network processes, possibly with encryption
2 2
3;; Copyright (C) 2010-2011 Free Software Foundation, Inc. 3;; Copyright (C) 2010-2011 Free Software Foundation, Inc.
4 4
@@ -22,20 +22,14 @@
22 22
23;;; Commentary: 23;;; Commentary:
24 24
25;; This library is meant to provide the glue between modules that want 25;; This library provides the function `open-network-stream', which provides a
26;; to establish a network connection to a server for protocols such as 26;; higher-level interface for opening TCP network processes than the built-in
27;; IMAP, NNTP, SMTP and POP3. 27;; function `make-network-process'. In addition to plain connections, it
28 28;; supports TLS/SSL and STARTTLS connections.
29;; The main problem is that there's more than a couple of interfaces
30;; towards doing this. You have normal, plain connections, which are
31;; no trouble at all, but you also have TLS/SSL connections, and you
32;; have STARTTLS. Negotiating this for each protocol can be rather
33;; tedious, so this library provides a single entry point, and hides
34;; much of the ugliness.
35 29
36;; Usage example: 30;; Usage example:
37 31
38;; (open-protocol-stream 32;; (open-network-stream
39;; "*nnimap*" buffer address port 33;; "*nnimap*" buffer address port
40;; :type 'network 34;; :type 'network
41;; :capability-command "1 CAPABILITY\r\n" 35;; :capability-command "1 CAPABILITY\r\n"
@@ -55,14 +49,24 @@
55 (proc type &optional priority-string trustfiles keyfiles)) 49 (proc type &optional priority-string trustfiles keyfiles))
56 50
57;;;###autoload 51;;;###autoload
58(defun open-protocol-stream (name buffer host service &rest parameters) 52(defun open-network-stream (name buffer host service &rest parameters)
59 "Open a network stream to HOST, possibly with encryption. 53 "Open a TCP connection to HOST, optionally with encryption.
60Normally, return a network process object; with a non-nil 54Normally, return a network process object; with a non-nil
61:return-list parameter, return a list instead (see below). 55:return-list parameter, return a list instead (see below).
56Input and output work as for subprocesses; `delete-process'
57closes it.
58
59NAME is the name for the process. It is modified if necessary to
60 make it unique.
61BUFFER is a buffer or buffer name to associate with the process.
62 Process output goes at end of that buffer. BUFFER may be nil,
63 meaning that the process is not associated with any buffer.
64HOST is the name or IP address of the host to connect to.
65SERVICE is the name of the service desired, or an integer specifying
66 a port number to connect to.
62 67
63The first four parameters, NAME, BUFFER, HOST, and SERVICE, have 68The remaining PARAMETERS should be a sequence of keywords and
64the same meanings as in `open-network-stream'. The remaining 69values:
65PARAMETERS should be a sequence of keywords and values:
66 70
67:type specifies the connection type, one of the following: 71:type specifies the connection type, one of the following:
68 nil or `network' 72 nil or `network'
@@ -92,7 +96,6 @@ PARAMETERS should be a sequence of keywords and values:
92 or `tls' (TLS-encrypted). 96 or `tls' (TLS-encrypted).
93 97
94:end-of-command specifies a regexp matching the end of a command. 98:end-of-command specifies a regexp matching the end of a command.
95 If non-nil, it defaults to \"\\n\".
96 99
97:success specifies a regexp matching a message indicating a 100:success specifies a regexp matching a message indicating a
98 successful STARTTLS negotiation. For instance, the default 101 successful STARTTLS negotiation. For instance, the default
@@ -106,6 +109,8 @@ PARAMETERS should be a sequence of keywords and values:
106 This function should take one parameter, the response to the 109 This function should take one parameter, the response to the
107 capability command, and should return the command to switch on 110 capability command, and should return the command to switch on
108 STARTTLS if the server supports STARTTLS, and nil otherwise." 111 STARTTLS if the server supports STARTTLS, and nil otherwise."
112 (unless (featurep 'make-network-process)
113 (error "Emacs was compiled without networking support"))
109 (let ((type (plist-get parameters :type)) 114 (let ((type (plist-get parameters :type))
110 (return-list (plist-get parameters :return-list))) 115 (return-list (plist-get parameters :return-list)))
111 (if (and (not return-list) 116 (if (and (not return-list)
@@ -113,21 +118,24 @@ PARAMETERS should be a sequence of keywords and values:
113 (and (memq type '(nil network)) 118 (and (memq type '(nil network))
114 (not (and (plist-get parameters :success) 119 (not (and (plist-get parameters :success)
115 (plist-get parameters :capability-command)))))) 120 (plist-get parameters :capability-command))))))
116 ;; The simplest case is equivalent to `open-network-stream'. 121 ;; The simplest case: wrapper around `make-network-process'.
117 (open-network-stream name buffer host service) 122 (make-network-process :name name :buffer buffer
118 ;; For everything else, refer to proto-stream-open-*. 123 :host host :service service)
119 (unless (plist-get parameters :end-of-command) 124 (let ((work-buffer (or buffer
120 (setq parameters (append '(:end-of-command "\r\n") parameters))) 125 (generate-new-buffer " *stream buffer*")))
121 (let* ((connection-function 126 (fun (cond ((eq type 'plain) 'network-stream-open-plain)
122 (cond 127 ((memq type '(nil network starttls))
123 ((eq type 'plain) 'proto-stream-open-plain) 128 'network-stream-open-starttls)
124 ((memq type '(nil network starttls)) 129 ((memq type '(tls ssl)) 'network-stream-open-tls)
125 'proto-stream-open-starttls) 130 ((eq type 'shell) 'network-stream-open-shell)
126 ((memq type '(tls ssl)) 'proto-stream-open-tls) 131 (t (error "Invalid connection type %s" type))))
127 ((eq type 'shell) 'proto-stream-open-shell) 132 result)
128 (t (error "Invalid connection type %s" type)))) 133 (unwind-protect
129 (result (funcall connection-function 134 (setq result (funcall fun name work-buffer host service parameters))
130 name buffer host service parameters))) 135 (unless buffer
136 (and (processp (car result))
137 (set-process-buffer (car result) nil))
138 (kill-buffer work-buffer)))
131 (if return-list 139 (if return-list
132 (list (car result) 140 (list (car result)
133 :greeting (nth 1 result) 141 :greeting (nth 1 result)
@@ -135,16 +143,20 @@ PARAMETERS should be a sequence of keywords and values:
135 :type (nth 3 result)) 143 :type (nth 3 result))
136 (car result)))))) 144 (car result))))))
137 145
138(defun proto-stream-open-plain (name buffer host service parameters) 146;;;###autoload
147(defalias 'open-protocol-stream 'open-network-stream)
148
149(defun network-stream-open-plain (name buffer host service parameters)
139 (let ((start (with-current-buffer buffer (point))) 150 (let ((start (with-current-buffer buffer (point)))
140 (stream (open-network-stream name buffer host service))) 151 (stream (make-network-process :name name :buffer buffer
152 :host host :service service)))
141 (list stream 153 (list stream
142 (proto-stream-get-response stream start 154 (network-stream-get-response stream start
143 (plist-get parameters :end-of-command)) 155 (plist-get parameters :end-of-command))
144 nil 156 nil
145 'plain))) 157 'plain)))
146 158
147(defun proto-stream-open-starttls (name buffer host service parameters) 159(defun network-stream-open-starttls (name buffer host service parameters)
148 (let* ((start (with-current-buffer buffer (point))) 160 (let* ((start (with-current-buffer buffer (point)))
149 (require-tls (eq (plist-get parameters :type) 'starttls)) 161 (require-tls (eq (plist-get parameters :type) 'starttls))
150 (starttls-function (plist-get parameters :starttls-function)) 162 (starttls-function (plist-get parameters :starttls-function))
@@ -152,11 +164,10 @@ PARAMETERS should be a sequence of keywords and values:
152 (capability-command (plist-get parameters :capability-command)) 164 (capability-command (plist-get parameters :capability-command))
153 (eoc (plist-get parameters :end-of-command)) 165 (eoc (plist-get parameters :end-of-command))
154 ;; Return (STREAM GREETING CAPABILITIES RESULTING-TYPE) 166 ;; Return (STREAM GREETING CAPABILITIES RESULTING-TYPE)
155 (stream (open-network-stream name buffer host service)) 167 (stream (make-network-process :name name :buffer buffer
156 (greeting (proto-stream-get-response stream start eoc)) 168 :host host :service service))
157 (capabilities (when capability-command 169 (greeting (network-stream-get-response stream start eoc))
158 (proto-stream-command stream 170 (capabilities (network-stream-command stream capability-command eoc))
159 capability-command eoc)))
160 (resulting-type 'plain) 171 (resulting-type 'plain)
161 starttls-command) 172 starttls-command)
162 173
@@ -179,9 +190,9 @@ PARAMETERS should be a sequence of keywords and values:
179 ;; care about the identity of the peer. 190 ;; care about the identity of the peer.
180 (cons "--insecure" starttls-extra-arguments)))) 191 (cons "--insecure" starttls-extra-arguments))))
181 (setq stream (starttls-open-stream name buffer host service))) 192 (setq stream (starttls-open-stream name buffer host service)))
182 (proto-stream-get-response stream start eoc)) 193 (network-stream-get-response stream start eoc))
183 (when (string-match success-string 194 (when (string-match success-string
184 (proto-stream-command stream starttls-command eoc)) 195 (network-stream-command stream starttls-command eoc))
185 ;; The server said it was OK to begin STARTTLS negotiations. 196 ;; The server said it was OK to begin STARTTLS negotiations.
186 (if (fboundp 'open-gnutls-stream) 197 (if (fboundp 'open-gnutls-stream)
187 (gnutls-negotiate stream nil) 198 (gnutls-negotiate stream nil)
@@ -192,11 +203,13 @@ PARAMETERS should be a sequence of keywords and values:
192 ;; We didn't successfully negotiate STARTTLS; if TLS 203 ;; We didn't successfully negotiate STARTTLS; if TLS
193 ;; isn't demanded, reopen an unencrypted connection. 204 ;; isn't demanded, reopen an unencrypted connection.
194 (unless require-tls 205 (unless require-tls
195 (setq stream (open-network-stream name buffer host service)) 206 (setq stream
196 (proto-stream-get-response stream start eoc))) 207 (make-network-process :name name :buffer buffer
208 :host host :service service))
209 (network-stream-get-response stream start eoc)))
197 ;; Re-get the capabilities, which may have now changed. 210 ;; Re-get the capabilities, which may have now changed.
198 (setq capabilities 211 (setq capabilities
199 (proto-stream-command stream capability-command eoc)))) 212 (network-stream-command stream capability-command eoc))))
200 213
201 ;; If TLS is mandatory, close the connection if it's unencrypted. 214 ;; If TLS is mandatory, close the connection if it's unencrypted.
202 (and require-tls 215 (and require-tls
@@ -205,70 +218,69 @@ PARAMETERS should be a sequence of keywords and values:
205 ;; Return value: 218 ;; Return value:
206 (list stream greeting capabilities resulting-type))) 219 (list stream greeting capabilities resulting-type)))
207 220
208(defun proto-stream-command (stream command eoc) 221(defun network-stream-command (stream command eoc)
209 (let ((start (with-current-buffer (process-buffer stream) (point-max)))) 222 (when command
210 (process-send-string stream command) 223 (let ((start (with-current-buffer (process-buffer stream) (point-max))))
211 (proto-stream-get-response stream start eoc))) 224 (process-send-string stream command)
212 225 (network-stream-get-response stream start eoc))))
213(defun proto-stream-get-response (stream start end-of-command) 226
214 (with-current-buffer (process-buffer stream) 227(defun network-stream-get-response (stream start end-of-command)
215 (save-excursion 228 (when end-of-command
216 (goto-char start) 229 (with-current-buffer (process-buffer stream)
217 (while (and (memq (process-status stream) 230 (save-excursion
218 '(open run)) 231 (goto-char start)
219 (not (re-search-forward end-of-command nil t))) 232 (while (and (memq (process-status stream) '(open run))
220 (accept-process-output stream 0 50) 233 (not (re-search-forward end-of-command nil t)))
221 (goto-char start)) 234 (accept-process-output stream 0 50)
222 (if (= start (point)) 235 (goto-char start))
223 ;; The process died; return nil. 236 ;; Return the data we got back, or nil if the process died.
224 nil 237 (unless (= start (point))
225 ;; Return the data we got back. 238 (buffer-substring start (point)))))))
226 (buffer-substring start (point)))))) 239
227 240(defun network-stream-open-tls (name buffer host service parameters)
228(defun proto-stream-open-tls (name buffer host service parameters)
229 (with-current-buffer buffer 241 (with-current-buffer buffer
230 (let ((start (point-max)) 242 (let* ((start (point-max))
231 (stream 243 (use-builtin-gnutls (fboundp 'open-gnutls-stream))
232 (funcall (if (fboundp 'open-gnutls-stream) 244 (stream
233 'open-gnutls-stream 245 (funcall (if use-builtin-gnutls
234 'open-tls-stream) 246 'open-gnutls-stream
235 name buffer host service)) 247 'open-tls-stream)
236 (eoc (plist-get parameters :end-of-command))) 248 name buffer host service))
249 (eoc (plist-get parameters :end-of-command)))
237 (if (null stream) 250 (if (null stream)
238 (list nil nil nil 'plain) 251 (list nil nil nil 'plain)
239 ;; If we're using tls.el, we have to delete the output from 252 ;; If we're using tls.el, we have to delete the output from
240 ;; openssl/gnutls-cli. 253 ;; openssl/gnutls-cli.
241 (unless (fboundp 'open-gnutls-stream) 254 (when (and (null use-builtin-gnutls) eoc)
242 (proto-stream-get-response stream start eoc) 255 (network-stream-get-response stream start eoc)
243 (goto-char (point-min)) 256 (goto-char (point-min))
244 (when (re-search-forward eoc nil t) 257 (when (re-search-forward eoc nil t)
245 (goto-char (match-beginning 0)) 258 (goto-char (match-beginning 0))
246 (delete-region (point-min) (line-beginning-position)))) 259 (delete-region (point-min) (line-beginning-position))))
247 (proto-stream-capability-open start stream parameters 'tls))))) 260 (let* ((capability-command (plist-get parameters :capability-command)))
261 (list stream
262 (network-stream-get-response stream start eoc)
263 (network-stream-command stream capability-command eoc)
264 'tls))))))
248 265
249(defun proto-stream-open-shell (name buffer host service parameters) 266(defun network-stream-open-shell (name buffer host service parameters)
250 (require 'format-spec) 267 (require 'format-spec)
251 (proto-stream-capability-open
252 (with-current-buffer buffer (point))
253 (let ((process-connection-type nil))
254 (start-process name buffer shell-file-name
255 shell-command-switch
256 (format-spec
257 (plist-get parameters :shell-command)
258 (format-spec-make
259 ?s host
260 ?p service))))
261 parameters 'plain))
262
263(defun proto-stream-capability-open (start stream parameters stream-type)
264 (let* ((capability-command (plist-get parameters :capability-command)) 268 (let* ((capability-command (plist-get parameters :capability-command))
265 (eoc (plist-get parameters :end-of-command)) 269 (eoc (plist-get parameters :end-of-command))
266 (greeting (proto-stream-get-response stream start eoc))) 270 (start (with-current-buffer buffer (point)))
267 (list stream greeting 271 (stream (let ((process-connection-type nil))
268 (and capability-command 272 (start-process name buffer shell-file-name
269 (proto-stream-command stream capability-command eoc)) 273 shell-command-switch
270 stream-type))) 274 (format-spec
275 (plist-get parameters :shell-command)
276 (format-spec-make
277 ?s host
278 ?p service))))))
279 (list stream
280 (network-stream-get-response stream start eoc)
281 (network-stream-command stream capability-command eoc)
282 'plain)))
271 283
272(provide 'proto-stream) 284(provide 'network-stream)
273 285
274;;; proto-stream.el ends here 286;;; network-stream.el ends here
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 5822fc3cf32..663c1ded9f1 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -4,7 +4,7 @@
4 4
5;; Author: Ryan Yeske <rcyeske@gmail.com> 5;; Author: Ryan Yeske <rcyeske@gmail.com>
6;; Maintainers: Ryan Yeske <rcyeske@gmail.com>, 6;; Maintainers: Ryan Yeske <rcyeske@gmail.com>,
7;; Deniz Dogan <deniz.a.m.dogan@gmail.com> 7;; Deniz Dogan <deniz@dogan.se>
8;; Keywords: comm 8;; Keywords: comm
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -900,7 +900,6 @@ IRC command completion is performed only if '/' is the first input char."
900 (define-key map (kbd "C-c C-m") 'rcirc-cmd-msg) 900 (define-key map (kbd "C-c C-m") 'rcirc-cmd-msg)
901 (define-key map (kbd "C-c C-r") 'rcirc-cmd-nick) ; rename 901 (define-key map (kbd "C-c C-r") 'rcirc-cmd-nick) ; rename
902 (define-key map (kbd "C-c C-o") 'rcirc-omit-mode) 902 (define-key map (kbd "C-c C-o") 'rcirc-omit-mode)
903 (define-key map (kbd "M-o") 'rcirc-omit-mode)
904 (define-key map (kbd "C-c C-p") 'rcirc-cmd-part) 903 (define-key map (kbd "C-c C-p") 'rcirc-cmd-part)
905 (define-key map (kbd "C-c C-q") 'rcirc-cmd-query) 904 (define-key map (kbd "C-c C-q") 'rcirc-cmd-query)
906 (define-key map (kbd "C-c C-t") 'rcirc-cmd-topic) 905 (define-key map (kbd "C-c C-t") 'rcirc-cmd-topic)
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index a4c9b7fccba..58f2ee98f3c 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -440,10 +440,11 @@ This variable's value takes effect when `grep-compute-defaults' is called.")
440 440
441;;;###autoload 441;;;###autoload
442(defvar grep-find-use-xargs nil 442(defvar grep-find-use-xargs nil
443 "Non-nil means that `grep-find' uses the `xargs' utility by default. 443 "How to invoke find and grep.
444If `exec', use `find -exec'. 444If `exec', use `find -exec {} ;'.
445If `exec-plus' use `find -exec {} +'.
445If `gnu', use `find -print0' and `xargs -0'. 446If `gnu', use `find -print0' and `xargs -0'.
446Any other non-nil value means to use `find -print' and `xargs'. 447Any other value means to use `find -print' and `xargs'.
447 448
448This variable's value takes effect when `grep-compute-defaults' is called.") 449This variable's value takes effect when `grep-compute-defaults' is called.")
449 450
@@ -561,6 +562,10 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
561 (unless grep-find-use-xargs 562 (unless grep-find-use-xargs
562 (setq grep-find-use-xargs 563 (setq grep-find-use-xargs
563 (cond 564 (cond
565 ((grep-probe find-program
566 `(nil nil nil ,null-device "-exec" "echo"
567 "{}" "+"))
568 'exec-plus)
564 ((and 569 ((and
565 (grep-probe find-program `(nil nil nil ,null-device "-print0")) 570 (grep-probe find-program `(nil nil nil ,null-device "-print0"))
566 (grep-probe xargs-program `(nil nil nil "-0" "-e" "echo"))) 571 (grep-probe xargs-program `(nil nil nil "-0" "-e" "echo")))
@@ -575,13 +580,17 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
575 ;; forward slashes as directory separators. 580 ;; forward slashes as directory separators.
576 (format "%s . -type f -print0 | \"%s\" -0 -e %s" 581 (format "%s . -type f -print0 | \"%s\" -0 -e %s"
577 find-program xargs-program grep-command)) 582 find-program xargs-program grep-command))
578 ((eq grep-find-use-xargs 'exec) 583 ((memq grep-find-use-xargs '(exec exec-plus))
579 (let ((cmd0 (format "%s . -type f -exec %s" 584 (let ((cmd0 (format "%s . -type f -exec %s"
580 find-program grep-command))) 585 find-program grep-command))
586 (null (if grep-use-null-device
587 (format "%s " null-device)
588 "")))
581 (cons 589 (cons
582 (format "%s {} %s %s" 590 (if (eq grep-find-use-xargs 'exec-plus)
583 cmd0 null-device 591 (format "%s %s{} +" cmd0 null)
584 (shell-quote-argument ";")) 592 (format "%s {} %s%s" cmd0 null
593 (shell-quote-argument ";")))
585 (1+ (length cmd0))))) 594 (1+ (length cmd0)))))
586 (t 595 (t
587 (format "%s . -type f -print | \"%s\" %s" 596 (format "%s . -type f -print | \"%s\" %s"
@@ -589,14 +598,20 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
589 (unless grep-find-template 598 (unless grep-find-template
590 (setq grep-find-template 599 (setq grep-find-template
591 (let ((gcmd (format "%s <C> %s <R>" 600 (let ((gcmd (format "%s <C> %s <R>"
592 grep-program grep-options))) 601 grep-program grep-options))
602 (null (if grep-use-null-device
603 (format "%s " null-device)
604 "")))
593 (cond ((eq grep-find-use-xargs 'gnu) 605 (cond ((eq grep-find-use-xargs 'gnu)
594 (format "%s . <X> -type f <F> -print0 | \"%s\" -0 -e %s" 606 (format "%s . <X> -type f <F> -print0 | \"%s\" -0 -e %s"
595 find-program xargs-program gcmd)) 607 find-program xargs-program gcmd))
596 ((eq grep-find-use-xargs 'exec) 608 ((eq grep-find-use-xargs 'exec)
597 (format "%s . <X> -type f <F> -exec %s {} %s %s" 609 (format "%s . <X> -type f <F> -exec %s {} %s%s"
598 find-program gcmd null-device 610 find-program gcmd null
599 (shell-quote-argument ";"))) 611 (shell-quote-argument ";")))
612 ((eq grep-find-use-xargs 'exec-plus)
613 (format "%s . <X> -type f <F> -exec %s %s{} +"
614 find-program gcmd null))
600 (t 615 (t
601 (format "%s . <X> -type f <F> -print | \"%s\" %s" 616 (format "%s . <X> -type f <F> -print | \"%s\" %s"
602 find-program xargs-program gcmd)))))))) 617 find-program xargs-program gcmd))))))))
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 5b7e07a5aad..8066e1c3a7f 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -7068,10 +7068,9 @@ If these don't exist, a letter in the string is automatically selected."
7068 ;; No quick reply: Show help 7068 ;; No quick reply: Show help
7069 (save-window-excursion 7069 (save-window-excursion
7070 (with-output-to-temp-buffer "*Completions*" 7070 (with-output-to-temp-buffer "*Completions*"
7071 (mapcar (lambda(x) 7071 (dolist (x keys-alist)
7072 (princ (nth 1 x)) 7072 (princ (nth 1 x))
7073 (princ "\n")) 7073 (princ "\n")))
7074 keys-alist))
7075 (setq char (read-char))) 7074 (setq char (read-char)))
7076 (setq char (read-char))) 7075 (setq char (read-char)))
7077 (message nil) 7076 (message nil)
@@ -9313,13 +9312,11 @@ This function was written since `list-abbrevs' looks terrible for IDLWAVE mode."
9313 (princ "================================================\n\n") 9312 (princ "================================================\n\n")
9314 (princ (format fmt "KEY" "ACTION" "")) 9313 (princ (format fmt "KEY" "ACTION" ""))
9315 (princ (format fmt "---" "------" ""))) 9314 (princ (format fmt "---" "------" "")))
9316 (mapcar 9315 (dolist (list abbrevs)
9317 (lambda (list) 9316 (setq str (car list)
9318 (setq str (car list) 9317 rpl (nth 1 list)
9319 rpl (nth 1 list) 9318 func (nth 2 list))
9320 func (nth 2 list)) 9319 (princ (format fmt str rpl func)))))
9321 (princ (format fmt str rpl func)))
9322 abbrevs)))
9323 ;; Make sure each abbreviation uses only one display line 9320 ;; Make sure each abbreviation uses only one display line
9324 (with-current-buffer "*Help*" 9321 (with-current-buffer "*Help*"
9325 (setq truncate-lines t))) 9322 (setq truncate-lines t)))
diff --git a/lisp/startup.el b/lisp/startup.el
index d2184778212..3285d47f088 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -906,7 +906,8 @@ opening the first frame (e.g. open a connection to an X server).")
906 ;; spec, but mark it as changed outside of Customize. 906 ;; spec, but mark it as changed outside of Customize.
907 (let ((color (x-get-resource "cursorColor" "CursorColor"))) 907 (let ((color (x-get-resource "cursorColor" "CursorColor")))
908 (when color 908 (when color
909 (face-spec-set 'cursor `((t (:background ,color)))) 909 (put 'cursor 'theme-face
910 `((changed ((t :background ,color)))))
910 (put 'cursor 'face-modified t))))) 911 (put 'cursor 'face-modified t)))))
911 (frame-initialize)) 912 (frame-initialize))
912 913
diff --git a/lisp/subr.el b/lisp/subr.el
index e6e0c62e0b4..387d538b69d 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1792,28 +1792,6 @@ Signal an error if the program returns with a non-zero exit status."
1792 (forward-line 1)) 1792 (forward-line 1))
1793 (nreverse lines))))) 1793 (nreverse lines)))))
1794 1794
1795;; open-network-stream is a wrapper around make-network-process.
1796
1797(when (featurep 'make-network-process)
1798 (defun open-network-stream (name buffer host service)
1799 "Open a TCP connection for a service to a host.
1800Returns a subprocess-object to represent the connection.
1801Input and output work as for subprocesses; `delete-process' closes it.
1802
1803NAME is the name for the process. It is modified if necessary to make
1804 it unique.
1805BUFFER is the buffer (or buffer name) to associate with the
1806 process. Process output goes at end of that buffer. BUFFER may
1807 be nil, meaning that this process is not associated with any buffer.
1808HOST is the name or IP address of the host to connect to.
1809SERVICE is the name of the service desired, or an integer specifying
1810 a port number to connect to.
1811
1812This is a wrapper around `make-network-process', and only offers a
1813subset of its functionality."
1814 (make-network-process :name name :buffer buffer
1815 :host host :service service)))
1816
1817;; compatibility 1795;; compatibility
1818 1796
1819(make-obsolete 1797(make-obsolete
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 3c9a4570248..99c9a83e4fb 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -71,13 +71,23 @@ Detection of repeated words is not implemented in
71 :type 'boolean) 71 :type 'boolean)
72 72
73(defcustom flyspell-mark-duplications-exceptions 73(defcustom flyspell-mark-duplications-exceptions
74 '(("francais" . ("nous" "vous"))) 74 '((nil . ("that" "had")) ; Common defaults for English.
75 ("\\`francais" . ("nous" "vous")))
75 "A list of exceptions for duplicated words. 76 "A list of exceptions for duplicated words.
76It should be a list of (LANGUAGE . EXCEPTION-LIST). LANGUAGE is matched 77It should be a list of (LANGUAGE . EXCEPTION-LIST).
77against the current dictionary and EXCEPTION-LIST is a list of strings. 78
78The duplicated word is downcased before it is compared with the exceptions." 79LANGUAGE is nil, which means the exceptions apply regardless of
80the current dictionary, or a regular expression matching the
81dictionary name (`ispell-local-dictionary' or
82`ispell-dictionary') for which the exceptions should apply.
83
84EXCEPTION-LIST is a list of strings. The checked word is
85downcased before comparing with these exceptions."
79 :group 'flyspell 86 :group 'flyspell
80 :type '(alist :key-type string :value-type (repeat string))) 87 :type '(alist :key-type (choice (const :tag "All dictionaries" nil)
88 string)
89 :value-type (repeat string))
90 :version "24.1")
81 91
82(defcustom flyspell-sort-corrections nil 92(defcustom flyspell-sort-corrections nil
83 "Non-nil means, sort the corrections alphabetically before popping them." 93 "Non-nil means, sort the corrections alphabetically before popping them."
@@ -1044,12 +1054,14 @@ misspelling and skips redundant spell-checking step."
1044 (not (memq (char-after (1- start)) '(?\} ?\\))))) 1054 (not (memq (char-after (1- start)) '(?\} ?\\)))))
1045 flyspell-mark-duplications-flag 1055 flyspell-mark-duplications-flag
1046 (not (catch 'exception 1056 (not (catch 'exception
1047 (dolist (except flyspell-mark-duplications-exceptions) 1057 (let ((dict (or ispell-local-dictionary
1048 (and (string= (or ispell-local-dictionary 1058 ispell-dictionary)))
1049 ispell-dictionary) 1059 (dolist (except flyspell-mark-duplications-exceptions)
1050 (car except)) 1060 (and (or (null (car except))
1051 (member (downcase word) (cdr except)) 1061 (and (stringp dict)
1052 (throw 'exception t))))) 1062 (string-match (car except) dict)))
1063 (member (downcase word) (cdr except))
1064 (throw 'exception t))))))
1053 (save-excursion 1065 (save-excursion
1054 (goto-char start) 1066 (goto-char start)
1055 (let* ((bound 1067 (let* ((bound
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 3c7b8b6abe7..8299f6481ad 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,13 @@
12011-04-02 Chong Yidong <cyd@stupidchicken.com>
2
3 * url-gw.el (url-open-stream): Use new open-network-stream
4 functionality to perform encryption.
5
62011-04-01 Juanma Barranquero <lekktu@gmail.com>
7
8 * url-cookie.el (url-cookie-handle-set-cookie):
9 Use `dolist' rather than `mapcar'.
10
12011-02-12 Teodor Zlatanov <tzz@lifelogs.com> 112011-02-12 Teodor Zlatanov <tzz@lifelogs.com>
2 12
3 * url-parse.el (url-bit-for-url, url-user-for-url) 13 * url-parse.el (url-bit-for-url, url-user-for-url)
@@ -14,7 +24,7 @@
14 move point if the callback function has moved changed/killed the 24 move point if the callback function has moved changed/killed the
15 process buffer. 25 process buffer.
16 26
172010-12-16 Miles Bader <Miles Bader <miles@gnu.org>> 272010-12-16 Miles Bader <miles@gnu.org>
18 28
19 * url-cookie.el: Require 'cl when compiling -- it's necessary for 29 * url-cookie.el: Require 'cl when compiling -- it's necessary for
20 defstruct. 30 defstruct.
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index c55063dfba9..7fdd8b174c1 100644
--- a/lisp/url/url-cookie.el
+++ b/lisp/url/url-cookie.el
@@ -331,9 +331,8 @@ telling Microsoft that."
331 (not trusted) 331 (not trusted)
332 (save-window-excursion 332 (save-window-excursion
333 (with-output-to-temp-buffer "*Cookie Warning*" 333 (with-output-to-temp-buffer "*Cookie Warning*"
334 (mapcar 334 (dolist (x rest)
335 (lambda (x) 335 (princ (format "%s - %s" (car x) (cdr x)))))
336 (princ (format "%s - %s" (car x) (cdr x)))) rest))
337 (prog1 336 (prog1
338 (not (funcall url-confirmation-func 337 (not (funcall url-confirmation-func
339 (format "Allow %s to set these cookies? " 338 (format "Allow %s to set these cookies? "
diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el
index 2ba23583528..7d80f2f6725 100644
--- a/lisp/url/url-gw.el
+++ b/lisp/url/url-gw.el
@@ -28,8 +28,6 @@
28;; Fixme: support SSH explicitly or via a url-gateway-rlogin-program? 28;; Fixme: support SSH explicitly or via a url-gateway-rlogin-program?
29 29
30(autoload 'socks-open-network-stream "socks") 30(autoload 'socks-open-network-stream "socks")
31(autoload 'open-ssl-stream "ssl")
32(autoload 'open-tls-stream "tls")
33 31
34(defgroup url-gateway nil 32(defgroup url-gateway nil
35 "URL gateway variables." 33 "URL gateway variables."
@@ -219,13 +217,6 @@ Might do a non-blocking connection; use `process-status' to check."
219 host)) 217 host))
220 'native 218 'native
221 url-gateway-method)) 219 url-gateway-method))
222;;; ;; This hack is for OS/2 Emacs so that it will not do bogus CRLF
223;;; ;; conversions while trying to be 'helpful'
224;;; (tcp-binary-process-output-services (if (stringp service)
225;;; (list service)
226;;; (list service
227;;; (int-to-string service))))
228
229 ;; An attempt to deal with denied connections, and attempt 220 ;; An attempt to deal with denied connections, and attempt
230 ;; to reconnect 221 ;; to reconnect
231 (cur-retries 0) 222 (cur-retries 0)
@@ -243,19 +234,15 @@ Might do a non-blocking connection; use `process-status' to check."
243 (let ((coding-system-for-read 'binary) 234 (let ((coding-system-for-read 'binary)
244 (coding-system-for-write 'binary)) 235 (coding-system-for-write 'binary))
245 (setq conn (case gw-method 236 (setq conn (case gw-method
246 (tls 237 ((tls ssl native)
247 (funcall (if (fboundp 'open-gnutls-stream) 238 (if (eq gw-method 'native)
248 'open-gnutls-stream 239 (setq gw-method 'plain))
249 'open-tls-stream) 240 (open-network-stream
250 name buffer host service)) 241 name buffer host service
251 (ssl 242 :type gw-method
252 (open-ssl-stream name buffer host service)) 243 ;; Use non-blocking socket if we can.
253 ((native) 244 :nowait (featurep 'make-network-process
254 ;; Use non-blocking socket if we can. 245 '(:nowait t))))
255 (make-network-process :name name :buffer buffer
256 :host host :service service
257 :nowait
258 (featurep 'make-network-process '(:nowait t))))
259 (socks 246 (socks
260 (socks-open-network-stream name buffer host service)) 247 (socks-open-network-stream name buffer host service))
261 (telnet 248 (telnet
@@ -264,13 +251,7 @@ Might do a non-blocking connection; use `process-status' to check."
264 (url-open-rlogin name buffer host service)) 251 (url-open-rlogin name buffer host service))
265 (otherwise 252 (otherwise
266 (error "Bad setting of url-gateway-method: %s" 253 (error "Bad setting of url-gateway-method: %s"
267 url-gateway-method))))) 254 url-gateway-method))))))
268 ;; Ignoring errors here seems wrong. E.g. it'll throw away the
269 ;; error signaled two lines above. It was also found inconvenient
270 ;; during debugging.
271 ;; (error
272 ;; (setq conn nil))
273 )
274 conn))) 255 conn)))
275 256
276(provide 'url-gw) 257(provide 'url-gw)
diff --git a/src/ChangeLog b/src/ChangeLog
index 24161dbda1e..c7d14843bcd 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,7 @@
12011-04-05 Paul Eggert <eggert@cs.ucla.edu> 12011-04-05 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Fix more problems found by GCC 4.6.0's static checks.
4
3 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int. 5 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
4 This avoids several warnings with gcc -Wstrict-overflow. 6 This avoids several warnings with gcc -Wstrict-overflow.
5 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code 7 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
@@ -14,8 +16,6 @@
14 16
15 * composite.c (composition_gstring_put_cache): Use unsigned integer. 17 * composite.c (composition_gstring_put_cache): Use unsigned integer.
16 18
172011-04-04 Paul Eggert <eggert@cs.ucla.edu>
18
19 * composite.h, composite.c (composition_gstring_put_cache): 19 * composite.h, composite.c (composition_gstring_put_cache):
20 Use EMACS_INT, not int, for length. 20 Use EMACS_INT, not int, for length.
21 21
@@ -53,8 +53,6 @@
53 * font.c (font_list_entities): Redo for clarity, 53 * font.c (font_list_entities): Redo for clarity,
54 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX. 54 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
55 55
562011-04-03 Paul Eggert <eggert@cs.ucla.edu>
57
58 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars. 56 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
59 (font_score): Avoid potential overflow in diff calculation. 57 (font_score): Avoid potential overflow in diff calculation.
60 58
@@ -79,8 +77,6 @@
79 77
80 * fileio.c (Finsert_file_contents): Make EOF condition clearer. 78 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
81 79
822011-04-02 Paul Eggert <eggert@cs.ucla.edu>
83
84 * fileio.c (Finsert_file_contents): Avoid signed integer overflow. 80 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
85 (Finsert_file_contents): Remove unnecessary code checking fd. 81 (Finsert_file_contents): Remove unnecessary code checking fd.
86 82
@@ -109,8 +105,6 @@
109 * xselect.c (x_get_local_selection, x_handle_property_notify): 105 * xselect.c (x_get_local_selection, x_handle_property_notify):
110 Remove vars that are set but not used. 106 Remove vars that are set but not used.
111 107
1122011-04-01 Paul Eggert <eggert@cs.ucla.edu>
113
114 * xfns.c (x_create_tip_frame): Remove var that is set but not used. 108 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
115 (make_invisible_cursor): Initialize a possibly-uninitialized variable. 109 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
116 110
@@ -149,6 +143,43 @@
149 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on 143 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
150 ../lib/careadlinkat.h. 144 ../lib/careadlinkat.h.
151 145
1462011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
147
148 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
149 first non-nil return value).
150
1512011-04-03 Jan Djärv <jan.h.d@swipnet.se>
152
153 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
154 if not defined (Bug#8403).
155
1562011-04-02 Juanma Barranquero <lekktu@gmail.com>
157
158 * xdisp.c (display_count_lines): Remove parameter `start',
159 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
160 (get_char_face_and_encoding): Remove parameter `multibyte_p',
161 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
162 (fill_stretch_glyph_string): Remove parameters `row' and `area',
163 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
164 and thereabouts. All callers changed.
165 (get_per_char_metric): Remove parameter `f', unused since
166 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
167
1682011-04-02 Jim Meyering <meyering@redhat.com>
169
170 do not dereference NULL upon failed strdup
171 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
172 (ns_get_family): Likewise.
173
1742011-04-02 Juanma Barranquero <lekktu@gmail.com>
175
176 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
177
1782011-04-02 Jan Djärv <jan.h.d@swipnet.se>
179
180 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
181 later (Bug#8403).
182
1522011-04-01 Stefan Monnier <monnier@iro.umontreal.ca> 1832011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
153 184
154 Add lexical binding. 185 Add lexical binding.
diff --git a/src/eval.c b/src/eval.c
index 25afe7677f7..d1a63a76767 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1297,7 +1297,7 @@ unwind_to_catch (struct catchtag *catch, Lisp_Object value)
1297 byte_stack_list = catch->byte_stack; 1297 byte_stack_list = catch->byte_stack;
1298 gcprolist = catch->gcpro; 1298 gcprolist = catch->gcpro;
1299#ifdef DEBUG_GCPRO 1299#ifdef DEBUG_GCPRO
1300 gcpro_level = gcprolist ? gcprolist->level + 1 : gcpro_level = 0; 1300 gcpro_level = gcprolist ? gcprolist->level + 1 : 0;
1301#endif 1301#endif
1302 backtrace_list = catch->backlist; 1302 backtrace_list = catch->backlist;
1303 lisp_eval_depth = catch->lisp_eval_depth; 1303 lisp_eval_depth = catch->lisp_eval_depth;
diff --git a/src/keyboard.c b/src/keyboard.c
index f38c1c88a7e..ae4fddb2c89 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1870,7 +1870,8 @@ safe_run_hook_funcall (size_t nargs, Lisp_Object *args)
1870 else 1870 else
1871 Vinhibit_quit = Fcons (Vinhibit_quit, args[0]); 1871 Vinhibit_quit = Fcons (Vinhibit_quit, args[0]);
1872 1872
1873 return internal_condition_case (safe_run_hooks_1, Qt, safe_run_hooks_error); 1873 internal_condition_case (safe_run_hooks_1, Qt, safe_run_hooks_error);
1874 return Qnil;
1874} 1875}
1875 1876
1876/* If we get an error while running the hook, cause the hook variable 1877/* If we get an error while running the hook, cause the hook variable
diff --git a/src/nsfont.m b/src/nsfont.m
index 68cd19da70e..48d40223553 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -100,7 +100,7 @@ ns_get_family (Lisp_Object font_spec)
100 return nil; 100 return nil;
101 else 101 else
102 { 102 {
103 char *tmp = strdup (SDATA (SYMBOL_NAME (tem))); 103 char *tmp = xstrdup (SDATA (SYMBOL_NAME (tem)));
104 NSString *family; 104 NSString *family;
105 ns_unescape_name (tmp); 105 ns_unescape_name (tmp);
106 family = [NSString stringWithUTF8String: tmp]; 106 family = [NSString stringWithUTF8String: tmp];
@@ -176,7 +176,7 @@ ns_descriptor_to_entity (NSFontDescriptor *desc,
176 if (family == nil) 176 if (family == nil)
177 family = [[NSFont userFixedPitchFontOfSize: 0] familyName]; 177 family = [[NSFont userFixedPitchFontOfSize: 0] familyName];
178 178
179 escapedFamily = strdup ([family UTF8String]); 179 escapedFamily = xstrdup ([family UTF8String]);
180 ns_escape_name (escapedFamily); 180 ns_escape_name (escapedFamily);
181 181
182 ASET (font_entity, FONT_TYPE_INDEX, Qns); 182 ASET (font_entity, FONT_TYPE_INDEX, Qns);
@@ -1526,4 +1526,3 @@ syms_of_nsfont (void)
1526 DEFVAR_LISP ("ns-reg-to-script", Vns_reg_to_script, 1526 DEFVAR_LISP ("ns-reg-to-script", Vns_reg_to_script,
1527 doc: /* Internal use: maps font registry to unicode script. */); 1527 doc: /* Internal use: maps font registry to unicode script. */);
1528} 1528}
1529
diff --git a/src/nsterm.m b/src/nsterm.m
index 91f0cbba585..c4756dc83cd 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -583,6 +583,11 @@ ns_menu_bar_should_be_hidden (void)
583static void 583static void
584ns_update_auto_hide_menu_bar (void) 584ns_update_auto_hide_menu_bar (void)
585{ 585{
586#ifndef MAC_OS_X_VERSION_10_6
587#define MAC_OS_X_VERSION_10_6 1060
588#endif
589#ifdef NS_IMPL_COCOA
590#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
586 BLOCK_INPUT; 591 BLOCK_INPUT;
587 592
588 NSTRACE (ns_update_auto_hide_menu_bar); 593 NSTRACE (ns_update_auto_hide_menu_bar);
@@ -615,6 +620,8 @@ ns_update_auto_hide_menu_bar (void)
615 } 620 }
616 621
617 UNBLOCK_INPUT; 622 UNBLOCK_INPUT;
623#endif
624#endif
618} 625}
619 626
620 627
diff --git a/src/xdisp.c b/src/xdisp.c
index 3c9d38536bb..e6a7f4254ef 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -824,8 +824,7 @@ static int display_mode_element (struct it *, int, int, int, Lisp_Object, Lisp_O
824static int store_mode_line_string (const char *, Lisp_Object, int, int, int, Lisp_Object); 824static int store_mode_line_string (const char *, Lisp_Object, int, int, int, Lisp_Object);
825static const char *decode_mode_spec (struct window *, int, int, Lisp_Object *); 825static const char *decode_mode_spec (struct window *, int, int, Lisp_Object *);
826static void display_menu_bar (struct window *); 826static void display_menu_bar (struct window *);
827static int display_count_lines (EMACS_INT, EMACS_INT, EMACS_INT, int, 827static int display_count_lines (EMACS_INT, EMACS_INT, int, EMACS_INT *);
828 EMACS_INT *);
829static int display_string (const char *, Lisp_Object, Lisp_Object, 828static int display_string (const char *, Lisp_Object, Lisp_Object,
830 EMACS_INT, EMACS_INT, struct it *, int, int, int, int); 829 EMACS_INT, EMACS_INT, struct it *, int, int, int, int);
831static void compute_line_metrics (struct it *); 830static void compute_line_metrics (struct it *);
@@ -19481,7 +19480,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
19481 } 19480 }
19482 19481
19483 /* Count lines from base line to window start position. */ 19482 /* Count lines from base line to window start position. */
19484 nlines = display_count_lines (linepos, linepos_byte, 19483 nlines = display_count_lines (linepos_byte,
19485 startpos_byte, 19484 startpos_byte,
19486 startpos, &junk); 19485 startpos, &junk);
19487 19486
@@ -19510,7 +19509,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
19510 limit_byte = CHAR_TO_BYTE (limit); 19509 limit_byte = CHAR_TO_BYTE (limit);
19511 } 19510 }
19512 19511
19513 nlines = display_count_lines (startpos, startpos_byte, 19512 nlines = display_count_lines (startpos_byte,
19514 limit_byte, 19513 limit_byte,
19515 - (height * 2 + 30), 19514 - (height * 2 + 30),
19516 &position); 19515 &position);
@@ -19529,7 +19528,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
19529 } 19528 }
19530 19529
19531 /* Now count lines from the start pos to point. */ 19530 /* Now count lines from the start pos to point. */
19532 nlines = display_count_lines (startpos, startpos_byte, 19531 nlines = display_count_lines (startpos_byte,
19533 PT_BYTE, PT, &junk); 19532 PT_BYTE, PT, &junk);
19534 19533
19535 /* Record that we did display the line number. */ 19534 /* Record that we did display the line number. */
@@ -19699,14 +19698,14 @@ decode_mode_spec (struct window *w, register int c, int field_width,
19699} 19698}
19700 19699
19701 19700
19702/* Count up to COUNT lines starting from START / START_BYTE. 19701/* Count up to COUNT lines starting from START_BYTE.
19703 But don't go beyond LIMIT_BYTE. 19702 But don't go beyond LIMIT_BYTE.
19704 Return the number of lines thus found (always nonnegative). 19703 Return the number of lines thus found (always nonnegative).
19705 19704
19706 Set *BYTE_POS_PTR to 1 if we found COUNT lines, 0 if we hit LIMIT. */ 19705 Set *BYTE_POS_PTR to 1 if we found COUNT lines, 0 if we hit LIMIT. */
19707 19706
19708static int 19707static int
19709display_count_lines (EMACS_INT start, EMACS_INT start_byte, 19708display_count_lines (EMACS_INT start_byte,
19710 EMACS_INT limit_byte, int count, 19709 EMACS_INT limit_byte, int count,
19711 EMACS_INT *byte_pos_ptr) 19710 EMACS_INT *byte_pos_ptr)
19712{ 19711{
@@ -20470,16 +20469,15 @@ append_glyph_string (struct glyph_string **head, struct glyph_string **tail,
20470} 20469}
20471 20470
20472 20471
20473/* Get face and two-byte form of character C in face FACE_ID on frame 20472/* Get face and two-byte form of character C in face FACE_ID on frame F.
20474 F. The encoding of C is returned in *CHAR2B. MULTIBYTE_P non-zero 20473 The encoding of C is returned in *CHAR2B. DISPLAY_P non-zero means
20475 means we want to display multibyte text. DISPLAY_P non-zero means
20476 make sure that X resources for the face returned are allocated. 20474 make sure that X resources for the face returned are allocated.
20477 Value is a pointer to a realized face that is ready for display if 20475 Value is a pointer to a realized face that is ready for display if
20478 DISPLAY_P is non-zero. */ 20476 DISPLAY_P is non-zero. */
20479 20477
20480static INLINE struct face * 20478static INLINE struct face *
20481get_char_face_and_encoding (struct frame *f, int c, int face_id, 20479get_char_face_and_encoding (struct frame *f, int c, int face_id,
20482 XChar2b *char2b, int multibyte_p, int display_p) 20480 XChar2b *char2b, int display_p)
20483{ 20481{
20484 struct face *face = FACE_FROM_ID (f, face_id); 20482 struct face *face = FACE_FROM_ID (f, face_id);
20485 20483
@@ -20599,7 +20597,7 @@ fill_composite_glyph_string (struct glyph_string *s, struct face *base_face,
20599 -1, Qnil); 20597 -1, Qnil);
20600 20598
20601 face = get_char_face_and_encoding (s->f, c, face_id, 20599 face = get_char_face_and_encoding (s->f, c, face_id,
20602 s->char2b + i, 1, 1); 20600 s->char2b + i, 1);
20603 if (face) 20601 if (face)
20604 { 20602 {
20605 if (! s->face) 20603 if (! s->face)
@@ -20798,15 +20796,13 @@ fill_image_glyph_string (struct glyph_string *s)
20798 20796
20799/* Fill glyph string S from a sequence of stretch glyphs. 20797/* Fill glyph string S from a sequence of stretch glyphs.
20800 20798
20801 ROW is the glyph row in which the glyphs are found, AREA is the 20799 START is the index of the first glyph to consider,
20802 area within the row. START is the index of the first glyph to 20800 END is the index of the last + 1.
20803 consider, END is the index of the last + 1.
20804 20801
20805 Value is the index of the first glyph not in S. */ 20802 Value is the index of the first glyph not in S. */
20806 20803
20807static int 20804static int
20808fill_stretch_glyph_string (struct glyph_string *s, struct glyph_row *row, 20805fill_stretch_glyph_string (struct glyph_string *s, int start, int end)
20809 enum glyph_row_area area, int start, int end)
20810{ 20806{
20811 struct glyph *glyph, *last; 20807 struct glyph *glyph, *last;
20812 int voffset, face_id; 20808 int voffset, face_id;
@@ -20840,7 +20836,7 @@ fill_stretch_glyph_string (struct glyph_string *s, struct glyph_row *row,
20840} 20836}
20841 20837
20842static struct font_metrics * 20838static struct font_metrics *
20843get_per_char_metric (struct frame *f, struct font *font, XChar2b *char2b) 20839get_per_char_metric (struct font *font, XChar2b *char2b)
20844{ 20840{
20845 static struct font_metrics metrics; 20841 static struct font_metrics metrics;
20846 unsigned code = (XCHAR2B_BYTE1 (char2b) << 8) | XCHAR2B_BYTE2 (char2b); 20842 unsigned code = (XCHAR2B_BYTE1 (char2b) << 8) | XCHAR2B_BYTE2 (char2b);
@@ -20868,7 +20864,7 @@ x_get_glyph_overhangs (struct glyph *glyph, struct frame *f, int *left, int *rig
20868 struct font_metrics *pcm; 20864 struct font_metrics *pcm;
20869 20865
20870 face = get_glyph_face_and_encoding (f, glyph, &char2b, NULL); 20866 face = get_glyph_face_and_encoding (f, glyph, &char2b, NULL);
20871 if (face->font && (pcm = get_per_char_metric (f, face->font, &char2b))) 20867 if (face->font && (pcm = get_per_char_metric (face->font, &char2b)))
20872 { 20868 {
20873 if (pcm->rbearing > pcm->width) 20869 if (pcm->rbearing > pcm->width)
20874 *right = pcm->rbearing - pcm->width; 20870 *right = pcm->rbearing - pcm->width;
@@ -21102,7 +21098,7 @@ compute_overhangs_and_x (struct glyph_string *s, int x, int backward_p)
21102 { \ 21098 { \
21103 s = (struct glyph_string *) alloca (sizeof *s); \ 21099 s = (struct glyph_string *) alloca (sizeof *s); \
21104 INIT_GLYPH_STRING (s, NULL, w, row, area, START, HL); \ 21100 INIT_GLYPH_STRING (s, NULL, w, row, area, START, HL); \
21105 START = fill_stretch_glyph_string (s, row, area, START, END); \ 21101 START = fill_stretch_glyph_string (s, START, END); \
21106 append_glyph_string (&HEAD, &TAIL, s); \ 21102 append_glyph_string (&HEAD, &TAIL, s); \
21107 s->x = (X); \ 21103 s->x = (X); \
21108 } \ 21104 } \
@@ -22475,7 +22471,7 @@ x_produce_glyphs (struct it *it)
22475 22471
22476 if (get_char_glyph_code (it->char_to_display, font, &char2b)) 22472 if (get_char_glyph_code (it->char_to_display, font, &char2b))
22477 { 22473 {
22478 pcm = get_per_char_metric (it->f, font, &char2b); 22474 pcm = get_per_char_metric (font, &char2b);
22479 if (pcm->width == 0 22475 if (pcm->width == 0
22480 && pcm->rbearing == 0 && pcm->lbearing == 0) 22476 && pcm->rbearing == 0 && pcm->lbearing == 0)
22481 pcm = NULL; 22477 pcm = NULL;
@@ -22777,8 +22773,8 @@ x_produce_glyphs (struct it *it)
22777 if (! font_not_found_p) 22773 if (! font_not_found_p)
22778 { 22774 {
22779 get_char_face_and_encoding (it->f, c, it->face_id, 22775 get_char_face_and_encoding (it->f, c, it->face_id,
22780 &char2b, it->multibyte_p, 0); 22776 &char2b, 0);
22781 pcm = get_per_char_metric (it->f, font, &char2b); 22777 pcm = get_per_char_metric (font, &char2b);
22782 } 22778 }
22783 22779
22784 /* Initialize the bounding box. */ 22780 /* Initialize the bounding box. */
@@ -22838,8 +22834,8 @@ x_produce_glyphs (struct it *it)
22838 else 22834 else
22839 { 22835 {
22840 get_char_face_and_encoding (it->f, ch, face_id, 22836 get_char_face_and_encoding (it->f, ch, face_id,
22841 &char2b, it->multibyte_p, 0); 22837 &char2b, 0);
22842 pcm = get_per_char_metric (it->f, font, &char2b); 22838 pcm = get_per_char_metric (font, &char2b);
22843 } 22839 }
22844 if (! pcm) 22840 if (! pcm)
22845 cmp->offsets[i * 2] = cmp->offsets[i * 2 + 1] = 0; 22841 cmp->offsets[i * 2] = cmp->offsets[i * 2 + 1] = 0;