diff options
| author | Paul Eggert | 2016-01-30 11:28:37 -0800 |
|---|---|---|
| committer | Paul Eggert | 2016-01-30 11:28:37 -0800 |
| commit | 1a9cec16fe8d805dbb9f3a082bebcdefb878cf13 (patch) | |
| tree | d9aeebb668e61da05bbf2ef88eabc9b4f015923a | |
| parent | 3b71a72a777237c8ef34835a2021adc8eb5e5c7f (diff) | |
| parent | 3f481ad0072ea4fe300af7f326de9049a8d32d4a (diff) | |
| download | emacs-1a9cec16fe8d805dbb9f3a082bebcdefb878cf13.tar.gz emacs-1a9cec16fe8d805dbb9f3a082bebcdefb878cf13.zip | |
Merge from origin/emacs-25
3f481ad Rename xref-query-replace to xref-query-replace-in-results
62f4ed4 Update cl-defgeneric and cl-defmethod docstrings
2111e0e Comment out next-error-function integration in xref
4e11ad3 Correct a use of "which" in intro.texi
a1865bc Distinguish the two meanings of Java's keyword "default". Fixes bug #22358.
76045f7 Don't operate on menu bar of nonexistent frame
c32f3bc Unbreak the GNUstep build.
| -rw-r--r-- | doc/emacs/dired.texi | 4 | ||||
| -rw-r--r-- | doc/emacs/maintaining.texi | 12 | ||||
| -rw-r--r-- | doc/lispref/intro.texi | 2 | ||||
| -rw-r--r-- | etc/NEWS | 4 | ||||
| -rw-r--r-- | lisp/dired-aux.el | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-generic.el | 24 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 15 | ||||
| -rw-r--r-- | lisp/progmodes/cc-langs.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/xref.el | 10 | ||||
| -rw-r--r-- | src/nsterm.m | 23 | ||||
| -rw-r--r-- | src/xfns.c | 21 |
11 files changed, 75 insertions, 48 deletions
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 123f1aea936..13242d12d3c 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi | |||
| @@ -797,8 +797,8 @@ Perform @code{query-replace-regexp} on each of the specified files, | |||
| 797 | replacing matches for @var{regexp} with the string | 797 | replacing matches for @var{regexp} with the string |
| 798 | @var{to} (@code{dired-do-find-regexp-and-replace}). | 798 | @var{to} (@code{dired-do-find-regexp-and-replace}). |
| 799 | 799 | ||
| 800 | This command is a variant of @code{xref-query-replace}. It presents | 800 | This command is a variant of @code{xref-query-replace-in-results}. It |
| 801 | an @file{*xref*} buffer that lists all the matches of @var{regexp}, | 801 | presents an @file{*xref*} buffer that lists all the matches of @var{regexp}, |
| 802 | and you can use the special commands in that buffer (@pxref{Xref | 802 | and you can use the special commands in that buffer (@pxref{Xref |
| 803 | Commands}). In particular, if you exit the query replace loop, you | 803 | Commands}). In particular, if you exit the query replace loop, you |
| 804 | can use @kbd{r} in that buffer to replace more matches. | 804 | can use @kbd{r} in that buffer to replace more matches. |
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 90af5c8b17d..471a16b57de 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi | |||
| @@ -1875,11 +1875,11 @@ Move to the previous reference and display it in the other window | |||
| 1875 | @findex xref-show-location-at-point | 1875 | @findex xref-show-location-at-point |
| 1876 | Display the reference on the current line in the other window | 1876 | Display the reference on the current line in the other window |
| 1877 | (@code{xref-show-location-at-point}). | 1877 | (@code{xref-show-location-at-point}). |
| 1878 | @findex xref-query-replace | 1878 | @findex xref-query-replace-in-results |
| 1879 | @item r @var{pattern} @key{RET} @var{replacement} @key{RET} | 1879 | @item r @var{pattern} @key{RET} @var{replacement} @key{RET} |
| 1880 | Perform interactive query-replace on references that match | 1880 | Perform interactive query-replace on references that match |
| 1881 | @var{pattern} (@code{xref-query-replace}), replacing the match with | 1881 | @var{pattern} (@code{xref-query-replace-in-results}), replacing |
| 1882 | @var{replacement}. @xref{Identifier Search}. | 1882 | the match with @var{replacement}. @xref{Identifier Search}. |
| 1883 | @findex xref-quit | 1883 | @findex xref-quit |
| 1884 | @item q | 1884 | @item q |
| 1885 | Quit the window showing the @file{*xref*} buffer (@code{xref-quit}). | 1885 | Quit the window showing the @file{*xref*} buffer (@code{xref-quit}). |
| @@ -1901,7 +1901,7 @@ them. | |||
| 1901 | @table @kbd | 1901 | @table @kbd |
| 1902 | @item M-? | 1902 | @item M-? |
| 1903 | Find all the references for the identifier at point. | 1903 | Find all the references for the identifier at point. |
| 1904 | @item M-x xref-query-replace @key{RET} @var{regexp} @key{RET} @var{replacement} @key{RET} | 1904 | @item M-x xref-query-replace-in-results @key{RET} @var{regexp} @key{RET} @var{replacement} @key{RET} |
| 1905 | Interactively replace @var{regexp} with @var{replacement} in the names | 1905 | Interactively replace @var{regexp} with @var{replacement} in the names |
| 1906 | of all the identifiers shown in the @file{*xref*} buffer. | 1906 | of all the identifiers shown in the @file{*xref*} buffer. |
| 1907 | @item M-x tags-search @key{RET} @var{regexp} @key{RET} | 1907 | @item M-x tags-search @key{RET} @var{regexp} @key{RET} |
| @@ -1923,8 +1923,8 @@ identifier, showing the file name and the line where the identifier is | |||
| 1923 | referenced. The XREF mode commands are available in this buffer, see | 1923 | referenced. The XREF mode commands are available in this buffer, see |
| 1924 | @ref{Xref Commands}. | 1924 | @ref{Xref Commands}. |
| 1925 | 1925 | ||
| 1926 | @findex xref-query-replace | 1926 | @findex xref-query-replace-in-results |
| 1927 | @kbd{M-x xref-query-replace} reads a regexp to match identifier | 1927 | @kbd{M-x xref-query-replace-in-results} reads a regexp to match identifier |
| 1928 | names and a replacement string, just like ordinary @kbd{M-x | 1928 | names and a replacement string, just like ordinary @kbd{M-x |
| 1929 | query-replace-regexp}. It then performs the specified replacement in | 1929 | query-replace-regexp}. It then performs the specified replacement in |
| 1930 | the names of the matching identifiers in all the places in all the | 1930 | the names of the matching identifiers in all the places in all the |
diff --git a/doc/lispref/intro.texi b/doc/lispref/intro.texi index 9d4a72009ed..0f42d4d8a7f 100644 --- a/doc/lispref/intro.texi +++ b/doc/lispref/intro.texi | |||
| @@ -191,7 +191,7 @@ in Lisp programs also. | |||
| 191 | In contexts where a truth value is expected, any non-@code{nil} value | 191 | In contexts where a truth value is expected, any non-@code{nil} value |
| 192 | is considered to be @var{true}. However, @code{t} is the preferred way | 192 | is considered to be @var{true}. However, @code{t} is the preferred way |
| 193 | to represent the truth value @var{true}. When you need to choose a | 193 | to represent the truth value @var{true}. When you need to choose a |
| 194 | value which represents @var{true}, and there is no other basis for | 194 | value that represents @var{true}, and there is no other basis for |
| 195 | choosing, use @code{t}. The symbol @code{t} always has the value | 195 | choosing, use @code{t}. The symbol @code{t} always has the value |
| 196 | @code{t}. | 196 | @code{t}. |
| 197 | 197 | ||
| @@ -1230,8 +1230,8 @@ viewing HTML files and the like. | |||
| 1230 | 1230 | ||
| 1231 | *** New user interface for the `A' and `Q' commands. | 1231 | *** New user interface for the `A' and `Q' commands. |
| 1232 | These keys, now bound to `dired-do-find-regexp' and | 1232 | These keys, now bound to `dired-do-find-regexp' and |
| 1233 | `dired-do-find-regexp-and-replace', work similarly to | 1233 | `dired-do-find-regexp-and-replace', work similarly to `xref-find-apropos' |
| 1234 | `xref-find-apropos' and `xref-query-replace': they present the matches | 1234 | and `xref-query-replace-in-results': they present the matches |
| 1235 | in the `*xref*' buffer and let you move through the matches. No need | 1235 | in the `*xref*' buffer and let you move through the matches. No need |
| 1236 | to use `tags-loop-continue' to resume the search or replace loop. The | 1236 | to use `tags-loop-continue' to resume the search or replace loop. The |
| 1237 | previous commands, `dired-do-search' and | 1237 | previous commands, `dired-do-search' and |
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index ab10edeedbf..9bcb1f94b56 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -2714,7 +2714,7 @@ with the command \\[tags-loop-continue]." | |||
| 2714 | '(dired-get-marked-files nil nil 'dired-nondirectory-p))) | 2714 | '(dired-get-marked-files nil nil 'dired-nondirectory-p))) |
| 2715 | 2715 | ||
| 2716 | (declare-function xref--show-xrefs "xref") | 2716 | (declare-function xref--show-xrefs "xref") |
| 2717 | (declare-function xref-query-replace "xref") | 2717 | (declare-function xref-query-replace-in-results "xref") |
| 2718 | 2718 | ||
| 2719 | ;;;###autoload | 2719 | ;;;###autoload |
| 2720 | (defun dired-do-find-regexp (regexp) | 2720 | (defun dired-do-find-regexp (regexp) |
| @@ -2746,7 +2746,7 @@ with the command \\[tags-loop-continue]." | |||
| 2746 | "Query replace regexp in marked files" t t))) | 2746 | "Query replace regexp in marked files" t t))) |
| 2747 | (list (nth 0 common) (nth 1 common)))) | 2747 | (list (nth 0 common) (nth 1 common)))) |
| 2748 | (with-current-buffer (dired-do-find-regexp from) | 2748 | (with-current-buffer (dired-do-find-regexp from) |
| 2749 | (xref-query-replace from to))) | 2749 | (xref-query-replace-in-results from to))) |
| 2750 | 2750 | ||
| 2751 | (defun dired-nondirectory-p (file) | 2751 | (defun dired-nondirectory-p (file) |
| 2752 | (not (file-directory-p file))) | 2752 | (not (file-directory-p file))) |
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index b0815f5cf5f..5413bdbdf7f 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el | |||
| @@ -83,8 +83,6 @@ | |||
| 83 | ;; - A generic "filter" generalizer (e.g. could be used to cleanly add methods | 83 | ;; - A generic "filter" generalizer (e.g. could be used to cleanly add methods |
| 84 | ;; to cl-generic-combine-methods with a specializer that says it applies only | 84 | ;; to cl-generic-combine-methods with a specializer that says it applies only |
| 85 | ;; when some particular qualifier is used). | 85 | ;; when some particular qualifier is used). |
| 86 | ;; - A way to dispatch on the context (e.g. the major-mode, some global | ||
| 87 | ;; variable, you name it). | ||
| 88 | 86 | ||
| 89 | ;;; Code: | 87 | ;;; Code: |
| 90 | 88 | ||
| @@ -195,9 +193,9 @@ OPTIONS-AND-METHODS currently understands: | |||
| 195 | - (declare DECLARATIONS) | 193 | - (declare DECLARATIONS) |
| 196 | - (:argument-precedence-order &rest ARGS) | 194 | - (:argument-precedence-order &rest ARGS) |
| 197 | - (:method [QUALIFIERS...] ARGS &rest BODY) | 195 | - (:method [QUALIFIERS...] ARGS &rest BODY) |
| 198 | BODY, if present, is used as the body of a default method. | 196 | DEFAULT-BODY, if present, is used as the body of a default method. |
| 199 | 197 | ||
| 200 | \(fn NAME ARGS [DOC-STRING] [OPTIONS-AND-METHODS...] &rest BODY)" | 198 | \(fn NAME ARGS [DOC-STRING] [OPTIONS-AND-METHODS...] &rest DEFAULT-BODY)" |
| 201 | (declare (indent 2) (doc-string 3)) | 199 | (declare (indent 2) (doc-string 3)) |
| 202 | (let* ((doc (if (stringp (car-safe options-and-methods)) | 200 | (let* ((doc (if (stringp (car-safe options-and-methods)) |
| 203 | (pop options-and-methods))) | 201 | (pop options-and-methods))) |
| @@ -360,10 +358,10 @@ the specializer used will be the one returned by BODY." | |||
| 360 | (defmacro cl-defmethod (name args &rest body) | 358 | (defmacro cl-defmethod (name args &rest body) |
| 361 | "Define a new method for generic function NAME. | 359 | "Define a new method for generic function NAME. |
| 362 | I.e. it defines the implementation of NAME to use for invocations where the | 360 | I.e. it defines the implementation of NAME to use for invocations where the |
| 363 | value of the dispatch argument matches the specified TYPE. | 361 | values of the dispatch arguments match the specified TYPEs. |
| 364 | The dispatch argument has to be one of the mandatory arguments, and | 362 | The dispatch arguments have to be among the mandatory arguments, and |
| 365 | all methods of NAME have to use the same argument for dispatch. | 363 | all methods of NAME have to use the same set of arguments for dispatch. |
| 366 | The dispatch argument and TYPE are specified in ARGS where the corresponding | 364 | Each dispatch argument and TYPE are specified in ARGS where the corresponding |
| 367 | formal argument appears as (VAR TYPE) rather than just VAR. | 365 | formal argument appears as (VAR TYPE) rather than just VAR. |
| 368 | 366 | ||
| 369 | The optional second argument QUALIFIER is a specifier that | 367 | The optional second argument QUALIFIER is a specifier that |
| @@ -373,8 +371,14 @@ modifies how the method is combined with other methods, including: | |||
| 373 | :around - Method will be called around everything else | 371 | :around - Method will be called around everything else |
| 374 | The absence of QUALIFIER means this is a \"primary\" method. | 372 | The absence of QUALIFIER means this is a \"primary\" method. |
| 375 | 373 | ||
| 376 | Other than a type, TYPE can also be of the form `(eql VAL)' in | 374 | TYPE can be one of the basic types (see the full list and their |
| 377 | which case this method will be invoked when the argument is `eql' to VAL. | 375 | hierarchy in `cl--generic-typeof-types'), CL struct type, or an |
| 376 | EIEIO class. | ||
| 377 | |||
| 378 | Other than that, TYPE can also be of the form `(eql VAL)' in | ||
| 379 | which case this method will be invoked when the argument is `eql' | ||
| 380 | to VAL, or `(head VAL)', in which case the argument is required | ||
| 381 | to be a cons with VAL as its head. | ||
| 378 | 382 | ||
| 379 | \(fn NAME [QUALIFIER] ARGS &rest [DOCSTRING] BODY)" | 383 | \(fn NAME [QUALIFIER] ARGS &rest [DOCSTRING] BODY)" |
| 380 | (declare (doc-string 3) (indent 2) | 384 | (declare (doc-string 3) (indent 2) |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 7d3f5282214..018805d679f 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -10066,7 +10066,19 @@ comment at the start of cc-engine.el for more info." | |||
| 10066 | paren-state))) | 10066 | paren-state))) |
| 10067 | 10067 | ||
| 10068 | ;; CASE 14: A case or default label | 10068 | ;; CASE 14: A case or default label |
| 10069 | ((looking-at c-label-kwds-regexp) | 10069 | ((save-excursion |
| 10070 | (and (looking-at c-label-kwds-regexp) | ||
| 10071 | (or (c-major-mode-is 'idl-mode) | ||
| 10072 | (and | ||
| 10073 | containing-sexp | ||
| 10074 | (goto-char containing-sexp) | ||
| 10075 | (eq (char-after) ?{) | ||
| 10076 | (progn (c-backward-syntactic-ws) t) | ||
| 10077 | (eq (char-before) ?\)) | ||
| 10078 | (c-go-list-backward) | ||
| 10079 | (progn (c-backward-syntactic-ws) t) | ||
| 10080 | (c-simple-skip-symbol-backward) | ||
| 10081 | (looking-at c-block-stmt-2-key))))) | ||
| 10070 | (if containing-sexp | 10082 | (if containing-sexp |
| 10071 | (progn | 10083 | (progn |
| 10072 | (goto-char containing-sexp) | 10084 | (goto-char containing-sexp) |
| @@ -10082,6 +10094,7 @@ comment at the start of cc-engine.el for more info." | |||
| 10082 | ((save-excursion | 10094 | ((save-excursion |
| 10083 | (back-to-indentation) | 10095 | (back-to-indentation) |
| 10084 | (and (not (looking-at c-syntactic-ws-start)) | 10096 | (and (not (looking-at c-syntactic-ws-start)) |
| 10097 | (not (looking-at c-label-kwds-regexp)) | ||
| 10085 | (c-forward-label))) | 10098 | (c-forward-label))) |
| 10086 | (cond (containing-decl-open | 10099 | (cond (containing-decl-open |
| 10087 | (setq placeholder (c-add-class-syntax 'inclass | 10100 | (setq placeholder (c-add-class-syntax 'inclass |
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index b52da3f662d..ef894043bce 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el | |||
| @@ -1972,8 +1972,8 @@ will be handled." | |||
| 1972 | ;; In CORBA CIDL: | 1972 | ;; In CORBA CIDL: |
| 1973 | "bindsTo" "delegatesTo" "implements" "proxy" "storedOn") | 1973 | "bindsTo" "delegatesTo" "implements" "proxy" "storedOn") |
| 1974 | ;; Note: "const" is not used in Java, but it's still a reserved keyword. | 1974 | ;; Note: "const" is not used in Java, but it's still a reserved keyword. |
| 1975 | java '("abstract" "const" "final" "native" "private" "protected" "public" | 1975 | java '("abstract" "const" "default" "final" "native" "private" "protected" |
| 1976 | "static" "strictfp" "synchronized" "transient" "volatile") | 1976 | "public" "static" "strictfp" "synchronized" "transient" "volatile") |
| 1977 | pike '("final" "inline" "local" "nomask" "optional" "private" "protected" | 1977 | pike '("final" "inline" "local" "nomask" "optional" "private" "protected" |
| 1978 | "public" "static" "variant")) | 1978 | "public" "static" "variant")) |
| 1979 | 1979 | ||
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index d32da371771..267853d1642 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el | |||
| @@ -502,7 +502,7 @@ WINDOW controls how the buffer is displayed: | |||
| 502 | (xref-quit) | 502 | (xref-quit) |
| 503 | (xref--pop-to-location xref window))) | 503 | (xref--pop-to-location xref window))) |
| 504 | 504 | ||
| 505 | (defun xref-query-replace (from to) | 505 | (defun xref-query-replace-in-results (from to) |
| 506 | "Perform interactive replacement of FROM with TO in all displayed xrefs. | 506 | "Perform interactive replacement of FROM with TO in all displayed xrefs. |
| 507 | 507 | ||
| 508 | This command interactively replaces FROM with TO in the names of the | 508 | This command interactively replaces FROM with TO in the names of the |
| @@ -589,7 +589,7 @@ references displayed in the current *xref* buffer." | |||
| 589 | (define-key map [remap quit-window] #'xref-quit) | 589 | (define-key map [remap quit-window] #'xref-quit) |
| 590 | (define-key map (kbd "n") #'xref-next-line) | 590 | (define-key map (kbd "n") #'xref-next-line) |
| 591 | (define-key map (kbd "p") #'xref-prev-line) | 591 | (define-key map (kbd "p") #'xref-prev-line) |
| 592 | (define-key map (kbd "r") #'xref-query-replace) | 592 | (define-key map (kbd "r") #'xref-query-replace-in-results) |
| 593 | (define-key map (kbd "RET") #'xref-goto-xref) | 593 | (define-key map (kbd "RET") #'xref-goto-xref) |
| 594 | (define-key map (kbd "C-o") #'xref-show-location-at-point) | 594 | (define-key map (kbd "C-o") #'xref-show-location-at-point) |
| 595 | ;; suggested by Johan Claesson "to further reduce finger movement": | 595 | ;; suggested by Johan Claesson "to further reduce finger movement": |
| @@ -600,8 +600,10 @@ references displayed in the current *xref* buffer." | |||
| 600 | (define-derived-mode xref--xref-buffer-mode special-mode "XREF" | 600 | (define-derived-mode xref--xref-buffer-mode special-mode "XREF" |
| 601 | "Mode for displaying cross-references." | 601 | "Mode for displaying cross-references." |
| 602 | (setq buffer-read-only t) | 602 | (setq buffer-read-only t) |
| 603 | (setq next-error-function #'xref--next-error-function) | 603 | ;; FIXME: http://debbugs.gnu.org/20489 |
| 604 | (setq next-error-last-buffer (current-buffer))) | 604 | ;; (setq next-error-function #'xref--next-error-function) |
| 605 | ;; (setq next-error-last-buffer (current-buffer)) | ||
| 606 | ) | ||
| 605 | 607 | ||
| 606 | (defun xref--next-error-function (n reset?) | 608 | (defun xref--next-error-function (n reset?) |
| 607 | (when reset? | 609 | (when reset? |
diff --git a/src/nsterm.m b/src/nsterm.m index b270e0e58b5..860c55de70f 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -1161,11 +1161,24 @@ ns_clip_to_row (struct window *w, struct glyph_row *row, | |||
| 1161 | 1161 | ||
| 1162 | - (id)init; | 1162 | - (id)init; |
| 1163 | { | 1163 | { |
| 1164 | NSTRACE ("[EmacsBell init]"); | ||
| 1164 | if ((self = [super init])) | 1165 | if ((self = [super init])) |
| 1165 | { | 1166 | { |
| 1166 | nestCount = 0; | 1167 | nestCount = 0; |
| 1167 | isAttached = false; | 1168 | isAttached = false; |
| 1169 | #ifdef NS_IMPL_GNUSTEP | ||
| 1170 | // GNUstep doesn't provide named images. This was reported in | ||
| 1171 | // 2011, see https://savannah.gnu.org/bugs/?33396 | ||
| 1172 | // | ||
| 1173 | // As a drop in replacment, a semi tranparent gray square is used. | ||
| 1174 | self.image = [[NSImage alloc] initWithSize:NSMakeSize(32, 32)]; | ||
| 1175 | [self.image lockFocus]; | ||
| 1176 | [[NSColor colorForEmacsRed:0.5 green:0.5 blue:0.5 alpha:0.5] set]; | ||
| 1177 | NSRectFill(NSMakeRect(0, 0, 32, 32)); | ||
| 1178 | [self.image unlockFocus]; | ||
| 1179 | #else | ||
| 1168 | self.image = [NSImage imageNamed:NSImageNameCaution]; | 1180 | self.image = [NSImage imageNamed:NSImageNameCaution]; |
| 1181 | #endif | ||
| 1169 | } | 1182 | } |
| 1170 | return self; | 1183 | return self; |
| 1171 | } | 1184 | } |
| @@ -1572,7 +1585,6 @@ x_set_window_size (struct frame *f, | |||
| 1572 | NSRect wr = [window frame]; | 1585 | NSRect wr = [window frame]; |
| 1573 | int tb = FRAME_EXTERNAL_TOOL_BAR (f); | 1586 | int tb = FRAME_EXTERNAL_TOOL_BAR (f); |
| 1574 | int pixelwidth, pixelheight; | 1587 | int pixelwidth, pixelheight; |
| 1575 | int rows, cols; | ||
| 1576 | int orig_height = wr.size.height; | 1588 | int orig_height = wr.size.height; |
| 1577 | 1589 | ||
| 1578 | NSTRACE ("x_set_window_size"); | 1590 | NSTRACE ("x_set_window_size"); |
| @@ -1590,15 +1602,11 @@ x_set_window_size (struct frame *f, | |||
| 1590 | { | 1602 | { |
| 1591 | pixelwidth = FRAME_TEXT_TO_PIXEL_WIDTH (f, width); | 1603 | pixelwidth = FRAME_TEXT_TO_PIXEL_WIDTH (f, width); |
| 1592 | pixelheight = FRAME_TEXT_TO_PIXEL_HEIGHT (f, height); | 1604 | pixelheight = FRAME_TEXT_TO_PIXEL_HEIGHT (f, height); |
| 1593 | cols = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixelwidth); | ||
| 1594 | rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixelheight); | ||
| 1595 | } | 1605 | } |
| 1596 | else | 1606 | else |
| 1597 | { | 1607 | { |
| 1598 | pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width); | 1608 | pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width); |
| 1599 | pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height); | 1609 | pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height); |
| 1600 | cols = width; | ||
| 1601 | rows = height; | ||
| 1602 | } | 1610 | } |
| 1603 | 1611 | ||
| 1604 | /* If we have a toolbar, take its height into account. */ | 1612 | /* If we have a toolbar, take its height into account. */ |
| @@ -2631,13 +2639,13 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row, | |||
| 2631 | [img setXBMColor: bm_color]; | 2639 | [img setXBMColor: bm_color]; |
| 2632 | } | 2640 | } |
| 2633 | 2641 | ||
| 2642 | #ifdef NS_IMPL_COCOA | ||
| 2634 | // Note: For periodic images, the full image height is "h + hd". | 2643 | // Note: For periodic images, the full image height is "h + hd". |
| 2635 | // By using the height h, a suitable part of the image is used. | 2644 | // By using the height h, a suitable part of the image is used. |
| 2636 | NSRect fromRect = NSMakeRect(0, 0, p->wd, p->h); | 2645 | NSRect fromRect = NSMakeRect(0, 0, p->wd, p->h); |
| 2637 | 2646 | ||
| 2638 | NSTRACE_RECT ("fromRect", fromRect); | 2647 | NSTRACE_RECT ("fromRect", fromRect); |
| 2639 | 2648 | ||
| 2640 | #ifdef NS_IMPL_COCOA | ||
| 2641 | [img drawInRect: r | 2649 | [img drawInRect: r |
| 2642 | fromRect: fromRect | 2650 | fromRect: fromRect |
| 2643 | operation: NSCompositeSourceOver | 2651 | operation: NSCompositeSourceOver |
| @@ -6357,7 +6365,6 @@ not_in_argv (NSString *arg) | |||
| 6357 | if (oldr != rows || oldc != cols || neww != oldw || newh != oldh) | 6365 | if (oldr != rows || oldc != cols || neww != oldw || newh != oldh) |
| 6358 | { | 6366 | { |
| 6359 | NSView *view = FRAME_NS_VIEW (emacsframe); | 6367 | NSView *view = FRAME_NS_VIEW (emacsframe); |
| 6360 | NSWindow *win = [view window]; | ||
| 6361 | 6368 | ||
| 6362 | change_frame_size (emacsframe, | 6369 | change_frame_size (emacsframe, |
| 6363 | FRAME_PIXEL_TO_TEXT_WIDTH (emacsframe, neww), | 6370 | FRAME_PIXEL_TO_TEXT_WIDTH (emacsframe, neww), |
| @@ -7778,8 +7785,6 @@ not_in_argv (NSString *arg) | |||
| 7778 | 7785 | ||
| 7779 | - (void)zoom:(id)sender | 7786 | - (void)zoom:(id)sender |
| 7780 | { | 7787 | { |
| 7781 | struct frame * f = SELECTED_FRAME (); | ||
| 7782 | |||
| 7783 | NSTRACE ("[EmacsWindow zoom:]"); | 7788 | NSTRACE ("[EmacsWindow zoom:]"); |
| 7784 | 7789 | ||
| 7785 | ns_update_auto_hide_menu_bar(); | 7790 | ns_update_auto_hide_menu_bar(); |
diff --git a/src/xfns.c b/src/xfns.c index aad9680c4df..9624ac5d9ac 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -6084,16 +6084,19 @@ Value is t if tooltip was open, nil otherwise. */) | |||
| 6084 | items is unmapped. Redisplay the menu manually... */ | 6084 | items is unmapped. Redisplay the menu manually... */ |
| 6085 | { | 6085 | { |
| 6086 | Widget w; | 6086 | Widget w; |
| 6087 | struct frame *f = SELECTED_FRAME (); | 6087 | struct frame *f = SELECTED_FRAME (); |
| 6088 | w = f->output_data.x->menubar_widget; | 6088 | if (FRAME_X_P (f) && FRAME_LIVE_P (f)) |
| 6089 | { | ||
| 6090 | w = f->output_data.x->menubar_widget; | ||
| 6089 | 6091 | ||
| 6090 | if (!DoesSaveUnders (FRAME_DISPLAY_INFO (f)->screen) | 6092 | if (!DoesSaveUnders (FRAME_DISPLAY_INFO (f)->screen) |
| 6091 | && w != NULL) | 6093 | && w != NULL) |
| 6092 | { | 6094 | { |
| 6093 | block_input (); | 6095 | block_input (); |
| 6094 | xlwmenu_redisplay (w); | 6096 | xlwmenu_redisplay (w); |
| 6095 | unblock_input (); | 6097 | unblock_input (); |
| 6096 | } | 6098 | } |
| 6099 | } | ||
| 6097 | } | 6100 | } |
| 6098 | #endif /* USE_LUCID */ | 6101 | #endif /* USE_LUCID */ |
| 6099 | } | 6102 | } |