diff options
| author | Andrea Corallo | 2024-07-24 15:49:23 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2024-07-24 15:49:23 +0200 |
| commit | df25bd12fc323b2e6ac76f05882d3902ce92b4cf (patch) | |
| tree | abd0bc8cf5a6ebe46ec3afbdf2b94094a13645ba | |
| parent | d458664e893cd74f46bf9d00559ff5386c3dbf44 (diff) | |
| parent | 976416bebe278a7cf65ab58b1918c9c27e3a09bd (diff) | |
| download | emacs-df25bd12fc323b2e6ac76f05882d3902ce92b4cf.tar.gz emacs-df25bd12fc323b2e6ac76f05882d3902ce92b4cf.zip | |
Merge from savannah/emacs-30
976416bebe2 Fix some function type declaration
23549d71751 * src/image.c (gui_put_x_image): Avoid memory leak.
cb633820c15 ; * doc/misc/use-package.texi (Getting Started): Fix word...
| -rw-r--r-- | doc/misc/use-package.texi | 4 | ||||
| -rw-r--r-- | lisp/subr.el | 2 | ||||
| -rw-r--r-- | lisp/window.el | 4 | ||||
| -rw-r--r-- | src/image.c | 9 |
4 files changed, 7 insertions, 12 deletions
diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi index 8a7af5bc6f6..9e11b349f20 100644 --- a/doc/misc/use-package.texi +++ b/doc/misc/use-package.texi | |||
| @@ -180,8 +180,8 @@ loading actually occurs. As you might expect, you can use | |||
| 180 | The above declarations will load the @samp{foo} package immediately. In | 180 | The above declarations will load the @samp{foo} package immediately. In |
| 181 | most cases, this is not necessary or desirable, as that will slow down | 181 | most cases, this is not necessary or desirable, as that will slow down |
| 182 | Emacs startup. Instead, you should try to set things up so that | 182 | Emacs startup. Instead, you should try to set things up so that |
| 183 | packages are only loaded when they are actually needed | 183 | packages are only loaded when they are actually needed (this is known as |
| 184 | (``autoloading''). If you have installed a package from @acronym{GNU} | 184 | ``autoloading''). If you have installed a package from @acronym{GNU} |
| 185 | @acronym{ELPA} that provides its own autoloads, it is often enough to | 185 | @acronym{ELPA} that provides its own autoloads, it is often enough to |
| 186 | say: | 186 | say: |
| 187 | 187 | ||
diff --git a/lisp/subr.el b/lisp/subr.el index 8c20fc5e9d4..1389f446d35 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -481,7 +481,7 @@ for the sake of consistency. | |||
| 481 | 481 | ||
| 482 | To alter the look of the displayed error messages, you can use | 482 | To alter the look of the displayed error messages, you can use |
| 483 | the `command-error-function' variable." | 483 | the `command-error-function' variable." |
| 484 | (declare (ftype (function (string &rest t) nil)) | 484 | (declare (ftype (function (&rest t) nil)) |
| 485 | (advertised-calling-convention (string &rest args) "23.1")) | 485 | (advertised-calling-convention (string &rest args) "23.1")) |
| 486 | (signal 'error (list (apply #'format-message args)))) | 486 | (signal 'error (list (apply #'format-message args)))) |
| 487 | 487 | ||
diff --git a/lisp/window.el b/lisp/window.el index 60040f18bc7..006cfa19525 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -2515,7 +2515,7 @@ have special meanings: | |||
| 2515 | 2515 | ||
| 2516 | Any other value of ALL-FRAMES means consider all windows on the | 2516 | Any other value of ALL-FRAMES means consider all windows on the |
| 2517 | selected frame and no others." | 2517 | selected frame and no others." |
| 2518 | (declare (ftype (function (&optional t t t) (or window null))) | 2518 | (declare (ftype (function (&optional t t t t) (or window null))) |
| 2519 | (side-effect-free error-free)) | 2519 | (side-effect-free error-free)) |
| 2520 | (let ((windows (window-list-1 nil 'nomini all-frames)) | 2520 | (let ((windows (window-list-1 nil 'nomini all-frames)) |
| 2521 | best-window best-time second-best-window second-best-time time) | 2521 | best-window best-time second-best-window second-best-time time) |
| @@ -2595,7 +2595,7 @@ have special meanings: | |||
| 2595 | 2595 | ||
| 2596 | Any other value of ALL-FRAMES means consider all windows on the | 2596 | Any other value of ALL-FRAMES means consider all windows on the |
| 2597 | selected frame and no others." | 2597 | selected frame and no others." |
| 2598 | (declare (ftype (function (&optional t t t) (or window null))) | 2598 | (declare (ftype (function (&optional t t t t) (or window null))) |
| 2599 | (side-effect-free error-free)) | 2599 | (side-effect-free error-free)) |
| 2600 | (let ((best-size 0) | 2600 | (let ((best-size 0) |
| 2601 | best-window size) | 2601 | best-window size) |
diff --git a/src/image.c b/src/image.c index 9d97337fd31..1b26af05351 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -4177,7 +4177,7 @@ static void | |||
| 4177 | gui_put_x_image (struct frame *f, Emacs_Pix_Container pimg, | 4177 | gui_put_x_image (struct frame *f, Emacs_Pix_Container pimg, |
| 4178 | Emacs_Pixmap pixmap, int width, int height) | 4178 | Emacs_Pixmap pixmap, int width, int height) |
| 4179 | { | 4179 | { |
| 4180 | #if defined USE_CAIRO || defined HAVE_HAIKU | 4180 | #if defined USE_CAIRO || defined HAVE_HAIKU || defined HAVE_NS |
| 4181 | eassert (pimg == pixmap); | 4181 | eassert (pimg == pixmap); |
| 4182 | #elif defined HAVE_X_WINDOWS | 4182 | #elif defined HAVE_X_WINDOWS |
| 4183 | GC gc; | 4183 | GC gc; |
| @@ -4189,12 +4189,7 @@ gui_put_x_image (struct frame *f, Emacs_Pix_Container pimg, | |||
| 4189 | XFreeGC (FRAME_X_DISPLAY (f), gc); | 4189 | XFreeGC (FRAME_X_DISPLAY (f), gc); |
| 4190 | #elif defined HAVE_ANDROID | 4190 | #elif defined HAVE_ANDROID |
| 4191 | android_put_image (pixmap, pimg); | 4191 | android_put_image (pixmap, pimg); |
| 4192 | #endif | 4192 | #endif /* HAVE_ANDROID */ |
| 4193 | |||
| 4194 | #ifdef HAVE_NS | ||
| 4195 | eassert (pimg == pixmap); | ||
| 4196 | ns_retain_object (pimg); | ||
| 4197 | #endif | ||
| 4198 | } | 4193 | } |
| 4199 | 4194 | ||
| 4200 | /* Thin wrapper for image_create_x_image_and_pixmap_1, so that it matches | 4195 | /* Thin wrapper for image_create_x_image_and_pixmap_1, so that it matches |