diff options
| author | Eli Zaretskii | 2020-11-09 16:57:03 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2020-11-09 16:57:03 +0200 |
| commit | bffd5d3a9d44ed99d6a573dc0fabe542d6b3bb8b (patch) | |
| tree | 2da0e2b231fd18ffa54212016c352f24cf60f472 | |
| parent | b83e31bf9561f05204f503236373cbef14d61012 (diff) | |
| parent | 18a7267c32a909bb26bd93d24543155aeb10e042 (diff) | |
| download | emacs-bffd5d3a9d44ed99d6a573dc0fabe542d6b3bb8b.tar.gz emacs-bffd5d3a9d44ed99d6a573dc0fabe542d6b3bb8b.zip | |
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | lisp/gnus/gnus-group.el | 8 | ||||
| -rw-r--r-- | lisp/gnus/gnus-search.el | 55 | ||||
| -rw-r--r-- | lisp/progmodes/cperl-mode.el | 1 | ||||
| -rw-r--r-- | lisp/progmodes/project.el | 4 | ||||
| -rw-r--r-- | lisp/term/ns-win.el | 5 | ||||
| -rw-r--r-- | src/image.c | 102 | ||||
| -rw-r--r-- | src/nsterm.m | 4 | ||||
| -rw-r--r-- | src/xwidget.c | 10 | ||||
| -rw-r--r-- | test/lisp/progmodes/cperl-mode-resources/cperl-bug-19709.pl | 25 | ||||
| -rw-r--r-- | test/lisp/progmodes/cperl-mode-resources/cperl-indent-styles.pl | 10 | ||||
| -rw-r--r-- | test/lisp/progmodes/cperl-mode-tests.el | 38 | ||||
| -rw-r--r-- | test/src/keymap-tests.el | 4 |
13 files changed, 235 insertions, 36 deletions
| @@ -1957,6 +1957,11 @@ image API via 'M-x report-emacs-bug'. | |||
| 1957 | --- | 1957 | --- |
| 1958 | ** The user option 'make-pointer-invisible' is now honored on macOS. | 1958 | ** The user option 'make-pointer-invisible' is now honored on macOS. |
| 1959 | 1959 | ||
| 1960 | -- | ||
| 1961 | ** On macOS, 's-<left>' and 's-<right>' are now bound to | ||
| 1962 | 'move-beginning-of-line' and 'move-end-of-line' respectively. The commands | ||
| 1963 | to select previous/next frame are still bound to 's-~' and 's-`'. | ||
| 1964 | |||
| 1960 | 1965 | ||
| 1961 | ---------------------------------------------------------------------- | 1966 | ---------------------------------------------------------------------- |
| 1962 | This file is part of GNU Emacs. | 1967 | This file is part of GNU Emacs. |
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 9db0e1897a3..c8b97c08524 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -3201,6 +3201,10 @@ non-nil SPECS arg must be an alist with `search-query-spec' and | |||
| 3201 | (cdr (assq 'search-query-spec specs)) | 3201 | (cdr (assq 'search-query-spec specs)) |
| 3202 | (cdr (assq 'nnir-query-spec specs)) | 3202 | (cdr (assq 'nnir-query-spec specs)) |
| 3203 | (gnus-search-make-spec no-parse)))) | 3203 | (gnus-search-make-spec no-parse)))) |
| 3204 | ;; If our query came via an old call to nnir, we know not to | ||
| 3205 | ;; parse the query. | ||
| 3206 | (when (assq 'nnir-query-spec specs) | ||
| 3207 | (setf (alist-get 'raw query-spec) t)) | ||
| 3204 | (gnus-group-make-group | 3208 | (gnus-group-make-group |
| 3205 | name | 3209 | name |
| 3206 | (list 'nnselect "nnselect") | 3210 | (list 'nnselect "nnselect") |
| @@ -3245,6 +3249,10 @@ non-nil SPECS arg must be an alist with `search-query-spec' and | |||
| 3245 | (or (cdr (assq 'search-query-spec specs)) | 3249 | (or (cdr (assq 'search-query-spec specs)) |
| 3246 | (cdr (assq 'nnir-query-spec specs)) | 3250 | (cdr (assq 'nnir-query-spec specs)) |
| 3247 | (gnus-search-make-spec no-parse)))) | 3251 | (gnus-search-make-spec no-parse)))) |
| 3252 | ;; If our query came via an old call to nnir, we know not to parse | ||
| 3253 | ;; the query. | ||
| 3254 | (when (assq 'nnir-query-spec specs) | ||
| 3255 | (setf (alist-get 'raw query-spec) t)) | ||
| 3248 | (gnus-group-read-ephemeral-group | 3256 | (gnus-group-read-ephemeral-group |
| 3249 | (concat "nnselect-" (message-unique-id)) | 3257 | (concat "nnselect-" (message-unique-id)) |
| 3250 | (list 'nnselect "nnselect") | 3258 | (list 'nnselect "nnselect") |
diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el index abee7c47116..8b71daa9ff0 100644 --- a/lisp/gnus/gnus-search.el +++ b/lisp/gnus/gnus-search.el | |||
| @@ -962,12 +962,18 @@ Responsible for handling and, or, and parenthetical expressions.") | |||
| 962 | 962 | ||
| 963 | (cl-defmethod gnus-search-make-query-string ((engine gnus-search-engine) | 963 | (cl-defmethod gnus-search-make-query-string ((engine gnus-search-engine) |
| 964 | query-spec) | 964 | query-spec) |
| 965 | (if (and gnus-search-use-parsed-queries | 965 | (let ((parsed-query (alist-get 'parsed-query query-spec)) |
| 966 | (null (alist-get 'raw query-spec)) | 966 | (raw-query (alist-get 'query query-spec))) |
| 967 | (null (slot-value engine 'raw-queries-p))) | 967 | (if (and gnus-search-use-parsed-queries |
| 968 | (gnus-search-transform | 968 | (null (alist-get 'raw query-spec)) |
| 969 | engine (alist-get 'parsed-query query-spec)) | 969 | (null (slot-value engine 'raw-queries-p)) |
| 970 | (alist-get 'query query-spec))) | 970 | parsed-query) |
| 971 | (gnus-search-transform engine parsed-query) | ||
| 972 | (if (listp raw-query) | ||
| 973 | ;; Some callers are sending this in as (query "query"), not | ||
| 974 | ;; as a cons cell? | ||
| 975 | (car raw-query) | ||
| 976 | raw-query)))) | ||
| 971 | 977 | ||
| 972 | (defsubst gnus-search-single-p (query) | 978 | (defsubst gnus-search-single-p (query) |
| 973 | "Return t if QUERY is a search for a single message." | 979 | "Return t if QUERY is a search for a single message." |
| @@ -1108,7 +1114,7 @@ Other capabilities could be tested here." | |||
| 1108 | ;; TODO: Don't exclude booleans and date keys, just check for them | 1114 | ;; TODO: Don't exclude booleans and date keys, just check for them |
| 1109 | ;; before checking for general keywords. | 1115 | ;; before checking for general keywords. |
| 1110 | (defvar gnus-search-imap-search-keys | 1116 | (defvar gnus-search-imap-search-keys |
| 1111 | '(body cc bcc from header keyword larger smaller subject text to uid) | 1117 | '(body cc bcc from header keyword larger smaller subject text to uid x-gm-raw) |
| 1112 | "Known IMAP search keys, excluding booleans and date keys.") | 1118 | "Known IMAP search keys, excluding booleans and date keys.") |
| 1113 | 1119 | ||
| 1114 | (cl-defmethod gnus-search-transform ((_ gnus-search-imap) | 1120 | (cl-defmethod gnus-search-transform ((_ gnus-search-imap) |
| @@ -1952,7 +1958,8 @@ remaining string, then adds all that to the top-level spec." | |||
| 1952 | (setq query | 1958 | (setq query |
| 1953 | (string-trim (replace-match "" t t query 0))) | 1959 | (string-trim (replace-match "" t t query 0))) |
| 1954 | (setf (alist-get 'query query-spec) query))) | 1960 | (setf (alist-get 'query query-spec) query))) |
| 1955 | (when gnus-search-use-parsed-queries | 1961 | (when (and gnus-search-use-parsed-queries |
| 1962 | (null (alist-get 'raw query-spec))) | ||
| 1956 | (setf (alist-get 'parsed-query query-spec) | 1963 | (setf (alist-get 'parsed-query query-spec) |
| 1957 | (gnus-search-parse-query query))) | 1964 | (gnus-search-parse-query query))) |
| 1958 | query-spec)) | 1965 | query-spec)) |
| @@ -1963,25 +1970,29 @@ remaining string, then adds all that to the top-level spec." | |||
| 1963 | (defun gnus-search-server-to-engine (srv) | 1970 | (defun gnus-search-server-to-engine (srv) |
| 1964 | (let* ((method (gnus-server-to-method srv)) | 1971 | (let* ((method (gnus-server-to-method srv)) |
| 1965 | (engine-config (assoc 'gnus-search-engine (cddr method))) | 1972 | (engine-config (assoc 'gnus-search-engine (cddr method))) |
| 1966 | (server | 1973 | (server (or (nth 1 engine-config) |
| 1967 | (or (nth 1 engine-config) | 1974 | (cdr-safe (assoc (car method) gnus-search-default-engines)) |
| 1968 | (cdr-safe (assoc (car method) gnus-search-default-engines)) | 1975 | (when-let ((old (assoc 'nnir-search-engine |
| 1969 | (when-let ((old (assoc 'nnir-search-engine | 1976 | (cddr method)))) |
| 1970 | (cddr method)))) | 1977 | (nnheader-message |
| 1971 | (nnheader-message | 1978 | 8 "\"nnir-search-engine\" is no longer a valid parameter") |
| 1972 | 8 "\"nnir-search-engine\" is no longer a valid parameter") | 1979 | (nth 1 old)))) |
| 1973 | (pcase (nth 1 old) | 1980 | inst) |
| 1974 | ('notmuch 'gnus-search-notmuch) | 1981 | (setq server |
| 1975 | ('namazu 'gnus-search-namazu) | 1982 | (pcase server |
| 1976 | ('find-grep 'gnus-search-find-grep))))) | 1983 | ('notmuch 'gnus-search-notmuch) |
| 1977 | (inst | 1984 | ('namazu 'gnus-search-namazu) |
| 1985 | ('find-grep 'gnus-search-find-grep) | ||
| 1986 | ('imap 'gnus-search-imap) | ||
| 1987 | (_ server)) | ||
| 1988 | inst | ||
| 1978 | (cond | 1989 | (cond |
| 1979 | ((null server) nil) | 1990 | ((null server) nil) |
| 1980 | ((eieio-object-p server) | 1991 | ((eieio-object-p server) |
| 1981 | server) | 1992 | server) |
| 1982 | ((class-p server) | 1993 | ((class-p server) |
| 1983 | (make-instance server)) | 1994 | (make-instance server)) |
| 1984 | (t nil)))) | 1995 | (t nil))) |
| 1985 | (if inst | 1996 | (if inst |
| 1986 | (when (cddr engine-config) | 1997 | (when (cddr engine-config) |
| 1987 | ;; We're not being completely backward-compatible here, | 1998 | ;; We're not being completely backward-compatible here, |
| @@ -1994,7 +2005,7 @@ remaining string, then adds all that to the top-level spec." | |||
| 1994 | (nnheader-message | 2005 | (nnheader-message |
| 1995 | 5 "Invalid search engine parameter: (%s %s)" | 2006 | 5 "Invalid search engine parameter: (%s %s)" |
| 1996 | key value))))) | 2007 | key value))))) |
| 1997 | (error "No search engine defined for %S" method)) | 2008 | (error "No search engine defined for %s" srv)) |
| 1998 | inst)) | 2009 | inst)) |
| 1999 | 2010 | ||
| 2000 | (declare-function gnus-registry-get-id-key "gnus-registry" (id key)) | 2011 | (declare-function gnus-registry-get-id-key "gnus-registry" (id key)) |
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 6178cdfc9ba..d5b30025e7b 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el | |||
| @@ -5983,6 +5983,7 @@ else | |||
| 5983 | (cperl-continued-brace-offset . 0) | 5983 | (cperl-continued-brace-offset . 0) |
| 5984 | (cperl-label-offset . -2) | 5984 | (cperl-label-offset . -2) |
| 5985 | (cperl-continued-statement-offset . 4) | 5985 | (cperl-continued-statement-offset . 4) |
| 5986 | (cperl-close-paren-offset . -4) | ||
| 5986 | (cperl-extra-newline-before-brace . nil) | 5987 | (cperl-extra-newline-before-brace . nil) |
| 5987 | (cperl-extra-newline-before-brace-multiline . nil) | 5988 | (cperl-extra-newline-before-brace-multiline . nil) |
| 5988 | (cperl-merge-trailing-else . nil) | 5989 | (cperl-merge-trailing-else . nil) |
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 6c647a092a9..a648618e828 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el | |||
| @@ -1160,7 +1160,9 @@ With some possible metadata (to be decided).") | |||
| 1160 | (let ((filename project-list-file)) | 1160 | (let ((filename project-list-file)) |
| 1161 | (with-temp-buffer | 1161 | (with-temp-buffer |
| 1162 | (insert ";;; -*- lisp-data -*-\n") | 1162 | (insert ";;; -*- lisp-data -*-\n") |
| 1163 | (pp project--list (current-buffer)) | 1163 | (let ((print-length nil) |
| 1164 | (print-level nil)) | ||
| 1165 | (pp project--list (current-buffer))) | ||
| 1164 | (write-region nil nil filename nil 'silent)))) | 1166 | (write-region nil nil filename nil 'silent)))) |
| 1165 | 1167 | ||
| 1166 | ;;;###autoload | 1168 | ;;;###autoload |
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index cc7a3762b4a..8273c067f8b 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el | |||
| @@ -148,9 +148,8 @@ The properties returned may include `top', `left', `height', and `width'." | |||
| 148 | (define-key global-map [?\s-|] 'shell-command-on-region) | 148 | (define-key global-map [?\s-|] 'shell-command-on-region) |
| 149 | (define-key global-map [s-kp-bar] 'shell-command-on-region) | 149 | (define-key global-map [s-kp-bar] 'shell-command-on-region) |
| 150 | (define-key global-map [?\C-\s- ] 'ns-do-show-character-palette) | 150 | (define-key global-map [?\C-\s- ] 'ns-do-show-character-palette) |
| 151 | ;; (as in Terminal.app) | 151 | (define-key global-map [s-right] 'move-end-of-line) |
| 152 | (define-key global-map [s-right] 'ns-next-frame) | 152 | (define-key global-map [s-left] 'move-beginning-of-line) |
| 153 | (define-key global-map [s-left] 'ns-prev-frame) | ||
| 154 | 153 | ||
| 155 | (define-key global-map [home] 'beginning-of-buffer) | 154 | (define-key global-map [home] 'beginning-of-buffer) |
| 156 | (define-key global-map [end] 'end-of-buffer) | 155 | (define-key global-map [end] 'end-of-buffer) |
diff --git a/src/image.c b/src/image.c index c857b8e62a4..b4cb1b7bf83 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -9545,6 +9545,9 @@ DEF_DLL_FN (gboolean, rsvg_handle_close, (RsvgHandle *, GError **)); | |||
| 9545 | #endif | 9545 | #endif |
| 9546 | 9546 | ||
| 9547 | #if LIBRSVG_CHECK_VERSION (2, 46, 0) | 9547 | #if LIBRSVG_CHECK_VERSION (2, 46, 0) |
| 9548 | DEF_DLL_FN (void, rsvg_handle_get_intrinsic_dimensions, | ||
| 9549 | RsvgHandle *, gboolean *, RsvgLength *, gboolean *, | ||
| 9550 | RsvgLength *, gboolean *, RsvgRectangle *)); | ||
| 9548 | DEF_DLL_FN (gboolean, rsvg_handle_get_geometry_for_layer, | 9551 | DEF_DLL_FN (gboolean, rsvg_handle_get_geometry_for_layer, |
| 9549 | (RsvgHandle *, const char *, const RsvgRectangle *, | 9552 | (RsvgHandle *, const char *, const RsvgRectangle *, |
| 9550 | RsvgRectangle *, RsvgRectangle *, GError **)); | 9553 | RsvgRectangle *, RsvgRectangle *, GError **)); |
| @@ -9599,6 +9602,7 @@ init_svg_functions (void) | |||
| 9599 | LOAD_DLL_FN (library, rsvg_handle_close); | 9602 | LOAD_DLL_FN (library, rsvg_handle_close); |
| 9600 | #endif | 9603 | #endif |
| 9601 | #if LIBRSVG_CHECK_VERSION (2, 46, 0) | 9604 | #if LIBRSVG_CHECK_VERSION (2, 46, 0) |
| 9605 | LOAD_DLL_FN (library, rsvg_handle_get_intrinsic_dimensions); | ||
| 9602 | LOAD_DLL_FN (library, rsvg_handle_get_geometry_for_layer); | 9606 | LOAD_DLL_FN (library, rsvg_handle_get_geometry_for_layer); |
| 9603 | #else | 9607 | #else |
| 9604 | LOAD_DLL_FN (library, rsvg_handle_get_dimensions); | 9608 | LOAD_DLL_FN (library, rsvg_handle_get_dimensions); |
| @@ -9742,6 +9746,44 @@ svg_load (struct frame *f, struct image *img) | |||
| 9742 | return success_p; | 9746 | return success_p; |
| 9743 | } | 9747 | } |
| 9744 | 9748 | ||
| 9749 | static double | ||
| 9750 | svg_css_length_to_pixels (RsvgLength length) | ||
| 9751 | { | ||
| 9752 | /* FIXME: 96 appears to be a pretty standard DPI but we should | ||
| 9753 | probably use the real DPI if we can get it. */ | ||
| 9754 | double dpi = 96; | ||
| 9755 | double value = length.length; | ||
| 9756 | |||
| 9757 | switch (length.unit) | ||
| 9758 | { | ||
| 9759 | case RSVG_UNIT_PX: | ||
| 9760 | /* Already a pixel value. */ | ||
| 9761 | break; | ||
| 9762 | case RSVG_UNIT_CM: | ||
| 9763 | /* 2.54 cm in an inch. */ | ||
| 9764 | value = dpi * value / 2.54; | ||
| 9765 | case RSVG_UNIT_MM: | ||
| 9766 | /* 25.4 mm in an inch. */ | ||
| 9767 | value = dpi * value / 25.4; | ||
| 9768 | break; | ||
| 9769 | case RSVG_UNIT_PT: | ||
| 9770 | /* 72 points in an inch. */ | ||
| 9771 | value = dpi * value / 72; | ||
| 9772 | case RSVG_UNIT_PC: | ||
| 9773 | /* 6 picas in an inch. */ | ||
| 9774 | value = dpi * value / 6; | ||
| 9775 | case RSVG_UNIT_IN: | ||
| 9776 | value *= dpi; | ||
| 9777 | break; | ||
| 9778 | default: | ||
| 9779 | /* Probably one of em, ex, or %. We can't know what the pixel | ||
| 9780 | value is without more information. */ | ||
| 9781 | value = 0; | ||
| 9782 | } | ||
| 9783 | |||
| 9784 | return value; | ||
| 9785 | } | ||
| 9786 | |||
| 9745 | /* Load frame F and image IMG. CONTENTS contains the SVG XML data to | 9787 | /* Load frame F and image IMG. CONTENTS contains the SVG XML data to |
| 9746 | be parsed, SIZE is its size, and FILENAME is the name of the SVG | 9788 | be parsed, SIZE is its size, and FILENAME is the name of the SVG |
| 9747 | file being loaded. | 9789 | file being loaded. |
| @@ -9810,11 +9852,48 @@ svg_load_image (struct frame *f, struct image *img, char *contents, | |||
| 9810 | #if LIBRSVG_CHECK_VERSION (2, 46, 0) | 9852 | #if LIBRSVG_CHECK_VERSION (2, 46, 0) |
| 9811 | RsvgRectangle zero_rect, viewbox, out_logical_rect; | 9853 | RsvgRectangle zero_rect, viewbox, out_logical_rect; |
| 9812 | 9854 | ||
| 9813 | rsvg_handle_get_geometry_for_layer (rsvg_handle, NULL, | 9855 | /* Try the instrinsic dimensions first. */ |
| 9814 | &zero_rect, &viewbox, | 9856 | gboolean has_width, has_height, has_viewbox; |
| 9815 | &out_logical_rect, NULL); | 9857 | RsvgLength iwidth, iheight; |
| 9816 | viewbox_width = viewbox.x + viewbox.width; | 9858 | |
| 9817 | viewbox_height = viewbox.y + viewbox.height; | 9859 | rsvg_handle_get_intrinsic_dimensions (rsvg_handle, |
| 9860 | &has_width, &iwidth, | ||
| 9861 | &has_height, &iheight, | ||
| 9862 | &has_viewbox, &viewbox); | ||
| 9863 | |||
| 9864 | if (has_width && has_height) | ||
| 9865 | { | ||
| 9866 | /* Success! We can use these values directly. */ | ||
| 9867 | viewbox_width = svg_css_length_to_pixels (iwidth); | ||
| 9868 | viewbox_height = svg_css_length_to_pixels (iheight); | ||
| 9869 | } | ||
| 9870 | else if (has_width && has_viewbox) | ||
| 9871 | { | ||
| 9872 | viewbox_width = svg_css_length_to_pixels (iwidth); | ||
| 9873 | viewbox_height = svg_css_length_to_pixels (iwidth) | ||
| 9874 | * viewbox.width / viewbox.height; | ||
| 9875 | } | ||
| 9876 | else if (has_height && has_viewbox) | ||
| 9877 | { | ||
| 9878 | viewbox_height = svg_css_length_to_pixels (iheight); | ||
| 9879 | viewbox_width = svg_css_length_to_pixels (iheight) | ||
| 9880 | * viewbox.height / viewbox.width; | ||
| 9881 | } | ||
| 9882 | else if (has_viewbox) | ||
| 9883 | { | ||
| 9884 | viewbox_width = viewbox.width; | ||
| 9885 | viewbox_height = viewbox.height; | ||
| 9886 | } | ||
| 9887 | else | ||
| 9888 | { | ||
| 9889 | /* We haven't found a useable set of sizes, so try working out | ||
| 9890 | the visible area. */ | ||
| 9891 | rsvg_handle_get_geometry_for_layer (rsvg_handle, NULL, | ||
| 9892 | &zero_rect, &viewbox, | ||
| 9893 | &out_logical_rect, NULL); | ||
| 9894 | viewbox_width = viewbox.x + viewbox.width; | ||
| 9895 | viewbox_height = viewbox.y + viewbox.height; | ||
| 9896 | } | ||
| 9818 | #else | 9897 | #else |
| 9819 | /* The function used above to get the geometry of the visible area | 9898 | /* The function used above to get the geometry of the visible area |
| 9820 | of the SVG are only available in librsvg 2.46 and above, so in | 9899 | of the SVG are only available in librsvg 2.46 and above, so in |
| @@ -9827,6 +9906,19 @@ svg_load_image (struct frame *f, struct image *img, char *contents, | |||
| 9827 | viewbox_width = dimension_data.width; | 9906 | viewbox_width = dimension_data.width; |
| 9828 | viewbox_height = dimension_data.height; | 9907 | viewbox_height = dimension_data.height; |
| 9829 | #endif | 9908 | #endif |
| 9909 | |||
| 9910 | if (viewbox_width == 0 || viewbox_height == 0) | ||
| 9911 | { | ||
| 9912 | /* We do not have any usable dimensions, so make some up. The | ||
| 9913 | values below are supposedly the default values most web | ||
| 9914 | browsers use for SVGs with no set size. */ | ||
| 9915 | /* FIXME: At this stage we should perhaps consider rendering the | ||
| 9916 | image out to a bitmap and getting the dimensions from | ||
| 9917 | that. */ | ||
| 9918 | viewbox_width = 300; | ||
| 9919 | viewbox_height = 150; | ||
| 9920 | } | ||
| 9921 | |||
| 9830 | compute_image_size (viewbox_width, viewbox_height, img->spec, | 9922 | compute_image_size (viewbox_width, viewbox_height, img->spec, |
| 9831 | &width, &height); | 9923 | &width, &height); |
| 9832 | 9924 | ||
diff --git a/src/nsterm.m b/src/nsterm.m index fa38350a2f6..4fad521b74c 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -1782,6 +1782,8 @@ ns_destroy_window (struct frame *f) | |||
| 1782 | { | 1782 | { |
| 1783 | NSTRACE ("ns_destroy_window"); | 1783 | NSTRACE ("ns_destroy_window"); |
| 1784 | 1784 | ||
| 1785 | check_window_system (f); | ||
| 1786 | |||
| 1785 | /* If this frame has a parent window, detach it as not doing so can | 1787 | /* If this frame has a parent window, detach it as not doing so can |
| 1786 | cause a crash in GNUStep. */ | 1788 | cause a crash in GNUStep. */ |
| 1787 | if (FRAME_PARENT_FRAME (f) != NULL) | 1789 | if (FRAME_PARENT_FRAME (f) != NULL) |
| @@ -1792,7 +1794,7 @@ ns_destroy_window (struct frame *f) | |||
| 1792 | [parent removeChildWindow: child]; | 1794 | [parent removeChildWindow: child]; |
| 1793 | } | 1795 | } |
| 1794 | 1796 | ||
| 1795 | check_window_system (f); | 1797 | [[FRAME_NS_VIEW (f) window] close]; |
| 1796 | ns_free_frame_resources (f); | 1798 | ns_free_frame_resources (f); |
| 1797 | ns_window_num--; | 1799 | ns_window_num--; |
| 1798 | } | 1800 | } |
diff --git a/src/xwidget.c b/src/xwidget.c index 031975fafb9..e078a28a35b 100644 --- a/src/xwidget.c +++ b/src/xwidget.c | |||
| @@ -128,6 +128,16 @@ Returns the newly constructed xwidget, or nil if construction fails. */) | |||
| 128 | if (EQ (xw->type, Qwebkit)) | 128 | if (EQ (xw->type, Qwebkit)) |
| 129 | { | 129 | { |
| 130 | xw->widget_osr = webkit_web_view_new (); | 130 | xw->widget_osr = webkit_web_view_new (); |
| 131 | |||
| 132 | /* webkitgtk uses GSubprocess which sets sigaction causing | ||
| 133 | Emacs to not catch SIGCHLD with its usual handle setup in | ||
| 134 | catch_child_signal(). This resets the SIGCHLD | ||
| 135 | sigaction. */ | ||
| 136 | struct sigaction old_action; | ||
| 137 | sigaction (SIGCHLD, NULL, &old_action); | ||
| 138 | webkit_web_view_load_uri(WEBKIT_WEB_VIEW (xw->widget_osr), | ||
| 139 | "about:blank"); | ||
| 140 | sigaction (SIGCHLD, &old_action, NULL); | ||
| 131 | } | 141 | } |
| 132 | 142 | ||
| 133 | gtk_widget_set_size_request (GTK_WIDGET (xw->widget_osr), xw->width, | 143 | gtk_widget_set_size_request (GTK_WIDGET (xw->widget_osr), xw->width, |
diff --git a/test/lisp/progmodes/cperl-mode-resources/cperl-bug-19709.pl b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-19709.pl new file mode 100644 index 00000000000..f7c51a2ce57 --- /dev/null +++ b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-19709.pl | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | # -------- bug#19709: input -------- | ||
| 2 | my $a = func1( | ||
| 3 | Module::test() | ||
| 4 | ); | ||
| 5 | |||
| 6 | my $b = func2( | ||
| 7 | test() | ||
| 8 | ); | ||
| 9 | |||
| 10 | my $c = func3( | ||
| 11 | Module::test(), | ||
| 12 | ); | ||
| 13 | # -------- bug#19709: expected output -------- | ||
| 14 | my $a = func1( | ||
| 15 | Module::test() | ||
| 16 | ); | ||
| 17 | |||
| 18 | my $b = func2( | ||
| 19 | test() | ||
| 20 | ); | ||
| 21 | |||
| 22 | my $c = func3( | ||
| 23 | Module::test(), | ||
| 24 | ); | ||
| 25 | # -------- bug#19709: end -------- | ||
diff --git a/test/lisp/progmodes/cperl-mode-resources/cperl-indent-styles.pl b/test/lisp/progmodes/cperl-mode-resources/cperl-indent-styles.pl index 0832f868288..371b19b7309 100644 --- a/test/lisp/progmodes/cperl-mode-resources/cperl-indent-styles.pl +++ b/test/lisp/progmodes/cperl-mode-resources/cperl-indent-styles.pl | |||
| @@ -42,3 +42,13 @@ die "This world is backwards"; | |||
| 42 | } | 42 | } |
| 43 | } | 43 | } |
| 44 | # -------- PBP uncuddle else: end -------- | 44 | # -------- PBP uncuddle else: end -------- |
| 45 | |||
| 46 | # -------- PBP closing paren offset: input -------- | ||
| 47 | my $a = func1( | ||
| 48 | Module::test() | ||
| 49 | ); | ||
| 50 | # -------- PBP closing paren offset: expected output -------- | ||
| 51 | my $a = func1( | ||
| 52 | Module::test() | ||
| 53 | ); | ||
| 54 | # -------- PBP closing paren offset: end -------- | ||
diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index effebc8068c..bd8a1a9f16b 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el | |||
| @@ -249,6 +249,44 @@ Perl is not Lisp: An open paren in column 0 does not start a function." | |||
| 249 | (setq got (concat "test case " name ":\n" (buffer-string))) | 249 | (setq got (concat "test case " name ":\n" (buffer-string))) |
| 250 | (should (equal got expected)))))))) | 250 | (should (equal got expected)))))))) |
| 251 | 251 | ||
| 252 | (ert-deftest cperl-bug19709 () | ||
| 253 | "Verify that indentation of closing paren works as intended. | ||
| 254 | Note that Perl mode has no setting for close paren offset, per | ||
| 255 | documentation it does the right thing anyway." | ||
| 256 | (let ((file (ert-resource-file "cperl-bug-19709.pl"))) | ||
| 257 | (with-temp-buffer | ||
| 258 | (insert-file-contents file) | ||
| 259 | (goto-char (point-min)) | ||
| 260 | (while (re-search-forward | ||
| 261 | (concat "^# ?-+ \\_<\\(?1:.+?\\)\\_>: input ?-+\n" | ||
| 262 | "\\(?2:\\(?:.*\n\\)+?\\)" | ||
| 263 | "# ?-+ \\1: expected output ?-+\n" | ||
| 264 | "\\(?3:\\(?:.*\n\\)+?\\)" | ||
| 265 | "# ?-+ \\1: end ?-+") | ||
| 266 | nil t) | ||
| 267 | (let ((name (match-string 1)) | ||
| 268 | (code (match-string 2)) | ||
| 269 | (expected (match-string 3)) | ||
| 270 | got) | ||
| 271 | (with-temp-buffer | ||
| 272 | (insert code) | ||
| 273 | (funcall cperl-test-mode) | ||
| 274 | (setq-local | ||
| 275 | ;; settings from the bug report | ||
| 276 | cperl-indent-level 4 | ||
| 277 | cperl-indent-parens-as-block t | ||
| 278 | cperl-close-paren-offset -4 | ||
| 279 | ;; same, adapted for per-mode | ||
| 280 | perl-indent-level 4 | ||
| 281 | perl-indent-parens-as-block t) | ||
| 282 | (goto-char (point-min)) | ||
| 283 | (while (null (eobp)) | ||
| 284 | (cperl-indent-command) | ||
| 285 | (next-line)) | ||
| 286 | (setq expected (concat "test case " name ":\n" expected)) | ||
| 287 | (setq got (concat "test case " name ":\n" (buffer-string))) | ||
| 288 | (should (equal got expected)))))))) | ||
| 289 | |||
| 252 | (ert-deftest cperl-bug37127 () | 290 | (ert-deftest cperl-bug37127 () |
| 253 | "Verify that closing a paren in a regex goes without a message. | 291 | "Verify that closing a paren in a regex goes without a message. |
| 254 | Also check that the message is issued if the regex terminator is | 292 | Also check that the message is issued if the regex terminator is |
diff --git a/test/src/keymap-tests.el b/test/src/keymap-tests.el index 8331a41e3f8..e3dd8420d7b 100644 --- a/test/src/keymap-tests.el +++ b/test/src/keymap-tests.el | |||
| @@ -48,10 +48,6 @@ | |||
| 48 | (set-keymap-parent map help-mode-map) | 48 | (set-keymap-parent map help-mode-map) |
| 49 | (should (equal (keymap-parent map) help-mode-map)))) | 49 | (should (equal (keymap-parent map) help-mode-map)))) |
| 50 | 50 | ||
| 51 | (ert-deftest keymap-keymap-set-parent/returns-parent () | ||
| 52 | (let ((map (make-keymap))) | ||
| 53 | (should (equal (set-keymap-parent map help-mode-map) help-mode-map)))) | ||
| 54 | |||
| 55 | (ert-deftest keymap-copy-keymap/is-equal () | 51 | (ert-deftest keymap-copy-keymap/is-equal () |
| 56 | (should (equal (copy-keymap help-mode-map) help-mode-map))) | 52 | (should (equal (copy-keymap help-mode-map) help-mode-map))) |
| 57 | 53 | ||