Merge from emacs-24; up to 2014-06-12T14:55:48Z!monnier@iro.umontreal.ca

This commit is contained in:
Glenn Morris 2014-06-28 10:27:29 -07:00
commit e0d9c3c9a2
14 changed files with 4088 additions and 649 deletions

View file

@ -1,3 +1,8 @@
2014-06-28 Glenn Morris <rgm@gnu.org>
* minibuf.texi (Intro to Minibuffers): Batch mode is basic.
(Reading a Password): Mention batch mode. (Bug#17839)
2014-06-23 Glenn Morris <rgm@gnu.org>
* Makefile.in (%.texi): Disable implicit rules.

View file

@ -101,7 +101,9 @@ the minibuffer is in a separate frame. @xref{Minibuffers and Frames}.
When Emacs is running in batch mode, any request to read from the
minibuffer actually reads a line from the standard input descriptor that
was supplied when Emacs was started.
was supplied when Emacs was started. This supports only basic input:
none of the special minibuffer features (history, completion,
password hiding, etc.) are available in batch mode.
@node Text from Minibuffer
@section Reading Text Strings with the Minibuffer
@ -2146,7 +2148,8 @@ function @code{read-passwd}.
@defun read-passwd prompt &optional confirm default
This function reads a password, prompting with @var{prompt}. It does
not echo the password as the user types it; instead, it echoes @samp{.}
for each character in the password.
for each character in the password. (Note that in batch mode, the
input is not hidden.)
The optional argument @var{confirm}, if non-@code{nil}, says to read the
password twice and insist it must be the same both times. If it isn't

View file

@ -1,3 +1,7 @@
2014-06-28 Glenn Morris <rgm@gnu.org>
* publicsuffix.txt: Update from source.
2014-06-24 Eli Barzilay <eli@barzilay.org>
* NEWS: calculator.el user-visible changes.

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,23 @@
2014-06-28 Stephen Berman <stephen.berman@gmx.net>
* calendar/todo-mode.el (todo-set-top-priorities): Fix logic to
account for file-wide setting of todo-top-priorities-overrides.
Make code a bit cleaner.
2014-06-28 Glenn Morris <rgm@gnu.org>
* net/eww.el (eww-mode) <eww-current-title>: Make local. (Bug#17860)
2014-06-28 Stephen Berman <stephen.berman@gmx.net>
* calendar/todo-mode.el (todo-prefix-overlays): If there is no
category-wide setting of todo-top-priorities-overrides, check for
a file-wide setting and fontify accordingly.
2014-06-28 Glenn Morris <rgm@gnu.org>
* subr.el (read-passwd): Warn about batch mode. (Bug#17839)
2014-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/hideif.el: Use lexical-binding. Fix up cl-lib usage.

View file

@ -4292,30 +4292,30 @@ set the user customizable option `todo-top-priorities-overrides'."
(file todo-current-todo-file)
(rules todo-top-priorities-overrides)
(frule (assoc-string file rules))
(crule (assoc-string cat (nth 2 frule)))
(crules (nth 2 frule))
(cur (or (if arg (cdr crule) (nth 1 frule))
(crule (assoc-string cat crules))
(cur (or (and arg (cdr crule))
(nth 1 frule)
todo-top-priorities))
(prompt (if arg (concat "Number of top priorities in this category"
" (currently %d): ")
(concat "Default number of top priorities per category"
" in this file (currently %d): ")))
(new -1)
nrule)
(new -1))
(while (< new 0)
(let ((cur0 cur))
(setq new (read-number (format prompt cur0))
prompt "Enter a non-negative number: "
cur0 nil)))
(setq nrule (if arg
(append (delete crule crules) (list (cons cat new)))
(append (list file new) (list crules))))
(setq rules (cons (if arg
(list file cur nrule)
nrule)
(delete frule rules)))
(customize-save-variable 'todo-top-priorities-overrides rules)
(todo-prefix-overlays)))
(let ((nrule (if arg
(append (delete crule crules) (list (cons cat new)))
(append (list file new) (list crules)))))
(setq rules (cons (if arg
(list file cur nrule)
nrule)
(delete frule rules)))
(customize-save-variable 'todo-top-priorities-overrides rules)
(todo-prefix-overlays))))
(defun todo-find-item (str)
"Search for filtered item STR in its saved todo file.
@ -5303,6 +5303,8 @@ of each other."
(todo-current-category)
(nth 2 (assoc-string todo-current-todo-file
todo-top-priorities-overrides))))
(nth 1 (assoc-string todo-current-todo-file
todo-top-priorities-overrides))
todo-top-priorities))
done prefix)
(save-excursion

View file

@ -478,6 +478,7 @@ word(s) will be searched for via `eww-search-prefix'."
(setq-local eww-current-url 'author)
(setq-local eww-current-dom nil)
(setq-local eww-current-source nil)
(setq-local eww-current-title "")
(setq-local browse-url-browser-function 'eww-browse-url)
(setq-local after-change-functions 'eww-process-text-input)
(setq-local eww-history nil)

View file

@ -2016,6 +2016,7 @@ If optional CONFIRM is non-nil, read the password twice to make sure.
Optional DEFAULT is a default password to use instead of empty input.
This function echoes `.' for each character that the user types.
Note that in batch mode, the input is not hidden!
Once the caller uses the password, it can erase the password
by doing (clear-string STRING)."
@ -2055,7 +2056,11 @@ by doing (clear-string STRING)."
(add-hook 'after-change-functions hide-chars-fun nil 'local))
(unwind-protect
(let ((enable-recursive-minibuffers t))
(read-string prompt nil t default)) ; t = "no history"
(read-string
(if noninteractive
(format "%s[INPUT WILL NOT BE HIDDEN!] " prompt) ; bug#17839
prompt)
nil t default)) ; t = "no history"
(when (buffer-live-p minibuf)
(with-current-buffer minibuf
;; Not sure why but it seems that there might be cases where the

View file

@ -72,11 +72,11 @@
((and (null modifier)
(string= domain entry))
(setq allowedp nil))
;; "!pref.hokkaido.jp"
;; "!city.yokohama.jp"
((and (eq modifier t)
(string= domain entry))
(setq allowedp t))
;; "*.ar"
;; "*.bd"
((and (numberp modifier)
(= length modifier)
(string= entry upper-domain))
@ -85,13 +85,14 @@
;; Tests:
;; TODO convert to a proper test/automated test.
;; (url-domsuf-cookie-allowed-p "com") => nil
;; (url-domsuf-cookie-allowed-p "foo.bar.ar") => t
;; (url-domsuf-cookie-allowed-p "bar.ar") => nil
;; (url-domsuf-cookie-allowed-p "foo.bar.bd") => t
;; (url-domsuf-cookie-allowed-p "bar.bd") => nil
;; (url-domsuf-cookie-allowed-p "co.uk") => nil
;; (url-domsuf-cookie-allowed-p "foo.bar.hokkaido.jo") => t
;; (url-domsuf-cookie-allowed-p "bar.hokkaido.jp") => nil
;; (url-domsuf-cookie-allowed-p "pref.hokkaido.jp") => t
;; (url-domsuf-cookie-allowed-p "bar.yokohama.jp") => nil
;; (url-domsuf-cookie-allowed-p "city.yokohama.jp") => t
(provide 'url-domsuf)

View file

@ -1,3 +1,8 @@
2014-06-28 Andreas Schwab <schwab@linux-m68k.org>
* coding.c (encode_coding_utf_8): Correctly count produced_chars
also in unibyte case. (Bug#17865)
2014-06-28 K. Handa <handa@gnu.org>
* coding.c (MAX_CHARBUF_SIZE): Renamed from CHARBUF_SIZE.

View file

@ -1549,8 +1549,8 @@ encode_coding_utf_8 (struct coding_system *coding)
*dst++ = CHAR_TO_BYTE8 (c);
else
CHAR_STRING_ADVANCE_NO_UNIFY (c, dst);
produced_chars++;
}
produced_chars = dst - (coding->destination + coding->produced);
}
record_conversion_result (coding, CODING_RESULT_SUCCESS);
coding->produced_char += produced_chars;

View file

@ -1,3 +1,14 @@
2014-06-28 Leo Liu <sdl.web@gmail.com>
* automated/calc-tests.el: New file and add tests for math-bignum.
(Bug#17556)
2014-06-28 Michael Albinus <michael.albinus@gmx.de>
* automated/dbus-tests.el (dbus--test-register-service)
(dbus-test02-register-service-session): Replace `dbus-ping' calls
by `dbus-list-known-names'. (Bug#17858)
2014-06-28 Glenn Morris <rgm@gnu.org>
* automated/Makefile.in (GDB): New variable.

View file

@ -0,0 +1,42 @@
;;; calc-tests.el --- tests for calc -*- lexical-binding: t; -*-
;; Copyright (C) 2014 Free Software Foundation, Inc.
;; Author: Leo Liu <sdl.web@gmail.com>
;; Keywords: maint
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; Code:
(require 'cl-lib)
(require 'ert)
(require 'calc)
(ert-deftest test-math-bignum ()
;; bug#17556
(let ((n (math-bignum most-negative-fixnum)))
(should (math-negp n))
(should (cl-notany #'cl-minusp (cdr n)))))
(provide 'calc-tests)
;;; calc-tests.el ends here
;; Local Variables:
;; bug-reference-url-format: "http://debbugs.gnu.org/%s"
;; End:

View file

@ -88,15 +88,15 @@
;; Register an own service.
(should (eq (dbus-register-service bus dbus-service-emacs) :primary-owner))
(should (dbus-ping bus dbus-service-emacs 100))
(should (member dbus-service-emacs (dbus-list-known-names bus)))
(should (eq (dbus-register-service bus dbus-service-emacs) :already-owner))
(should (dbus-ping bus dbus-service-emacs 100))
(should (member dbus-service-emacs (dbus-list-known-names bus)))
;; Unregister the service.
(should (eq (dbus-unregister-service bus dbus-service-emacs) :released))
(should-not (dbus-ping bus dbus-service-emacs 100))
(should-not (member dbus-service-emacs (dbus-list-known-names bus)))
(should (eq (dbus-unregister-service bus dbus-service-emacs) :non-existent))
(should-not (dbus-ping bus dbus-service-emacs 100))
(should-not (member dbus-service-emacs (dbus-list-known-names bus)))
;; `dbus-service-dbus' is reserved for the BUS itself.
(should-error (dbus-register-service bus dbus-service-dbus))
@ -109,7 +109,7 @@
(dbus--test-register-service :session)
(let ((service "org.freedesktop.Notifications"))
(when (dbus-ping :session service 100)
(when (member service (dbus-list-known-names :session))
;; Cleanup.
(dbus-ignore-errors (dbus-unregister-service :session service))