Merge from mainline.

This commit is contained in:
Paul Eggert 2011-04-04 23:45:27 -07:00
commit ca23cc8840
42 changed files with 577 additions and 363 deletions

View file

@ -349,6 +349,7 @@ between applications.
*** To return to the previous behavior, do the following:
**** Change `select-active-regions' to nil.
**** Change `mouse-drag-copy-region' to t.
**** Change `x-select-enable-primary' to t (on X only).
**** Change `x-select-enable-clipboard' to nil.
@ -773,6 +774,12 @@ sc.el, x-menu.el, rnews.el, rnewspost.el
* Lisp changes in Emacs 24.1
** `open-network-stream' can now be used to open an encrypted stream.
It now accepts an optional `:type' parameter for initiating a TLS
connection, directly or via STARTTLS. To do STARTTLS, additional
parameters (`:end-of-command', `:success', `:capabilities-command')
must also be supplied.
** Code can now use lexical scoping by default instead of dynamic scoping.
The `lexical-binding' variable lets code use lexical scoping for local
variables. It is typically set via file-local variables, in which case it

View file

@ -1,3 +1,98 @@
2011-04-05 Deniz Dogan <deniz@dogan.se>
* net/rcirc.el: Update my e-mail address.
(rcirc-mode-map): Remove M-o binding.
2011-04-05 Chong Yidong <cyd@stupidchicken.com>
* startup.el (command-line): Save the cursor's theme-face
directly, instead of using face-override-spec.
* custom.el (load-theme): Minor optimization in assigning faces.
2011-04-04 Juanma Barranquero <lekktu@gmail.com>
* help-fns.el (describe-variable): Complete all variables having
documentation, including keywords.
http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00112.html
2011-04-04 Juanma Barranquero <lekktu@gmail.com>
Convert to lexical-binding.
* bs.el (bs-refresh, bs-sort-buffer-interns-are-last)
(bs--get-marked-string, bs--get-modified-string)
(bs--get-readonly-string, bs--get-size-string, bs--get-name)
(bs--get-mode-name, bs--get-file-name): Mark unused arguments.
(bs--configuration-name-for-prefix-arg): Rename argument PREFIX-ARG.
* ehelp.el (electric-help-execute-extended)
(electric-help-ctrl-x-prefix):
* hexl.el (hexl-revert-buffer-function):
* linum.el (linum-after-change, linum-after-scroll):
* emacs-lisp/re-builder.el (reb-auto-update): Mark unused arguments.
* help-fns.el (help-describe-category-set): Remove unused ERR variable.
2011-04-04 Daiki Ueno <ueno@unixuser.org>
* epa-dired.el:
* epa-mail.el:
* epa-hook.el:
* epa-file.el:
* epa.el:
* epg.el: Use lexical binding.
2011-04-03 Chong Yidong <cyd@stupidchicken.com>
* dired-aux.el (dired-create-files): Add docstring (Bug#7970).
* textmodes/flyspell.el (flyspell-word): Recognize default
dictionary case for flyspell-mark-duplications-exceptions. Use
regexp matching for languages.
(flyspell-mark-duplications-exceptions): Add "that" and "had" for
default dictionary (Bug#7926).
2011-04-02 Chong Yidong <cyd@stupidchicken.com>
* emacs-lisp/package.el (package--with-work-buffer): Recognize
https URLs.
* net/network-stream.el: Move from gnus/proto-stream.el. Change
prefix to network-stream throughout.
(open-protocol-stream): Merge into open-network-stream, leaving
open-protocol-stream as an alias. Handle nil BUFFER args.
* subr.el (open-network-stream): Move to net/network-stream.el.
2011-04-02 Glenn Morris <rgm@gnu.org>
* find-dired.el (find-exec-terminator): New option.
(find-ls-option): Test for -ls support.
(find-ls-subdir-switches): Test for -b in find-ls-option.
(find-dired, find-grep-dired): Doc fixes.
(find-dired): Use find-exec-terminator.
* find-dired.el (find-ls-option, find-ls-subdir-switches)
(find-grep-options): Do not autoload these defcustoms, remove purecopy.
(find-name-arg): Remove purecopy.
* progmodes/grep.el (grep-find-use-xargs): Doc fix.
(grep-compute-defaults): Check for `-exec COMMAND +' support.
Set grep-find-use-xargs, grep-find-command, and grep-find-template
accordingly. Don't add the null-device if not needed.
* files.el (save-some-buffers): Doc fix.
2011-04-02 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in (EMACS): Default to ../src/$(BLD)/emacs.exe.
2011-04-01 Juanma Barranquero <lekktu@gmail.com>
* progmodes/idlwave.el (idlwave-one-key-select, idlwave-list-abbrevs):
Use `dolist' rather than `mapcar'.
2011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
Add lexical binding.
@ -182,14 +277,14 @@
* textmodes/css.el:
* startup.el:
* uniquify.el:
* minibuffer.el:
* newcomment.el:
* reveal.el:
* server.el:
* mpc.el:
* emacs-lisp/smie.el:
* doc-view.el:
* dired.el:
* minibuffer.el:
* newcomment.el:
* reveal.el:
* server.el:
* mpc.el:
* emacs-lisp/smie.el:
* doc-view.el:
* dired.el:
* abbrev.el: Use lexical binding.
2011-04-01 Eli Zaretskii <eliz@gnu.org>
@ -203,7 +298,7 @@
2011-03-31 Tassilo Horn <tassilo@member.fsf.org>
* net/rcirc.el (rcirc-handler-001): Only authenticate, if there's
an entry for that server in rcirc-authinfo. (Bug#8385)
an entry for that server in rcirc-authinfo. (Bug#8385)
2011-03-31 Glenn Morris <rgm@gnu.org>

View file

@ -1,4 +1,4 @@
;;; bs.el --- menu for selecting and displaying buffers
;;; bs.el --- menu for selecting and displaying buffers -*- lexical-binding: t -*-
;; Copyright (C) 1998-2011 Free Software Foundation, Inc.
;; Author: Olaf Sylvester <Olaf.Sylvester@netsurf.de>
@ -693,7 +693,7 @@ Refresh whole Buffer Selection Menu."
(call-interactively 'bs-set-configuration)
(bs--redisplay t))
(defun bs-refresh (&rest ignored)
(defun bs-refresh (&rest _ignored)
"Refresh whole Buffer Selection Menu.
Arguments are IGNORED (for `revert-buffer')."
(interactive)
@ -1017,7 +1017,7 @@ A value of t means BUFFER belongs to no file.
A value of nil means BUFFER belongs to a file."
(not (buffer-file-name buffer)))
(defun bs-sort-buffer-interns-are-last (b1 b2)
(defun bs-sort-buffer-interns-are-last (_b1 b2)
"Function for sorting internal buffers at the end of all buffers."
(string-match-p "^\\*" (buffer-name b2)))
@ -1262,7 +1262,7 @@ or a string."
fun)
(t (apply fun args))))
(defun bs--get-marked-string (start-buffer all-buffers)
(defun bs--get-marked-string (start-buffer _all-buffers)
"Return a string which describes whether current buffer is marked.
START-BUFFER is the buffer where we started buffer selection.
ALL-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',
(t
bs-string-show-always)))
(defun bs--get-modified-string (start-buffer all-buffers)
(defun bs--get-modified-string (_start-buffer _all-buffers)
"Return a string which describes whether current buffer is modified.
START-BUFFER is the buffer where we started buffer selection.
ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu."
(if (buffer-modified-p) "*" " "))
(defun bs--get-readonly-string (start-buffer all-buffers)
(defun bs--get-readonly-string (_start-buffer _all-buffers)
"Return a string which describes whether current buffer is read only.
START-BUFFER is the buffer where we started buffer selection.
ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu."
(if buffer-read-only "%" " "))
(defun bs--get-size-string (start-buffer all-buffers)
(defun bs--get-size-string (_start-buffer _all-buffers)
"Return a string which describes the size of current buffer.
START-BUFFER is the buffer where we started buffer selection.
ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu."
(int-to-string (buffer-size)))
(defun bs--get-name (start-buffer all-buffers)
(defun bs--get-name (_start-buffer _all-buffers)
"Return name of current buffer for Buffer Selection Menu.
The name of current buffer gets additional text properties
for mouse highlighting.
@ -1315,13 +1315,13 @@ ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu."
'help-echo "mouse-2: select this buffer, mouse-3: select in other frame"
'mouse-face 'highlight))
(defun bs--get-mode-name (start-buffer all-buffers)
(defun bs--get-mode-name (start-buffer _all-buffers)
"Return the name of mode of current buffer for Buffer Selection Menu.
START-BUFFER is the buffer where we started buffer selection.
ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu."
(format-mode-line mode-name nil nil start-buffer))
(defun bs--get-file-name (start-buffer all-buffers)
(defun bs--get-file-name (_start-buffer _all-buffers)
"Return string for column 'File' in Buffer Selection Menu.
This is the variable `buffer-file-name' of current buffer.
If not visiting a file, `list-buffers-directory' is returned instead.
@ -1420,18 +1420,18 @@ for buffer selection."
(bs-show-in-buffer liste)
(bs-message-without-log "%s" (bs--current-config-message)))))
(defun bs--configuration-name-for-prefix-arg (prefix-arg)
"Convert prefix argument PREFIX-ARG to a name of a buffer configuration.
If PREFIX-ARG is nil return `bs-default-configuration'.
If PREFIX-ARG is an integer return PREFIX-ARG element of `bs-configurations'.
(defun bs--configuration-name-for-prefix-arg (prefix)
"Convert prefix argument PREFIX to a name of a buffer configuration.
If PREFIX is nil return `bs-default-configuration'.
If PREFIX is an integer return PREFIX element of `bs-configurations'.
Otherwise return `bs-alternative-configuration'."
(cond ;; usually activation
((null prefix-arg)
((null prefix)
bs-default-configuration)
;; call with integer as prefix argument
((integerp prefix-arg)
(if (and (< 0 prefix-arg) (<= prefix-arg (length bs-configurations)))
(car (nth (1- prefix-arg) bs-configurations))
((integerp prefix)
(if (and (< 0 prefix) (<= prefix (length bs-configurations)))
(car (nth (1- prefix) bs-configurations))
bs-default-configuration))
;; call by prefix argument C-u
(t bs-alternative-configuration)))

View file

@ -1151,6 +1151,20 @@ Return t if THEME was successfully loaded, nil otherwise."
(custom-theme-load-confirm hash))
(let ((custom--inhibit-theme-enable t))
(eval-buffer))
;; Optimization: if the theme changes the `default' face, put that
;; entry first. This avoids some `frame-set-background-mode' rigmarole
;; by assigning the new background immediately.
(let* ((settings (get theme 'theme-settings))
(tail settings)
found)
(while (and tail (not found))
(and (eq (nth 0 (car tail)) 'theme-face)
(eq (nth 1 (car tail)) 'default)
(setq found (car tail)))
(setq tail (cdr tail)))
(if found
(put theme 'theme-settings (cons found (delq found settings)))))
;; Finally, enable the theme.
(unless no-enable
(enable-theme theme))
t))))

View file

@ -1363,33 +1363,28 @@ Special value `always' suppresses confirmation."
;; The basic function for half a dozen variations on cp/mv/ln/ln -s.
(defun dired-create-files (file-creator operation fn-list name-constructor
&optional marker-char)
"Create one or more new files from a list of existing files FN-LIST.
This function also handles querying the user, updating Dired
buffers, and displaying a success or failure message.
;; Create a new file for each from a list of existing files. The user
;; is queried, dired buffers are updated, and at the end a success or
;; failure message is displayed
FILE-CREATOR should be a function. It is called once for each
file in FN-LIST, and must create a new file, querying the user
and updating Dired buffers as necessary. It should accept three
arguments: the old file name, the new name, and an argument
OK-IF-ALREADY-EXISTS with the same meaning as in `copy-file'.
;; FILE-CREATOR must accept three args: oldfile newfile ok-if-already-exists
OPERATION should be a capitalized string describing the operation
performed (e.g. `Copy'). It is used for error logging.
;; It is called for each file and must create newfile, the entry of
;; which will be added. The user will be queried if the file already
;; exists. If oldfile is removed by FILE-CREATOR (i.e, it is a
;; rename), it is FILE-CREATOR's responsibility to update dired
;; buffers. FILE-CREATOR must abort by signaling a file-error if it
;; could not create newfile. The error is caught and logged.
FN-LIST is the list of files to copy (full absolute file names).
;; OPERATION (a capitalized string, e.g. `Copy') describes the
;; operation performed. It is used for error logging.
;; FN-LIST is the list of files to copy (full absolute file names).
;; NAME-CONSTRUCTOR returns a newfile for every oldfile, or nil to
;; skip. If it skips files for other reasons than a direct user
;; query, it is supposed to tell why (using dired-log).
;; Optional MARKER-CHAR is a character with which to mark every
;; newfile's entry, or t to use the current marker character if the
;; oldfile was marked.
NAME-CONSTRUCTOR should be a function accepting a single
argument, the name of an old file, and returning either the
corresponding new file name or nil to skip.
Optional MARKER-CHAR is a character with which to mark every
newfile's entry, or t to use the current marker character if the
old file was marked."
(let (dired-create-files-failures failures
skipped (success-count 0) (total (length fn-list)))
(let (to overwrite-query

View file

@ -3629,7 +3629,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown
;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
;;;;;; dired-diff) "dired-aux" "dired-aux.el" "2d805d6766bd7970cd446413b4ed4ce0")
;;;;;; dired-diff) "dired-aux" "dired-aux.el" "0488aa71a7abdb8dcc9ce90201114ebc")
;;; Generated autoloads from dired-aux.el
(autoload 'dired-diff "dired-aux" "\
@ -3766,7 +3766,7 @@ can be produced by `dired-get-marked-files', for example.
\(fn COMMAND &optional ARG FILE-LIST)" t nil)
(autoload 'dired-run-shell-command "dired-aux" "\
Not documented
\(fn COMMAND)" nil nil)
@ -3785,7 +3785,7 @@ command with a prefix argument (the value does not matter).
\(fn &optional ARG FMT)" t nil)
(autoload 'dired-compress-file "dired-aux" "\
Not documented
\(fn FILE)" nil nil)
@ -3834,12 +3834,12 @@ See Info node `(emacs)Subdir switches' for more details.
\(fn &optional ARG TEST-FOR-SUBDIR)" t nil)
(autoload 'dired-add-file "dired-aux" "\
Not documented
\(fn FILENAME &optional MARKER-CHAR)" nil nil)
(autoload 'dired-remove-file "dired-aux" "\
Not documented
\(fn FILE)" nil nil)
@ -3849,12 +3849,12 @@ Create or update the line for FILE in all Dired buffers it would belong in.
\(fn FILE)" nil nil)
(autoload 'dired-copy-file "dired-aux" "\
Not documented
\(fn FROM TO OK-FLAG)" nil nil)
(autoload 'dired-rename-file "dired-aux" "\
Not documented
\(fn FILE NEWNAME OK-IF-ALREADY-EXISTS)" nil nil)

View file

@ -1,4 +1,4 @@
;;; ehelp.el --- bindings for electric-help mode
;;; ehelp.el --- bindings for electric-help mode -*- lexical-binding: t -*-
;; Copyright (C) 1986, 1995, 2000-2011 Free Software Foundation, Inc.
@ -347,14 +347,14 @@ will select it.)"
;; This is to be bound to M-x in ehelp mode. Retains ehelp buffer and then
;; continues with execute-extended-command.
(defun electric-help-execute-extended (prefixarg)
(defun electric-help-execute-extended (_prefixarg)
(interactive "p")
(setq electric-help-form-to-execute '(execute-extended-command nil))
(electric-help-retain))
;; This is to be buond to C-x in ehelp mode. Retains ehelp buffer and then
;; continues with ctrl-x prefix.
(defun electric-help-ctrl-x-prefix (prefixarg)
(defun electric-help-ctrl-x-prefix (_prefixarg)
(interactive "p")
(setq electric-help-form-to-execute '(progn (message nil) (setq unread-command-char ?\C-x)))
(electric-help-retain))

View file

@ -652,7 +652,7 @@ FILE is the name of a file relative to that base location.
This macro retrieves FILE from LOCATION into a temporary buffer,
and evaluates BODY while that buffer is current. This work
buffer is killed afterwards. Return the last value in BODY."
`(let* ((http (string-match "\\`http:" ,location))
`(let* ((http (string-match "\\`https?:" ,location))
(buffer
(if http
(url-retrieve-synchronously (concat ,location ,file))

View file

@ -1,4 +1,4 @@
;;; re-builder.el --- building Regexps with visual feedback
;;; re-builder.el --- building Regexps with visual feedback -*- lexical-binding: t -*-
;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
@ -506,7 +506,7 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions."
(reb-update-regexp)
(reb-update-overlays subexp))
(defun reb-auto-update (beg end lenold &optional force)
(defun reb-auto-update (_beg _end _lenold &optional force)
"Called from `after-update-functions' to update the display.
BEG, END and LENOLD are passed in from the hook.
An actual update is only done if the regexp has changed or if the

View file

@ -1,4 +1,4 @@
;;; epa-dired.el --- the EasyPG Assistant, dired extension
;;; epa-dired.el --- the EasyPG Assistant, dired extension -*- lexical-binding: t -*-
;; Copyright (C) 2006-2011 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>

View file

@ -1,4 +1,4 @@
;;; epa-file.el --- the EasyPG Assistant, transparent file encryption
;;; epa-file.el --- the EasyPG Assistant, transparent file encryption -*- lexical-binding: t -*-
;; Copyright (C) 2006-2011 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>

View file

@ -1,4 +1,4 @@
;;; epa-hook.el --- preloaded code to enable epa-file.el
;;; epa-hook.el --- preloaded code to enable epa-file.el -*- lexical-binding: t -*-
;; Copyright (C) 2006-2011 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>

View file

@ -1,4 +1,4 @@
;;; epa-mail.el --- the EasyPG Assistant, minor-mode for mail composer
;;; epa-mail.el --- the EasyPG Assistant, minor-mode for mail composer -*- lexical-binding: t -*-
;; Copyright (C) 2006-2011 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
@ -117,7 +117,7 @@ Don't use this command in Lisp programs!"
(save-excursion
(let ((verbose current-prefix-arg)
(context (epg-make-context epa-protocol))
recipients-string recipients recipient-key)
recipients-string recipients recipient-key sign)
(goto-char (point-min))
(save-restriction
(narrow-to-region (point)

View file

@ -1,4 +1,4 @@
;;; epa.el --- the EasyPG Assistant
;;; epa.el --- the EasyPG Assistant -*- lexical-binding: t -*-
;; Copyright (C) 2006-2011 Free Software Foundation, Inc.
@ -269,7 +269,7 @@ You should bind this variable with `let', but do not set it globally.")
:action 'epa--key-widget-action
:help-echo 'epa--key-widget-help-echo)
(defun epa--key-widget-action (widget &optional event)
(defun epa--key-widget-action (widget &optional _event)
(save-selected-window
(epa--show-key (widget-get widget :value))))
@ -460,7 +460,7 @@ If ARG is non-nil, mark the key."
(list nil)))
(epa--list-keys name t))
(defun epa--key-list-revert-buffer (&optional ignore-auto noconfirm)
(defun epa--key-list-revert-buffer (&optional _ignore-auto _noconfirm)
(apply #'epa--list-keys epa-list-keys-arguments))
(defun epa--marked-keys ()
@ -490,13 +490,13 @@ If ARG is non-nil, mark the key."
- `\\[epa-mark-key]' to mark a key on the line
- `\\[epa-unmark-key]' to unmark a key on the line\n"))
(widget-create 'link
:notify (lambda (&rest ignore) (abort-recursive-edit))
:notify (lambda (&rest _ignore) (abort-recursive-edit))
:help-echo
(substitute-command-keys
"Click here or \\[abort-recursive-edit] to cancel")
"Cancel")
(widget-create 'link
:notify (lambda (&rest ignore) (exit-recursive-edit))
:notify (lambda (&rest _ignore) (exit-recursive-edit))
:help-echo
(substitute-command-keys
"Click here or \\[exit-recursive-edit] to finish")
@ -649,7 +649,7 @@ If SECRET is non-nil, list secret keys instead of public keys."
(format "Passphrase for %s %s: " key-id (cdr entry))
(format "Passphrase for %s: " key-id)))))))
(defun epa-progress-callback-function (context what char current total
(defun epa-progress-callback-function (_context what _char current total
handback)
(message "%s%d%% (%d/%d)" (or handback
(concat what ": "))
@ -964,7 +964,7 @@ See the reason described in the `epa-verify-region' documentation."
(eval-and-compile
(if (fboundp 'select-safe-coding-system)
(defalias 'epa--select-safe-coding-system 'select-safe-coding-system)
(defun epa--select-safe-coding-system (from to)
(defun epa--select-safe-coding-system (_from _to)
buffer-file-coding-system)))
;;;###autoload

View file

@ -1,4 +1,4 @@
;;; epg.el --- the EasyPG Library
;;; epg.el --- the EasyPG Library -*- lexical-binding: t -*-
;; Copyright (C) 1999-2000, 2002-2011 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
@ -1223,7 +1223,7 @@ This function is for internal use only."
(defalias 'epg--decode-coding-string 'decode-coding-string)
(defalias 'epg--decode-coding-string 'identity)))
(defun epg--status-USERID_HINT (context string)
(defun epg--status-USERID_HINT (_context string)
(if (string-match "\\`\\([^ ]+\\) \\(.*\\)" string)
(let* ((key-id (match-string 1 string))
(user-id (match-string 2 string))
@ -1238,14 +1238,14 @@ This function is for internal use only."
(setq epg-user-id-alist (cons (cons key-id user-id)
epg-user-id-alist))))))
(defun epg--status-NEED_PASSPHRASE (context string)
(defun epg--status-NEED_PASSPHRASE (_context string)
(if (string-match "\\`\\([^ ]+\\)" string)
(setq epg-key-id (match-string 1 string))))
(defun epg--status-NEED_PASSPHRASE_SYM (context string)
(defun epg--status-NEED_PASSPHRASE_SYM (_context _string)
(setq epg-key-id 'SYM))
(defun epg--status-NEED_PASSPHRASE_PIN (context string)
(defun epg--status-NEED_PASSPHRASE_PIN (_context _string)
(setq epg-key-id 'PIN))
(eval-and-compile
@ -1308,11 +1308,11 @@ This function is for internal use only."
(if encoded-passphrase-with-new-line
(epg--clear-string encoded-passphrase-with-new-line))))))
(defun epg--prompt-GET_BOOL (context string)
(defun epg--prompt-GET_BOOL (_context string)
(let ((entry (assoc string epg-prompt-alist)))
(y-or-n-p (if entry (cdr entry) (concat string "? ")))))
(defun epg--prompt-GET_BOOL-untrusted_key.override (context string)
(defun epg--prompt-GET_BOOL-untrusted_key.override (_context _string)
(y-or-n-p (if (and (equal (car epg-last-status) "USERID_HINT")
(string-match "\\`\\([^ ]+\\) \\(.*\\)"
(cdr epg-last-status)))
@ -1467,31 +1467,31 @@ This function is for internal use only."
signature
(string-to-number (match-string 7 string) 16)))))
(defun epg--status-TRUST_UNDEFINED (context string)
(defun epg--status-TRUST_UNDEFINED (context _string)
(let ((signature (car (epg-context-result-for context 'verify))))
(if (and signature
(eq (epg-signature-status signature) 'good))
(epg-signature-set-validity signature 'undefined))))
(defun epg--status-TRUST_NEVER (context string)
(defun epg--status-TRUST_NEVER (context _string)
(let ((signature (car (epg-context-result-for context 'verify))))
(if (and signature
(eq (epg-signature-status signature) 'good))
(epg-signature-set-validity signature 'never))))
(defun epg--status-TRUST_MARGINAL (context string)
(defun epg--status-TRUST_MARGINAL (context _string)
(let ((signature (car (epg-context-result-for context 'verify))))
(if (and signature
(eq (epg-signature-status signature) 'marginal))
(epg-signature-set-validity signature 'marginal))))
(defun epg--status-TRUST_FULLY (context string)
(defun epg--status-TRUST_FULLY (context _string)
(let ((signature (car (epg-context-result-for context 'verify))))
(if (and signature
(eq (epg-signature-status signature) 'good))
(epg-signature-set-validity signature 'full))))
(defun epg--status-TRUST_ULTIMATE (context string)
(defun epg--status-TRUST_ULTIMATE (context _string)
(let ((signature (car (epg-context-result-for context 'verify))))
(if (and signature
(eq (epg-signature-status signature) 'good))
@ -1541,10 +1541,10 @@ This function is for internal use only."
(string-to-number (match-string 3 string)))
(epg-context-result-for context 'encrypted-to)))))
(defun epg--status-DECRYPTION_FAILED (context string)
(defun epg--status-DECRYPTION_FAILED (context _string)
(epg-context-set-result-for context 'decryption-failed t))
(defun epg--status-DECRYPTION_OKAY (context string)
(defun epg--status-DECRYPTION_OKAY (context _string)
(epg-context-set-result-for context 'decryption-okay t))
(defun epg--status-NODATA (context string)
@ -1566,13 +1566,13 @@ This function is for internal use only."
(epg--time-from-seconds string)))
(epg-context-result-for context 'error))))
(defun epg--status-KEYREVOKED (context string)
(defun epg--status-KEYREVOKED (context _string)
(epg-context-set-result-for
context 'key
(cons '(key-revoked)
(epg-context-result-for context 'error))))
(defun epg--status-BADARMOR (context string)
(defun epg--status-BADARMOR (context _string)
(epg-context-set-result-for
context 'error
(cons '(bad-armor)
@ -1589,7 +1589,7 @@ This function is for internal use only."
(match-string 2 string)))
(epg-context-result-for context 'error)))))
(defun epg--status-NO_RECP (context string)
(defun epg--status-NO_RECP (context _string)
(epg-context-set-result-for
context 'error
(cons '(no-recipients)
@ -1626,13 +1626,13 @@ This function is for internal use only."
(cons 'fingerprint (match-string 2 string)))
(epg-context-result-for context 'generate-key)))))
(defun epg--status-KEY_NOT_CREATED (context string)
(defun epg--status-KEY_NOT_CREATED (context _string)
(epg-context-set-result-for
context 'error
(cons '(key-not-created)
(epg-context-result-for context 'error))))
(defun epg--status-IMPORTED (context string)
(defun epg--status-IMPORTED (_context string)
(if (string-match "\\`\\([^ ]+\\) \\(.*\\)" string)
(let* ((key-id (match-string 1 string))
(user-id (match-string 2 string))
@ -1694,7 +1694,7 @@ This function is for internal use only."
(epg-context-result-for context 'import-status)))
(epg-context-set-result-for context 'import-status nil)))
(defun epg-passphrase-callback-function (context key-id handback)
(defun epg-passphrase-callback-function (context key-id _handback)
(if (eq key-id 'SYM)
(read-passwd "Passphrase for symmetric encryption: "
(eq (epg-context-operation context) 'encrypt))

View file

@ -4607,6 +4607,9 @@ You can answer `y' to save, `n' not to save, `C-r' to look at the
buffer in question with `view-buffer' before deciding or `d' to
view the differences using `diff-buffer-with-file'.
This command first saves any buffers where `buffer-save-without-query' is
non-nil, without asking.
Optional argument (the prefix) non-nil means save all with no questions.
Optional second argument PRED determines which buffers are considered:
If PRED is nil, all the file-visiting buffers are considered.

View file

@ -33,36 +33,62 @@
:group 'dired
:prefix "find-")
;; FIXME this option does not really belong in this file, it's more general.
;; Eg cf some tests in grep.el.
(defcustom find-exec-terminator
(if (eq 0
(ignore-errors
(process-file find-program nil nil nil
null-device "-exec" "echo" "{}" "+")))
"+"
(shell-quote-argument ";"))
"String that terminates \"find -exec COMMAND {} \".
The value should include any needed quoting for the shell.
Common values are \"+\" and \"\\\\;\", with the former more efficient
than the latter."
:version "24.1"
:group 'find-dired
:type 'string)
;; find's -ls corresponds to these switches.
;; Note -b, at least GNU find quotes spaces etc. in filenames
;;;###autoload
(defcustom find-ls-option
(if (eq system-type 'berkeley-unix) (purecopy '("-ls" . "-gilsb"))
(purecopy '("-exec ls -ld {} \\;" . "-ld")))
(if (eq 0
(ignore-errors
(process-file find-program nil nil nil null-device "-ls")))
(cons "-ls"
(if (eq system-type 'berkeley-unix)
"-gilsb"
"-dilsb"))
(cons
(format "-exec ls -ld {} %s" find-exec-terminator)
"-ld"))
"Description of the option to `find' to produce an `ls -l'-type listing.
This is a cons of two strings (FIND-OPTION . LS-SWITCHES). FIND-OPTION
gives the option (or options) to `find' that produce the desired output.
LS-SWITCHES is a list of `ls' switches to tell dired how to parse the output."
:version "24.1" ; add tests for -ls and -exec + support
:type '(cons (string :tag "Find Option")
(string :tag "Ls Switches"))
:group 'find-dired)
;;;###autoload
(defcustom find-ls-subdir-switches (purecopy "-al")
(defcustom find-ls-subdir-switches
(if (string-match "-[a-z]*b" (cdr find-ls-option))
"-alb"
"-al")
"`ls' switches for inserting subdirectories in `*Find*' buffers.
This should contain the \"-l\" switch.
Use the \"-F\" or \"-b\" switches if and only if you also use
them for `find-ls-option'."
:version "24.1" ; add -b test
:type 'string
:group 'find-dired
:version "22.1")
:group 'find-dired)
;;;###autoload
(defcustom find-grep-options
(purecopy (if (or (eq system-type 'berkeley-unix)
(if (or (eq system-type 'berkeley-unix)
(string-match "solaris2" system-configuration)
(string-match "irix" system-configuration))
"-s" "-q"))
"-s" "-q")
"Option to grep to be as silent as possible.
On Berkeley systems, this is `-s'; on Posix, and with GNU grep, `-q' does it.
On 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'."
;; This used to be autoloaded (see bug#4387).
(defcustom find-name-arg
(purecopy (if read-file-name-completion-ignore-case
(if read-file-name-completion-ignore-case
"-iname"
"-name"))
"-name")
"Argument used to specify file name pattern.
If `read-file-name-completion-ignore-case' is non-nil, -iname is used so that
find also ignores case. Otherwise, -name is used."
@ -92,12 +118,12 @@ find also ignores case. Otherwise, -name is used."
;;;###autoload
(defun find-dired (dir args)
"Run `find' and go into Dired mode on a buffer of the output.
The command run (after changing into DIR) is
The command run (after changing into DIR) is essentially
find . \\( ARGS \\) -ls
except that the variable `find-ls-option' specifies what to use
as the final argument."
except that the car of the variable `find-ls-option' specifies what to
use in place of \"-ls\" as the final argument."
(interactive (list (read-directory-name "Run find in directory: " nil "" t)
(read-string "Run find (with args): " find-args
'(find-args-history . 1))))
@ -138,11 +164,12 @@ as the final argument."
" " args " "
(shell-quote-argument ")")
" "))
(if (equal (car find-ls-option) "-exec ls -ld {} \\;")
(concat "-exec ls -ld "
(if (string-match "\\`\\(.*\\) {} \\(\\\\;\\|+\\)\\'"
(car find-ls-option))
(format "%s %s %s"
(match-string 1 (car find-ls-option))
(shell-quote-argument "{}")
" "
(shell-quote-argument ";"))
find-exec-terminator)
(car find-ls-option))))
;; Start the find process.
(shell-command (concat args "&") (current-buffer))
@ -216,9 +243,14 @@ The command run (after changing into DIR) is
"Find files in DIR containing a regexp REGEXP and start Dired on output.
The command run (after changing into DIR) is
find . -exec grep -s -e REGEXP {} \\\; -ls
find . \\( -type f -exec `grep-program' `find-grep-options' \\
-e REGEXP {} \\; \\) -ls
Thus ARG can also contain additional grep options."
where the car of the variable `find-ls-option' specifies what to
use in place of \"-ls\" as the final argument."
;; Doc used to say "Thus ARG can also contain additional grep options."
;; i) Presumably ARG == REGEXP?
;; ii) No it can't have options, since it gets shell-quoted.
(interactive "DFind-grep (directory): \nsFind-grep (grep regexp): ")
;; find -exec doesn't allow shell i/o redirections in the command,
;; or we could use `grep -l >/dev/null'
@ -231,6 +263,7 @@ Thus ARG can also contain additional grep options."
" "
(shell-quote-argument "{}")
" "
;; Doesn't work with "+".
(shell-quote-argument ";"))))
(defun find-dired-filter (proc string)

View file

@ -1,8 +1,25 @@
2011-04-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-sum.el (gnus-update-marks): Reinstate the code to not alter
marks on non-selected articles.
2011-04-02 Chong Yidong <cyd@stupidchicken.com>
* proto-stream.el: Move to Emacs core, at net/network-stream.el.
* nnimap.el (nnimap-open-connection-1): Pass explicit :end-of-command
parameter to open-protocol-stream.
2011-04-01 Julien Danjou <julien@danjou.info>
* mm-view.el (mm-display-inline-fontify): Do not fontify with
fundamental-mode.
2011-04-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-start.el (gnus-get-unread-articles): Don't try to contact denied
servers.
2011-03-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-sum.el (gnus-update-marks): Revert intersection change, which

View file

@ -1723,7 +1723,9 @@ If SCAN, request a scan of that group as well."
;; Do the rest of the retrieval.
(dolist (elem type-cache)
(destructuring-bind (method method-type infos early-data) elem
(when (and method infos)
(when (and method infos
(not (eq (gnus-server-status method)
'denied)))
(let ((updatep (gnus-check-backend-function
'request-update-info (car method))))
;; See if any of the groups from this method require updating.

View file

@ -6070,12 +6070,15 @@ If SELECT-ARTICLES, only select those articles from GROUP."
(let* ((old (cdr (assq (cdr type) (gnus-info-marks info))))
;; Don't do anything about marks for articles we
;; didn't actually get any headers for.
(existing (gnus-compress-sequence gnus-newsgroup-articles))
(del
(gnus-remove-from-range (gnus-copy-sequence old) list))
(gnus-list-range-intersection
gnus-newsgroup-articles
(gnus-remove-from-range (gnus-copy-sequence old) list)))
(add
(gnus-remove-from-range
(gnus-copy-sequence list) old)))
(gnus-list-range-intersection
gnus-newsgroup-articles
(gnus-remove-from-range
(gnus-copy-sequence list) old))))
(when add
(push (list add 'add (list (cdr type))) delta-marks))
(when del

View file

@ -31,7 +31,11 @@
(unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(eval-and-compile
(require 'nnheader))
(require 'nnheader)
;; In Emacs 24, `open-protocol-stream' is an autoloaded alias for
;; `make-network-stream'.
(unless (fboundp 'open-protocol-stream)
(require 'proto-stream)))
(eval-when-compile
(require 'cl))
@ -45,7 +49,6 @@
(require 'tls)
(require 'parse-time)
(require 'nnmail)
(require 'proto-stream)
(autoload 'auth-source-forget+ "auth-source")
(autoload 'auth-source-search "auth-source")
@ -365,6 +368,7 @@ textual parts.")
:return-list t
:shell-command nnimap-shell-program
:capability-command "1 CAPABILITY\r\n"
:end-of-command "\r\n"
:success " OK "
:starttls-function
(lambda (capabilities)

View file

@ -27,13 +27,16 @@
;; For Emacs <22.2 and XEmacs.
(eval-and-compile
(unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))
;; In Emacs 24, `open-protocol-stream' is an autoloaded alias for
;; `make-network-stream'.
(unless (fboundp 'open-protocol-stream)
(require 'proto-stream)))
(require 'nnheader)
(require 'nnoo)
(require 'gnus-util)
(require 'gnus)
(require 'proto-stream)
(require 'gnus-group) ;; gnus-group-name-charset
(nnoo-declare nntp)

View file

@ -1,4 +1,4 @@
;;; help-fns.el --- Complex help functions
;;; help-fns.el --- Complex help functions -*- lexical-binding: t -*-
;; Copyright (C) 1985-1986, 1993-1994, 1998-2011
;; Free Software Foundation, Inc.
@ -635,8 +635,8 @@ it is displayed along with the global value."
"Describe variable: ")
obarray
(lambda (vv)
(or (special-variable-p vv)
(get vv 'variable-documentation)))
(or (get vv 'variable-documentation)
(and (boundp vv) (not (keywordp vv)))))
t nil nil
(if (symbolp v) (symbol-name v))))
(list (if (equal val "")
@ -879,7 +879,7 @@ BUFFER defaults to the current buffer."
(insert (cond
((null value) "default")
((char-table-p value) "deeper char-table ...")
(t (condition-case err
(t (condition-case nil
(category-set-mnemonics value)
(error "invalid"))))))

View file

@ -1,4 +1,4 @@
;;; hexl.el --- edit a file in a hex dump format using the hexl filter
;;; hexl.el --- edit a file in a hex dump format using the hexl filter -*- lexical-binding: t -*-
;; Copyright (C) 1989, 1994, 1998, 2001-2011 Free Software Foundation, Inc.
@ -355,7 +355,7 @@ You can use \\[hexl-find-file] to visit a file in Hexl mode.
(hexl-mode--setq-local 'require-final-newline nil)
(hexl-mode--setq-local 'font-lock-defaults '(hexl-font-lock-keywords t))
(hexl-mode--setq-local 'revert-buffer-function
@ -437,7 +437,7 @@ and edit the file in `hexl-mode'."
(if (not (eq major-mode 'hexl-mode))
(hexl-mode)))
(defun hexl-revert-buffer-function (ignore-auto noconfirm)
(defun hexl-revert-buffer-function (_ignore-auto _noconfirm)
(let ((coding-system-for-read 'no-conversion)
revert-buffer-function)
;; Call the original `revert-buffer' without code conversion; also
@ -492,7 +492,7 @@ With arg, don't unhexlify buffer."
;; since some of them may affect the minor modes.
(dolist (mm mms)
(funcall (car mm) (if (cdr mm) 1 -1))))
(force-mode-line-update))
(defun hexl-maybe-dehexlify-buffer ()

View file

@ -1,4 +1,4 @@
;;; linum.el --- display line numbers in the left margin
;;; linum.el --- display line numbers in the left margin -*- lexical-binding: t -*-
;; Copyright (C) 2008-2011 Free Software Foundation, Inc.
@ -174,14 +174,14 @@ and you have to scroll or press \\[recenter-top-bottom] to update the numbers."
(setq line (1+ line)))
(set-window-margins win width (cdr (window-margins win)))))
(defun linum-after-change (beg end len)
(defun linum-after-change (beg end _len)
;; update overlays on deletions, and after newlines are inserted
(when (or (= beg end)
(= end (point-max))
(string-match-p "\n" (buffer-substring-no-properties beg end)))
(linum-update-current)))
(defun linum-after-scroll (win start)
(defun linum-after-scroll (win _start)
(linum-update (window-buffer win)))
;; (defun linum-after-size (frame)

View file

@ -27,9 +27,9 @@ lisp = $(CURDIR)
srcdir = $(CURDIR)/..
# You can specify a different executable on the make command line,
# e.g. "make EMACS=../src/emacs ...".
# e.g. "make EMACS=../bin/emacs ...".
EMACS = $(THISDIR)/../bin/emacs.exe
EMACS = ../src/$(BLD)/emacs.exe
# Command line flags for Emacs.

View file

@ -1,4 +1,4 @@
;;; proto-stream.el --- negotiating TLS, STARTTLS and other connections
;;; network-stream.el --- open network processes, possibly with encryption
;; Copyright (C) 2010-2011 Free Software Foundation, Inc.
@ -22,20 +22,14 @@
;;; Commentary:
;; This library is meant to provide the glue between modules that want
;; to establish a network connection to a server for protocols such as
;; IMAP, NNTP, SMTP and POP3.
;; The main problem is that there's more than a couple of interfaces
;; towards doing this. You have normal, plain connections, which are
;; no trouble at all, but you also have TLS/SSL connections, and you
;; have STARTTLS. Negotiating this for each protocol can be rather
;; tedious, so this library provides a single entry point, and hides
;; much of the ugliness.
;; This library provides the function `open-network-stream', which provides a
;; higher-level interface for opening TCP network processes than the built-in
;; function `make-network-process'. In addition to plain connections, it
;; supports TLS/SSL and STARTTLS connections.
;; Usage example:
;; (open-protocol-stream
;; (open-network-stream
;; "*nnimap*" buffer address port
;; :type 'network
;; :capability-command "1 CAPABILITY\r\n"
@ -55,14 +49,24 @@
(proc type &optional priority-string trustfiles keyfiles))
;;;###autoload
(defun open-protocol-stream (name buffer host service &rest parameters)
"Open a network stream to HOST, possibly with encryption.
(defun open-network-stream (name buffer host service &rest parameters)
"Open a TCP connection to HOST, optionally with encryption.
Normally, return a network process object; with a non-nil
:return-list parameter, return a list instead (see below).
Input and output work as for subprocesses; `delete-process'
closes it.
The first four parameters, NAME, BUFFER, HOST, and SERVICE, have
the same meanings as in `open-network-stream'. The remaining
PARAMETERS should be a sequence of keywords and values:
NAME is the name for the process. It is modified if necessary to
make it unique.
BUFFER is a buffer or buffer name to associate with the process.
Process output goes at end of that buffer. BUFFER may be nil,
meaning that the process is not associated with any buffer.
HOST is the name or IP address of the host to connect to.
SERVICE is the name of the service desired, or an integer specifying
a port number to connect to.
The remaining PARAMETERS should be a sequence of keywords and
values:
:type specifies the connection type, one of the following:
nil or `network'
@ -92,7 +96,6 @@ PARAMETERS should be a sequence of keywords and values:
or `tls' (TLS-encrypted).
:end-of-command specifies a regexp matching the end of a command.
If non-nil, it defaults to \"\\n\".
:success specifies a regexp matching a message indicating a
successful STARTTLS negotiation. For instance, the default
@ -106,6 +109,8 @@ PARAMETERS should be a sequence of keywords and values:
This function should take one parameter, the response to the
capability command, and should return the command to switch on
STARTTLS if the server supports STARTTLS, and nil otherwise."
(unless (featurep 'make-network-process)
(error "Emacs was compiled without networking support"))
(let ((type (plist-get parameters :type))
(return-list (plist-get parameters :return-list)))
(if (and (not return-list)
@ -113,21 +118,24 @@ PARAMETERS should be a sequence of keywords and values:
(and (memq type '(nil network))
(not (and (plist-get parameters :success)
(plist-get parameters :capability-command))))))
;; The simplest case is equivalent to `open-network-stream'.
(open-network-stream name buffer host service)
;; For everything else, refer to proto-stream-open-*.
(unless (plist-get parameters :end-of-command)
(setq parameters (append '(:end-of-command "\r\n") parameters)))
(let* ((connection-function
(cond
((eq type 'plain) 'proto-stream-open-plain)
((memq type '(nil network starttls))
'proto-stream-open-starttls)
((memq type '(tls ssl)) 'proto-stream-open-tls)
((eq type 'shell) 'proto-stream-open-shell)
(t (error "Invalid connection type %s" type))))
(result (funcall connection-function
name buffer host service parameters)))
;; The simplest case: wrapper around `make-network-process'.
(make-network-process :name name :buffer buffer
:host host :service service)
(let ((work-buffer (or buffer
(generate-new-buffer " *stream buffer*")))
(fun (cond ((eq type 'plain) 'network-stream-open-plain)
((memq type '(nil network starttls))
'network-stream-open-starttls)
((memq type '(tls ssl)) 'network-stream-open-tls)
((eq type 'shell) 'network-stream-open-shell)
(t (error "Invalid connection type %s" type))))
result)
(unwind-protect
(setq result (funcall fun name work-buffer host service parameters))
(unless buffer
(and (processp (car result))
(set-process-buffer (car result) nil))
(kill-buffer work-buffer)))
(if return-list
(list (car result)
:greeting (nth 1 result)
@ -135,16 +143,20 @@ PARAMETERS should be a sequence of keywords and values:
:type (nth 3 result))
(car result))))))
(defun proto-stream-open-plain (name buffer host service parameters)
;;;###autoload
(defalias 'open-protocol-stream 'open-network-stream)
(defun network-stream-open-plain (name buffer host service parameters)
(let ((start (with-current-buffer buffer (point)))
(stream (open-network-stream name buffer host service)))
(stream (make-network-process :name name :buffer buffer
:host host :service service)))
(list stream
(proto-stream-get-response stream start
(network-stream-get-response stream start
(plist-get parameters :end-of-command))
nil
'plain)))
(defun proto-stream-open-starttls (name buffer host service parameters)
(defun network-stream-open-starttls (name buffer host service parameters)
(let* ((start (with-current-buffer buffer (point)))
(require-tls (eq (plist-get parameters :type) 'starttls))
(starttls-function (plist-get parameters :starttls-function))
@ -152,11 +164,10 @@ PARAMETERS should be a sequence of keywords and values:
(capability-command (plist-get parameters :capability-command))
(eoc (plist-get parameters :end-of-command))
;; Return (STREAM GREETING CAPABILITIES RESULTING-TYPE)
(stream (open-network-stream name buffer host service))
(greeting (proto-stream-get-response stream start eoc))
(capabilities (when capability-command
(proto-stream-command stream
capability-command eoc)))
(stream (make-network-process :name name :buffer buffer
:host host :service service))
(greeting (network-stream-get-response stream start eoc))
(capabilities (network-stream-command stream capability-command eoc))
(resulting-type 'plain)
starttls-command)
@ -179,9 +190,9 @@ PARAMETERS should be a sequence of keywords and values:
;; care about the identity of the peer.
(cons "--insecure" starttls-extra-arguments))))
(setq stream (starttls-open-stream name buffer host service)))
(proto-stream-get-response stream start eoc))
(network-stream-get-response stream start eoc))
(when (string-match success-string
(proto-stream-command stream starttls-command eoc))
(network-stream-command stream starttls-command eoc))
;; The server said it was OK to begin STARTTLS negotiations.
(if (fboundp 'open-gnutls-stream)
(gnutls-negotiate stream nil)
@ -192,11 +203,13 @@ PARAMETERS should be a sequence of keywords and values:
;; We didn't successfully negotiate STARTTLS; if TLS
;; isn't demanded, reopen an unencrypted connection.
(unless require-tls
(setq stream (open-network-stream name buffer host service))
(proto-stream-get-response stream start eoc)))
(setq stream
(make-network-process :name name :buffer buffer
:host host :service service))
(network-stream-get-response stream start eoc)))
;; Re-get the capabilities, which may have now changed.
(setq capabilities
(proto-stream-command stream capability-command eoc))))
(network-stream-command stream capability-command eoc))))
;; If TLS is mandatory, close the connection if it's unencrypted.
(and require-tls
@ -205,70 +218,69 @@ PARAMETERS should be a sequence of keywords and values:
;; Return value:
(list stream greeting capabilities resulting-type)))
(defun proto-stream-command (stream command eoc)
(let ((start (with-current-buffer (process-buffer stream) (point-max))))
(process-send-string stream command)
(proto-stream-get-response stream start eoc)))
(defun network-stream-command (stream command eoc)
(when command
(let ((start (with-current-buffer (process-buffer stream) (point-max))))
(process-send-string stream command)
(network-stream-get-response stream start eoc))))
(defun proto-stream-get-response (stream start end-of-command)
(with-current-buffer (process-buffer stream)
(save-excursion
(goto-char start)
(while (and (memq (process-status stream)
'(open run))
(not (re-search-forward end-of-command nil t)))
(accept-process-output stream 0 50)
(goto-char start))
(if (= start (point))
;; The process died; return nil.
nil
;; Return the data we got back.
(buffer-substring start (point))))))
(defun network-stream-get-response (stream start end-of-command)
(when end-of-command
(with-current-buffer (process-buffer stream)
(save-excursion
(goto-char start)
(while (and (memq (process-status stream) '(open run))
(not (re-search-forward end-of-command nil t)))
(accept-process-output stream 0 50)
(goto-char start))
;; Return the data we got back, or nil if the process died.
(unless (= start (point))
(buffer-substring start (point)))))))
(defun proto-stream-open-tls (name buffer host service parameters)
(defun network-stream-open-tls (name buffer host service parameters)
(with-current-buffer buffer
(let ((start (point-max))
(stream
(funcall (if (fboundp 'open-gnutls-stream)
'open-gnutls-stream
'open-tls-stream)
name buffer host service))
(eoc (plist-get parameters :end-of-command)))
(let* ((start (point-max))
(use-builtin-gnutls (fboundp 'open-gnutls-stream))
(stream
(funcall (if use-builtin-gnutls
'open-gnutls-stream
'open-tls-stream)
name buffer host service))
(eoc (plist-get parameters :end-of-command)))
(if (null stream)
(list nil nil nil 'plain)
;; If we're using tls.el, we have to delete the output from
;; openssl/gnutls-cli.
(unless (fboundp 'open-gnutls-stream)
(proto-stream-get-response stream start eoc)
(when (and (null use-builtin-gnutls) eoc)
(network-stream-get-response stream start eoc)
(goto-char (point-min))
(when (re-search-forward eoc nil t)
(goto-char (match-beginning 0))
(delete-region (point-min) (line-beginning-position))))
(proto-stream-capability-open start stream parameters 'tls)))))
(let* ((capability-command (plist-get parameters :capability-command)))
(list stream
(network-stream-get-response stream start eoc)
(network-stream-command stream capability-command eoc)
'tls))))))
(defun proto-stream-open-shell (name buffer host service parameters)
(defun network-stream-open-shell (name buffer host service parameters)
(require 'format-spec)
(proto-stream-capability-open
(with-current-buffer buffer (point))
(let ((process-connection-type nil))
(start-process name buffer shell-file-name
shell-command-switch
(format-spec
(plist-get parameters :shell-command)
(format-spec-make
?s host
?p service))))
parameters 'plain))
(defun proto-stream-capability-open (start stream parameters stream-type)
(let* ((capability-command (plist-get parameters :capability-command))
(eoc (plist-get parameters :end-of-command))
(greeting (proto-stream-get-response stream start eoc)))
(list stream greeting
(and capability-command
(proto-stream-command stream capability-command eoc))
stream-type)))
(start (with-current-buffer buffer (point)))
(stream (let ((process-connection-type nil))
(start-process name buffer shell-file-name
shell-command-switch
(format-spec
(plist-get parameters :shell-command)
(format-spec-make
?s host
?p service))))))
(list stream
(network-stream-get-response stream start eoc)
(network-stream-command stream capability-command eoc)
'plain)))
(provide 'proto-stream)
(provide 'network-stream)
;;; proto-stream.el ends here
;;; network-stream.el ends here

View file

@ -4,7 +4,7 @@
;; Author: Ryan Yeske <rcyeske@gmail.com>
;; Maintainers: Ryan Yeske <rcyeske@gmail.com>,
;; Deniz Dogan <deniz.a.m.dogan@gmail.com>
;; Deniz Dogan <deniz@dogan.se>
;; Keywords: comm
;; This file is part of GNU Emacs.
@ -900,7 +900,6 @@ IRC command completion is performed only if '/' is the first input char."
(define-key map (kbd "C-c C-m") 'rcirc-cmd-msg)
(define-key map (kbd "C-c C-r") 'rcirc-cmd-nick) ; rename
(define-key map (kbd "C-c C-o") 'rcirc-omit-mode)
(define-key map (kbd "M-o") 'rcirc-omit-mode)
(define-key map (kbd "C-c C-p") 'rcirc-cmd-part)
(define-key map (kbd "C-c C-q") 'rcirc-cmd-query)
(define-key map (kbd "C-c C-t") 'rcirc-cmd-topic)

View file

@ -440,10 +440,11 @@ This variable's value takes effect when `grep-compute-defaults' is called.")
;;;###autoload
(defvar grep-find-use-xargs nil
"Non-nil means that `grep-find' uses the `xargs' utility by default.
If `exec', use `find -exec'.
"How to invoke find and grep.
If `exec', use `find -exec {} ;'.
If `exec-plus' use `find -exec {} +'.
If `gnu', use `find -print0' and `xargs -0'.
Any other non-nil value means to use `find -print' and `xargs'.
Any other value means to use `find -print' and `xargs'.
This variable's value takes effect when `grep-compute-defaults' is called.")
@ -561,6 +562,10 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
(unless grep-find-use-xargs
(setq grep-find-use-xargs
(cond
((grep-probe find-program
`(nil nil nil ,null-device "-exec" "echo"
"{}" "+"))
'exec-plus)
((and
(grep-probe find-program `(nil nil nil ,null-device "-print0"))
(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'."
;; forward slashes as directory separators.
(format "%s . -type f -print0 | \"%s\" -0 -e %s"
find-program xargs-program grep-command))
((eq grep-find-use-xargs 'exec)
((memq grep-find-use-xargs '(exec exec-plus))
(let ((cmd0 (format "%s . -type f -exec %s"
find-program grep-command)))
find-program grep-command))
(null (if grep-use-null-device
(format "%s " null-device)
"")))
(cons
(format "%s {} %s %s"
cmd0 null-device
(shell-quote-argument ";"))
(if (eq grep-find-use-xargs 'exec-plus)
(format "%s %s{} +" cmd0 null)
(format "%s {} %s%s" cmd0 null
(shell-quote-argument ";")))
(1+ (length cmd0)))))
(t
(format "%s . -type f -print | \"%s\" %s"
@ -589,14 +598,20 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
(unless grep-find-template
(setq grep-find-template
(let ((gcmd (format "%s <C> %s <R>"
grep-program grep-options)))
grep-program grep-options))
(null (if grep-use-null-device
(format "%s " null-device)
"")))
(cond ((eq grep-find-use-xargs 'gnu)
(format "%s . <X> -type f <F> -print0 | \"%s\" -0 -e %s"
find-program xargs-program gcmd))
((eq grep-find-use-xargs 'exec)
(format "%s . <X> -type f <F> -exec %s {} %s %s"
find-program gcmd null-device
(format "%s . <X> -type f <F> -exec %s {} %s%s"
find-program gcmd null
(shell-quote-argument ";")))
((eq grep-find-use-xargs 'exec-plus)
(format "%s . <X> -type f <F> -exec %s %s{} +"
find-program gcmd null))
(t
(format "%s . <X> -type f <F> -print | \"%s\" %s"
find-program xargs-program gcmd))))))))

View file

@ -7068,10 +7068,9 @@ If these don't exist, a letter in the string is automatically selected."
;; No quick reply: Show help
(save-window-excursion
(with-output-to-temp-buffer "*Completions*"
(mapcar (lambda(x)
(princ (nth 1 x))
(princ "\n"))
keys-alist))
(dolist (x keys-alist)
(princ (nth 1 x))
(princ "\n")))
(setq char (read-char)))
(setq char (read-char)))
(message nil)
@ -9313,13 +9312,11 @@ This function was written since `list-abbrevs' looks terrible for IDLWAVE mode."
(princ "================================================\n\n")
(princ (format fmt "KEY" "ACTION" ""))
(princ (format fmt "---" "------" "")))
(mapcar
(lambda (list)
(setq str (car list)
rpl (nth 1 list)
func (nth 2 list))
(princ (format fmt str rpl func)))
abbrevs)))
(dolist (list abbrevs)
(setq str (car list)
rpl (nth 1 list)
func (nth 2 list))
(princ (format fmt str rpl func)))))
;; Make sure each abbreviation uses only one display line
(with-current-buffer "*Help*"
(setq truncate-lines t)))

View file

@ -906,7 +906,8 @@ opening the first frame (e.g. open a connection to an X server).")
;; spec, but mark it as changed outside of Customize.
(let ((color (x-get-resource "cursorColor" "CursorColor")))
(when color
(face-spec-set 'cursor `((t (:background ,color))))
(put 'cursor 'theme-face
`((changed ((t :background ,color)))))
(put 'cursor 'face-modified t)))))
(frame-initialize))

View file

@ -1792,28 +1792,6 @@ Signal an error if the program returns with a non-zero exit status."
(forward-line 1))
(nreverse lines)))))
;; open-network-stream is a wrapper around make-network-process.
(when (featurep 'make-network-process)
(defun open-network-stream (name buffer host service)
"Open a TCP connection for a service to a host.
Returns a subprocess-object to represent the connection.
Input and output work as for subprocesses; `delete-process' closes it.
NAME is the name for the process. It is modified if necessary to make
it unique.
BUFFER is the buffer (or buffer name) to associate with the
process. Process output goes at end of that buffer. BUFFER may
be nil, meaning that this process is not associated with any buffer.
HOST is the name or IP address of the host to connect to.
SERVICE is the name of the service desired, or an integer specifying
a port number to connect to.
This is a wrapper around `make-network-process', and only offers a
subset of its functionality."
(make-network-process :name name :buffer buffer
:host host :service service)))
;; compatibility
(make-obsolete

View file

@ -71,13 +71,23 @@ Detection of repeated words is not implemented in
:type 'boolean)
(defcustom flyspell-mark-duplications-exceptions
'(("francais" . ("nous" "vous")))
'((nil . ("that" "had")) ; Common defaults for English.
("\\`francais" . ("nous" "vous")))
"A list of exceptions for duplicated words.
It should be a list of (LANGUAGE . EXCEPTION-LIST). LANGUAGE is matched
against the current dictionary and EXCEPTION-LIST is a list of strings.
The duplicated word is downcased before it is compared with the exceptions."
It should be a list of (LANGUAGE . EXCEPTION-LIST).
LANGUAGE is nil, which means the exceptions apply regardless of
the current dictionary, or a regular expression matching the
dictionary name (`ispell-local-dictionary' or
`ispell-dictionary') for which the exceptions should apply.
EXCEPTION-LIST is a list of strings. The checked word is
downcased before comparing with these exceptions."
:group 'flyspell
:type '(alist :key-type string :value-type (repeat string)))
:type '(alist :key-type (choice (const :tag "All dictionaries" nil)
string)
:value-type (repeat string))
:version "24.1")
(defcustom flyspell-sort-corrections nil
"Non-nil means, sort the corrections alphabetically before popping them."
@ -1044,12 +1054,14 @@ misspelling and skips redundant spell-checking step."
(not (memq (char-after (1- start)) '(?\} ?\\)))))
flyspell-mark-duplications-flag
(not (catch 'exception
(dolist (except flyspell-mark-duplications-exceptions)
(and (string= (or ispell-local-dictionary
ispell-dictionary)
(car except))
(member (downcase word) (cdr except))
(throw 'exception t)))))
(let ((dict (or ispell-local-dictionary
ispell-dictionary)))
(dolist (except flyspell-mark-duplications-exceptions)
(and (or (null (car except))
(and (stringp dict)
(string-match (car except) dict)))
(member (downcase word) (cdr except))
(throw 'exception t))))))
(save-excursion
(goto-char start)
(let* ((bound

View file

@ -1,3 +1,13 @@
2011-04-02 Chong Yidong <cyd@stupidchicken.com>
* url-gw.el (url-open-stream): Use new open-network-stream
functionality to perform encryption.
2011-04-01 Juanma Barranquero <lekktu@gmail.com>
* url-cookie.el (url-cookie-handle-set-cookie):
Use `dolist' rather than `mapcar'.
2011-02-12 Teodor Zlatanov <tzz@lifelogs.com>
* url-parse.el (url-bit-for-url, url-user-for-url)
@ -14,7 +24,7 @@
move point if the callback function has moved changed/killed the
process buffer.
2010-12-16 Miles Bader <Miles Bader <miles@gnu.org>>
2010-12-16 Miles Bader <miles@gnu.org>
* url-cookie.el: Require 'cl when compiling -- it's necessary for
defstruct.

View file

@ -331,9 +331,8 @@ telling Microsoft that."
(not trusted)
(save-window-excursion
(with-output-to-temp-buffer "*Cookie Warning*"
(mapcar
(lambda (x)
(princ (format "%s - %s" (car x) (cdr x)))) rest))
(dolist (x rest)
(princ (format "%s - %s" (car x) (cdr x)))))
(prog1
(not (funcall url-confirmation-func
(format "Allow %s to set these cookies? "

View file

@ -28,8 +28,6 @@
;; Fixme: support SSH explicitly or via a url-gateway-rlogin-program?
(autoload 'socks-open-network-stream "socks")
(autoload 'open-ssl-stream "ssl")
(autoload 'open-tls-stream "tls")
(defgroup url-gateway nil
"URL gateway variables."
@ -219,13 +217,6 @@ Might do a non-blocking connection; use `process-status' to check."
host))
'native
url-gateway-method))
;;; ;; This hack is for OS/2 Emacs so that it will not do bogus CRLF
;;; ;; conversions while trying to be 'helpful'
;;; (tcp-binary-process-output-services (if (stringp service)
;;; (list service)
;;; (list service
;;; (int-to-string service))))
;; An attempt to deal with denied connections, and attempt
;; to reconnect
(cur-retries 0)
@ -243,19 +234,15 @@ Might do a non-blocking connection; use `process-status' to check."
(let ((coding-system-for-read 'binary)
(coding-system-for-write 'binary))
(setq conn (case gw-method
(tls
(funcall (if (fboundp 'open-gnutls-stream)
'open-gnutls-stream
'open-tls-stream)
name buffer host service))
(ssl
(open-ssl-stream name buffer host service))
((native)
;; Use non-blocking socket if we can.
(make-network-process :name name :buffer buffer
:host host :service service
:nowait
(featurep 'make-network-process '(:nowait t))))
((tls ssl native)
(if (eq gw-method 'native)
(setq gw-method 'plain))
(open-network-stream
name buffer host service
:type gw-method
;; Use non-blocking socket if we can.
:nowait (featurep 'make-network-process
'(:nowait t))))
(socks
(socks-open-network-stream name buffer host service))
(telnet
@ -264,13 +251,7 @@ Might do a non-blocking connection; use `process-status' to check."
(url-open-rlogin name buffer host service))
(otherwise
(error "Bad setting of url-gateway-method: %s"
url-gateway-method)))))
;; Ignoring errors here seems wrong. E.g. it'll throw away the
;; error signaled two lines above. It was also found inconvenient
;; during debugging.
;; (error
;; (setq conn nil))
)
url-gateway-method))))))
conn)))
(provide 'url-gw)

View file

@ -1,5 +1,7 @@
2011-04-05 Paul Eggert <eggert@cs.ucla.edu>
Fix more problems found by GCC 4.6.0's static checks.
* coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
This avoids several warnings with gcc -Wstrict-overflow.
(DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
@ -14,8 +16,6 @@
* composite.c (composition_gstring_put_cache): Use unsigned integer.
2011-04-04 Paul Eggert <eggert@cs.ucla.edu>
* composite.h, composite.c (composition_gstring_put_cache):
Use EMACS_INT, not int, for length.
@ -53,8 +53,6 @@
* font.c (font_list_entities): Redo for clarity,
so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
2011-04-03 Paul Eggert <eggert@cs.ucla.edu>
* font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
(font_score): Avoid potential overflow in diff calculation.
@ -79,8 +77,6 @@
* fileio.c (Finsert_file_contents): Make EOF condition clearer.
2011-04-02 Paul Eggert <eggert@cs.ucla.edu>
* fileio.c (Finsert_file_contents): Avoid signed integer overflow.
(Finsert_file_contents): Remove unnecessary code checking fd.
@ -109,8 +105,6 @@
* xselect.c (x_get_local_selection, x_handle_property_notify):
Remove vars that are set but not used.
2011-04-01 Paul Eggert <eggert@cs.ucla.edu>
* xfns.c (x_create_tip_frame): Remove var that is set but not used.
(make_invisible_cursor): Initialize a possibly-uninitialized variable.
@ -149,6 +143,43 @@
* deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
../lib/careadlinkat.h.
2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
* keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
first non-nil return value).
2011-04-03 Jan Djärv <jan.h.d@swipnet.se>
* nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
if not defined (Bug#8403).
2011-04-02 Juanma Barranquero <lekktu@gmail.com>
* xdisp.c (display_count_lines): Remove parameter `start',
unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
(get_char_face_and_encoding): Remove parameter `multibyte_p',
unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
(fill_stretch_glyph_string): Remove parameters `row' and `area',
unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
and thereabouts. All callers changed.
(get_per_char_metric): Remove parameter `f', unused since
2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
2011-04-02 Jim Meyering <meyering@redhat.com>
do not dereference NULL upon failed strdup
* nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
(ns_get_family): Likewise.
2011-04-02 Juanma Barranquero <lekktu@gmail.com>
* eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
2011-04-02 Jan Djärv <jan.h.d@swipnet.se>
* nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
later (Bug#8403).
2011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
Add lexical binding.

View file

@ -1297,7 +1297,7 @@ unwind_to_catch (struct catchtag *catch, Lisp_Object value)
byte_stack_list = catch->byte_stack;
gcprolist = catch->gcpro;
#ifdef DEBUG_GCPRO
gcpro_level = gcprolist ? gcprolist->level + 1 : gcpro_level = 0;
gcpro_level = gcprolist ? gcprolist->level + 1 : 0;
#endif
backtrace_list = catch->backlist;
lisp_eval_depth = catch->lisp_eval_depth;

View file

@ -1870,7 +1870,8 @@ safe_run_hook_funcall (size_t nargs, Lisp_Object *args)
else
Vinhibit_quit = Fcons (Vinhibit_quit, args[0]);
return internal_condition_case (safe_run_hooks_1, Qt, safe_run_hooks_error);
internal_condition_case (safe_run_hooks_1, Qt, safe_run_hooks_error);
return Qnil;
}
/* If we get an error while running the hook, cause the hook variable

View file

@ -100,7 +100,7 @@ static void ns_glyph_metrics (struct nsfont_info *font_info,
return nil;
else
{
char *tmp = strdup (SDATA (SYMBOL_NAME (tem)));
char *tmp = xstrdup (SDATA (SYMBOL_NAME (tem)));
NSString *family;
ns_unescape_name (tmp);
family = [NSString stringWithUTF8String: tmp];
@ -176,7 +176,7 @@ static void ns_glyph_metrics (struct nsfont_info *font_info,
if (family == nil)
family = [[NSFont userFixedPitchFontOfSize: 0] familyName];
escapedFamily = strdup ([family UTF8String]);
escapedFamily = xstrdup ([family UTF8String]);
ns_escape_name (escapedFamily);
ASET (font_entity, FONT_TYPE_INDEX, Qns);
@ -1526,4 +1526,3 @@ - (void)setIntAttribute: (NSInteger)attributeTag value: (NSInteger)val
DEFVAR_LISP ("ns-reg-to-script", Vns_reg_to_script,
doc: /* Internal use: maps font registry to unicode script. */);
}

View file

@ -583,6 +583,11 @@ Free a pool and temporary objects it refers to (callable from C)
static void
ns_update_auto_hide_menu_bar (void)
{
#ifndef MAC_OS_X_VERSION_10_6
#define MAC_OS_X_VERSION_10_6 1060
#endif
#ifdef NS_IMPL_COCOA
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
BLOCK_INPUT;
NSTRACE (ns_update_auto_hide_menu_bar);
@ -615,6 +620,8 @@ Free a pool and temporary objects it refers to (callable from C)
}
UNBLOCK_INPUT;
#endif
#endif
}

View file

@ -824,8 +824,7 @@ static int display_mode_element (struct it *, int, int, int, Lisp_Object, Lisp_O
static int store_mode_line_string (const char *, Lisp_Object, int, int, int, Lisp_Object);
static const char *decode_mode_spec (struct window *, int, int, Lisp_Object *);
static void display_menu_bar (struct window *);
static int display_count_lines (EMACS_INT, EMACS_INT, EMACS_INT, int,
EMACS_INT *);
static int display_count_lines (EMACS_INT, EMACS_INT, int, EMACS_INT *);
static int display_string (const char *, Lisp_Object, Lisp_Object,
EMACS_INT, EMACS_INT, struct it *, int, int, int, int);
static void compute_line_metrics (struct it *);
@ -19481,7 +19480,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
}
/* Count lines from base line to window start position. */
nlines = display_count_lines (linepos, linepos_byte,
nlines = display_count_lines (linepos_byte,
startpos_byte,
startpos, &junk);
@ -19510,7 +19509,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
limit_byte = CHAR_TO_BYTE (limit);
}
nlines = display_count_lines (startpos, startpos_byte,
nlines = display_count_lines (startpos_byte,
limit_byte,
- (height * 2 + 30),
&position);
@ -19529,7 +19528,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
}
/* Now count lines from the start pos to point. */
nlines = display_count_lines (startpos, startpos_byte,
nlines = display_count_lines (startpos_byte,
PT_BYTE, PT, &junk);
/* Record that we did display the line number. */
@ -19699,14 +19698,14 @@ decode_mode_spec (struct window *w, register int c, int field_width,
}
/* Count up to COUNT lines starting from START / START_BYTE.
/* Count up to COUNT lines starting from START_BYTE.
But don't go beyond LIMIT_BYTE.
Return the number of lines thus found (always nonnegative).
Set *BYTE_POS_PTR to 1 if we found COUNT lines, 0 if we hit LIMIT. */
static int
display_count_lines (EMACS_INT start, EMACS_INT start_byte,
display_count_lines (EMACS_INT start_byte,
EMACS_INT limit_byte, int count,
EMACS_INT *byte_pos_ptr)
{
@ -20470,16 +20469,15 @@ append_glyph_string (struct glyph_string **head, struct glyph_string **tail,
}
/* Get face and two-byte form of character C in face FACE_ID on frame
F. The encoding of C is returned in *CHAR2B. MULTIBYTE_P non-zero
means we want to display multibyte text. DISPLAY_P non-zero means
/* Get face and two-byte form of character C in face FACE_ID on frame F.
The encoding of C is returned in *CHAR2B. DISPLAY_P non-zero means
make sure that X resources for the face returned are allocated.
Value is a pointer to a realized face that is ready for display if
DISPLAY_P is non-zero. */
static INLINE struct face *
get_char_face_and_encoding (struct frame *f, int c, int face_id,
XChar2b *char2b, int multibyte_p, int display_p)
XChar2b *char2b, int display_p)
{
struct face *face = FACE_FROM_ID (f, face_id);
@ -20599,7 +20597,7 @@ fill_composite_glyph_string (struct glyph_string *s, struct face *base_face,
-1, Qnil);
face = get_char_face_and_encoding (s->f, c, face_id,
s->char2b + i, 1, 1);
s->char2b + i, 1);
if (face)
{
if (! s->face)
@ -20798,15 +20796,13 @@ fill_image_glyph_string (struct glyph_string *s)
/* Fill glyph string S from a sequence of stretch glyphs.
ROW is the glyph row in which the glyphs are found, AREA is the
area within the row. START is the index of the first glyph to
consider, END is the index of the last + 1.
START is the index of the first glyph to consider,
END is the index of the last + 1.
Value is the index of the first glyph not in S. */
static int
fill_stretch_glyph_string (struct glyph_string *s, struct glyph_row *row,
enum glyph_row_area area, int start, int end)
fill_stretch_glyph_string (struct glyph_string *s, int start, int end)
{
struct glyph *glyph, *last;
int voffset, face_id;
@ -20840,7 +20836,7 @@ fill_stretch_glyph_string (struct glyph_string *s, struct glyph_row *row,
}
static struct font_metrics *
get_per_char_metric (struct frame *f, struct font *font, XChar2b *char2b)
get_per_char_metric (struct font *font, XChar2b *char2b)
{
static struct font_metrics metrics;
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
struct font_metrics *pcm;
face = get_glyph_face_and_encoding (f, glyph, &char2b, NULL);
if (face->font && (pcm = get_per_char_metric (f, face->font, &char2b)))
if (face->font && (pcm = get_per_char_metric (face->font, &char2b)))
{
if (pcm->rbearing > pcm->width)
*right = pcm->rbearing - pcm->width;
@ -21102,7 +21098,7 @@ compute_overhangs_and_x (struct glyph_string *s, int x, int backward_p)
{ \
s = (struct glyph_string *) alloca (sizeof *s); \
INIT_GLYPH_STRING (s, NULL, w, row, area, START, HL); \
START = fill_stretch_glyph_string (s, row, area, START, END); \
START = fill_stretch_glyph_string (s, START, END); \
append_glyph_string (&HEAD, &TAIL, s); \
s->x = (X); \
} \
@ -22475,7 +22471,7 @@ x_produce_glyphs (struct it *it)
if (get_char_glyph_code (it->char_to_display, font, &char2b))
{
pcm = get_per_char_metric (it->f, font, &char2b);
pcm = get_per_char_metric (font, &char2b);
if (pcm->width == 0
&& pcm->rbearing == 0 && pcm->lbearing == 0)
pcm = NULL;
@ -22777,8 +22773,8 @@ x_produce_glyphs (struct it *it)
if (! font_not_found_p)
{
get_char_face_and_encoding (it->f, c, it->face_id,
&char2b, it->multibyte_p, 0);
pcm = get_per_char_metric (it->f, font, &char2b);
&char2b, 0);
pcm = get_per_char_metric (font, &char2b);
}
/* Initialize the bounding box. */
@ -22838,8 +22834,8 @@ x_produce_glyphs (struct it *it)
else
{
get_char_face_and_encoding (it->f, ch, face_id,
&char2b, it->multibyte_p, 0);
pcm = get_per_char_metric (it->f, font, &char2b);
&char2b, 0);
pcm = get_per_char_metric (font, &char2b);
}
if (! pcm)
cmp->offsets[i * 2] = cmp->offsets[i * 2 + 1] = 0;