Merge remote-tracking branch 'savannah/master' into HEAD
This commit is contained in:
commit
c984a53b4e
38 changed files with 123 additions and 58 deletions
|
@ -1,4 +1,4 @@
|
|||
;;; forms-d2.el --- demo forms-mode
|
||||
;;; forms-d2.el --- demo forms-mode -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 1991, 1994-1997, 2001-2020 Free Software Foundation,
|
||||
;; Inc.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; forms-pass.el --- passwd file demo for forms-mode
|
||||
;;; forms-pass.el --- passwd file demo for forms-mode -*- lexical-binding:t -*-
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
|
|
@ -1833,9 +1833,6 @@ contains a circular object."
|
|||
;; This means nothing matched, so it is OK.
|
||||
nil) ;; So, return nothing
|
||||
|
||||
|
||||
(def-edebug-spec &key edebug-match-&key)
|
||||
|
||||
(defun edebug-match-&key (cursor specs)
|
||||
;; Following specs must look like (<name> <spec>) ...
|
||||
;; where <name> is the name of a keyword, and spec is its spec.
|
||||
|
@ -2115,10 +2112,10 @@ into `edebug--cl-macrolet-defs' which is checked in `edebug-list-form-args'."
|
|||
|
||||
(def-edebug-spec edebug-spec
|
||||
(&or
|
||||
edebug-spec-list
|
||||
(vector &rest edebug-spec) ; matches a vector
|
||||
("vector" &rest edebug-spec) ; matches a vector spec
|
||||
("quote" symbolp)
|
||||
edebug-spec-list
|
||||
stringp
|
||||
[edebug-lambda-list-keywordp &rest edebug-spec]
|
||||
[keywordp gate edebug-spec]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; po.el --- basic support of PO translation files
|
||||
;;; po.el --- basic support of PO translation files -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 1995-1998, 2000-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ struct fringe_bitmap
|
|||
...xx...
|
||||
*/
|
||||
static unsigned short question_mark_bits[] = {
|
||||
0x3c, 0x7e, 0x7e, 0x0c, 0x18, 0x18, 0x00, 0x18, 0x18};
|
||||
0x3c, 0x7e, 0xc3, 0xc3, 0x0c, 0x18, 0x18, 0x00, 0x18, 0x18};
|
||||
|
||||
/* An exclamation mark. */
|
||||
/*
|
||||
|
@ -117,7 +117,7 @@ static unsigned short question_mark_bits[] = {
|
|||
...XX...
|
||||
*/
|
||||
static unsigned short exclamation_mark_bits[] = {
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18};
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18};
|
||||
|
||||
/* An arrow like this: `<-'. */
|
||||
/*
|
||||
|
|
|
@ -346,18 +346,15 @@ struct ftfont_cache_data
|
|||
static Lisp_Object
|
||||
ftfont_lookup_cache (Lisp_Object key, enum ftfont_cache_for cache_for)
|
||||
{
|
||||
Lisp_Object cache, val, entity;
|
||||
Lisp_Object cache, val;
|
||||
struct ftfont_cache_data *cache_data;
|
||||
|
||||
if (FONT_ENTITY_P (key))
|
||||
{
|
||||
entity = key;
|
||||
val = assq_no_quit (QCfont_entity, AREF (entity, FONT_EXTRA_INDEX));
|
||||
val = assq_no_quit (QCfont_entity, AREF (key, FONT_EXTRA_INDEX));
|
||||
eassert (CONSP (val));
|
||||
key = XCDR (val);
|
||||
}
|
||||
else
|
||||
entity = Qnil;
|
||||
|
||||
if (NILP (ft_face_cache))
|
||||
cache = Qnil;
|
||||
|
|
10
src/image.c
10
src/image.c
|
@ -6308,14 +6308,16 @@ native_image_p (Lisp_Object object)
|
|||
static bool
|
||||
native_image_load (struct frame *f, struct image *img)
|
||||
{
|
||||
Lisp_Object image_file = image_spec_value (img->spec, QCfile, NULL);
|
||||
|
||||
if (STRINGP (image_file))
|
||||
image_file = image_find_image_file (image_file);
|
||||
|
||||
# ifdef HAVE_NTGUI
|
||||
return w32_load_image (f, img,
|
||||
image_spec_value (img->spec, QCfile, NULL),
|
||||
return w32_load_image (f, img, image_file,
|
||||
image_spec_value (img->spec, QCdata, NULL));
|
||||
# elif defined HAVE_NS
|
||||
return ns_load_image (f, img,
|
||||
image_spec_value (img->spec, QCfile, NULL),
|
||||
return ns_load_image (f, img, image_file,
|
||||
image_spec_value (img->spec, QCdata, NULL));
|
||||
# else
|
||||
return 0;
|
||||
|
|
|
@ -414,7 +414,6 @@ w32_load_image (struct frame *f, struct image *img,
|
|||
and succeeded. We have a valid token and GDI+ is active. */
|
||||
if (STRINGP (spec_file))
|
||||
{
|
||||
spec_file = ENCODE_FILE (spec_file);
|
||||
const char *fn = map_w32_filename (SSDATA (spec_file), NULL);
|
||||
wchar_t filename_w[MAX_PATH];
|
||||
filename_to_utf16 (fn, filename_w);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
;;; ccl-tests.el --- unit tests for ccl.el -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2018-2020 Free Software Foundation, Inc.
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; mule-util --- tests for international/mule-util.el
|
||||
;;; mule-util-tests.el --- tests for international/mule-util.el -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2002-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -81,4 +81,4 @@
|
|||
(dotimes (i (length mule-util-test-truncate-data))
|
||||
(mule-util-test-truncate-create i))
|
||||
|
||||
;;; mule-util.el ends here
|
||||
;;; mule-util-tests.el ends here
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; dbus-tests.el --- Tests of D-Bus integration into Emacs
|
||||
;;; dbus-tests.el --- Tests of D-Bus integration into Emacs -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2013-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; gnutls-tests.el --- Test suite for gnutls.el
|
||||
;;; gnutls-tests.el --- Test suite for gnutls.el -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2017-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; newsticker-testsuite.el --- Test suite for newsticker.
|
||||
;;; newsticker-tests.el --- Test suite for newsticker. -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2003-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; puny-tests.el --- tests for net/puny.el -*- coding: utf-8; -*-
|
||||
;;; puny-tests.el --- tests for net/puny.el -*- coding: utf-8; lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2017-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; rfc2104-tests.el --- Tests of RFC2104 hashes
|
||||
;;; rfc2104-tests.el --- Tests of RFC2104 hashes -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2019-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; mhtml-mode-tests.el --- Tests for mhtml-mode
|
||||
;;; mhtml-mode-tests.el --- Tests for mhtml-mode -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2017-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
68
test/lisp/textmodes/po-tests.el
Normal file
68
test/lisp/textmodes/po-tests.el
Normal file
|
@ -0,0 +1,68 @@
|
|||
;;; po-tests.el --- Tests for po.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2020 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Simen Heggestøyl <simenheg@gmail.com>
|
||||
;; Keywords:
|
||||
|
||||
;; 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;;
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'po)
|
||||
(require 'ert)
|
||||
|
||||
(defconst po-tests--buffer-string
|
||||
"# Norwegian bokmål translation of the GIMP.
|
||||
# Copyright (C) 1999-2001 Free Software Foundation, Inc.
|
||||
#
|
||||
msgid \"\"
|
||||
msgstr \"\"
|
||||
\"Project-Id-Version: gimp 2.8.5\\n\"
|
||||
\"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gimp/issues\\n\"
|
||||
\"POT-Creation-Date: 2013-05-27 14:57+0200\\n\"
|
||||
\"PO-Revision-Date: 2013-05-27 15:21+0200\\n\"
|
||||
\"Language: nb\\n\"
|
||||
\"MIME-Version: 1.0\\n\"
|
||||
\"Content-Type: text/plain; charset=UTF-8\\n\"
|
||||
\"Content-Transfer-Encoding: 8bit\\n\"
|
||||
\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"
|
||||
|
||||
#: ../desktop/gimp.desktop.in.in.h:1 ../app/about.h:26
|
||||
msgid \"GNU Image Manipulation Program\"
|
||||
msgstr \"GNU bildebehandlingsprogram\"
|
||||
")
|
||||
|
||||
(ert-deftest po-tests-find-charset ()
|
||||
(with-temp-buffer
|
||||
(insert po-tests--buffer-string)
|
||||
(should (equal (po-find-charset (cons nil (current-buffer)))
|
||||
"UTF-8"))))
|
||||
|
||||
(ert-deftest po-tests-find-file-coding-system-guts ()
|
||||
(with-temp-buffer
|
||||
(insert po-tests--buffer-string)
|
||||
(should (equal (po-find-file-coding-system-guts
|
||||
'insert-file-contents
|
||||
(cons "*tmp*" (current-buffer)))
|
||||
'(utf-8 . nil)))))
|
||||
|
||||
(provide 'po-tests)
|
||||
;;; po-tests.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; sgml-mode-tests.el --- Tests for sgml-mode
|
||||
;;; sgml-mode-tests.el --- Tests for sgml-mode -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2015-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; url-auth-tests.el --- Test suite for url-auth.
|
||||
;;; url-auth-tests.el --- Test suite for url-auth. -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2015-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; url-expand-tests.el --- Test suite for relative URI/URL resolution.
|
||||
;;; url-expand-tests.el --- Test suite for relative URI/URL resolution. -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; url-parse-tests.el --- Test suite for URI/URL parsing.
|
||||
;;; url-parse-tests.el --- Test suite for URI/URL parsing. -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; url-tramp-tests.el --- Test suite for Tramp / URL conversion.
|
||||
;;; url-tramp-tests.el --- Test suite for Tramp / URL conversion. -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2017-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; url-util-tests.el --- Test suite for url-util.
|
||||
;;; url-util-tests.el --- Test suite for url-util. -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; charset-tests.el --- Tests for charset.c
|
||||
;;; charset-tests.el --- Tests for charset.c -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright 2017-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; chartab-tests.el --- Tests for char-tab.c
|
||||
;;; chartab-tests.el --- Tests for char-tab.c -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2016-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; cmds-tests.el --- Testing some Emacs commands
|
||||
;;; cmds-tests.el --- Testing some Emacs commands -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2013-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; coding-tests.el --- tests for text encoding and decoding
|
||||
;;; coding-tests.el --- tests for text encoding and decoding -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2013-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -296,7 +296,7 @@
|
|||
;;; decoder, not for regression testing.
|
||||
|
||||
(defun generate-ascii-file ()
|
||||
(dotimes (i 100000)
|
||||
(dotimes (_i 100000)
|
||||
(insert-char ?a 80)
|
||||
(insert "\n")))
|
||||
|
||||
|
@ -309,13 +309,13 @@
|
|||
(insert "\n")))
|
||||
|
||||
(defun generate-mostly-nonascii-file ()
|
||||
(dotimes (i 30000)
|
||||
(dotimes (_i 30000)
|
||||
(insert-char ?a 80)
|
||||
(insert "\n"))
|
||||
(dotimes (i 20000)
|
||||
(dotimes (_i 20000)
|
||||
(insert-char ?À 80)
|
||||
(insert "\n"))
|
||||
(dotimes (i 10000)
|
||||
(dotimes (_i 10000)
|
||||
(insert-char ?あ 80)
|
||||
(insert "\n")))
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; decompress-tests.el --- Test suite for decompress.
|
||||
;;; decompress-tests.el --- Test suite for decompress. -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2013-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; doc-tests.el --- Tests for doc.c
|
||||
;;; doc-tests.el --- Tests for doc.c -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2016-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; floatfns-tests.el --- tests for floating point operations
|
||||
;;; floatfns-tests.el --- tests for floating point operations -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright 2017-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; font-tests.el --- Test suite for font-related functions.
|
||||
;;; font-tests.el --- Test suite for font-related functions. -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2011-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; keymap-tests.el --- Test suite for src/keymap.c
|
||||
;;; keymap-tests.el --- Test suite for src/keymap.c -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2015-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; process-tests.el --- Testing the process facilities
|
||||
;;; process-tests.el --- Testing the process facilities -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2013-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
|||
(let ((proc (start-process "test" nil "bash" "-c" "exit 20"))
|
||||
(sentinel-called nil)
|
||||
(start-time (float-time)))
|
||||
(set-process-sentinel proc (lambda (proc msg)
|
||||
(set-process-sentinel proc (lambda (_proc _msg)
|
||||
(setq sentinel-called t)))
|
||||
(while (not (or sentinel-called
|
||||
(> (- (float-time) start-time)
|
||||
|
@ -88,7 +88,7 @@
|
|||
:stderr stderr-buffer))
|
||||
(sentinel-called nil)
|
||||
(start-time (float-time)))
|
||||
(set-process-sentinel proc (lambda (proc msg)
|
||||
(set-process-sentinel proc (lambda (_proc _msg)
|
||||
(setq sentinel-called t)))
|
||||
(while (not (or sentinel-called
|
||||
(> (- (float-time) start-time)
|
||||
|
@ -120,13 +120,13 @@
|
|||
"exit 20"))
|
||||
:stderr stderr-proc))
|
||||
(start-time (float-time)))
|
||||
(set-process-filter proc (lambda (proc input)
|
||||
(set-process-filter proc (lambda (_proc input)
|
||||
(push input stdout-output)))
|
||||
(set-process-sentinel proc (lambda (proc msg)
|
||||
(set-process-sentinel proc (lambda (_proc _msg)
|
||||
(setq sentinel-called t)))
|
||||
(set-process-filter stderr-proc (lambda (proc input)
|
||||
(set-process-filter stderr-proc (lambda (_proc input)
|
||||
(push input stderr-output)))
|
||||
(set-process-sentinel stderr-proc (lambda (proc input)
|
||||
(set-process-sentinel stderr-proc (lambda (_proc _input)
|
||||
(setq stderr-sentinel-called t)))
|
||||
(while (not (or sentinel-called
|
||||
(> (- (float-time) start-time)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; textprop-tests.el --- Test suite for text properties.
|
||||
;;; textprop-tests.el --- Test suite for text properties. -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2015-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; threads.el --- tests for threads.
|
||||
;;; threads.el --- tests for threads. -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; timefns-tests.el -- tests for timefns.c
|
||||
;;; timefns-tests.el -- tests for timefns.c -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2016-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; undo-tests.el --- Tests of primitive-undo
|
||||
;;; undo-tests.el --- Tests of primitive-undo -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; libxml-parse-tests.el --- Test suite for libxml parsing.
|
||||
;;; xml-tests.el --- Test suite for libxml parsing. -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2014-2020 Free Software Foundation, Inc.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue