GNU bug report logs -
#79102
31.0.50; nsterm.m: clearRect undeclared
Previous Next
Reported by: Harald <harald <at> maierh.de>
Date: Sat, 26 Jul 2025 11:59:02 UTC
Severity: normal
Found in version 31.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
To reply to this bug, email your comments to 79102 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79102
; Package
emacs
.
(Sat, 26 Jul 2025 11:59:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Harald <harald <at> maierh.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 26 Jul 2025 11:59:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
By building the Nextstep port I am getting the following error:
GEN globals.h
CC nsterm.o
nsterm.m:3058:40: error: use of undeclared identifier 'clearRect'
3058 | if (!p->overlay_p && !NSIsEmptyRect (clearRect))
| ^
nsterm.m:3063:19: error: use of undeclared identifier 'clearRect'
3063 | NSRectFill (clearRect);
| ^
2 errors generated.
make: *** [nsterm.o] Error 1
!!! The previous version worked fine !!!
In GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin24.5.0, NS
appkit-2575.60 Version 15.5 (Build 24F74)) of 2025-07-26 built on rhea
Repository revision: 6e64e0bd26b6c0f1c4e90c9bc0df37a2a9ac72da
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2575
System Description: macOS 15.5
Configured using:
'configure --with-ns --without-pop'
Configured features:
ACL GNUTLS LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG SQLITE3 THREADS
TOOLKIT_SCROLL_BARS ZLIB
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: VC dir
Minor modes in effect:
vc-dir-git-mode: t
delete-selection-mode: t
cua-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
minibuffer-regexp-mode: t
buffer-read-only: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug lisp-mnt cursor-sensor smerge-mode diff
whitespace vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs log-view
log-edit message sendmail yank-media puny rfc822 mml mml-sec epa epg
rfc6068 epg-config gnus-util text-property-search mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr mailabbrev mail-utils gmm-utils mailheader add-log pcvs-util
vc-dir ewoc dired-aux octave smie misearch multi-isearch vc-git
diff-mode track-changes easy-mmode files-x vc vc-dispatcher
bug-reference cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs tempo generic-x parse-time iso8601
time-date info emacs-wiki executable pcomplete derived advice directory
aes cl-extra help-mode load-dir sql view thingatpt comint ansi-osc
ansi-color ring delsel cua-base dired-x dired dired-loaddefs finder-inf
aes-autoloads load-dir-autoloads package browse-url xdg url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs icons password-cache json
subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib
rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads kqueue cocoa ns multi-tty
make-network-process tty-child-frames emacs)
Memory information:
((conses 16 215495 39902) (symbols 48 16022 0) (strings 32 53276 1470)
(string-bytes 1 1535081) (vectors 16 29014)
(vector-slots 8 286370 29353) (floats 8 126 87) (intervals 56 7386 0)
(buffers 984 26))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79102
; Package
emacs
.
(Sat, 26 Jul 2025 13:04:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 79102 <at> debbugs.gnu.org (full text, mbox):
> From: Harald <harald <at> maierh.de>
> Date: Sat, 26 Jul 2025 13:58:00 +0200
>
>
> By building the Nextstep port I am getting the following error:
> GEN globals.h
> CC nsterm.o
> nsterm.m:3058:40: error: use of undeclared identifier 'clearRect'
> 3058 | if (!p->overlay_p && !NSIsEmptyRect (clearRect))
> | ^
> nsterm.m:3063:19: error: use of undeclared identifier 'clearRect'
> 3063 | NSRectFill (clearRect);
> | ^
> 2 errors generated.
> make: *** [nsterm.o] Error 1
>
> !!! The previous version worked fine !!!
What was "the previous version", please>
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79102
; Package
emacs
.
(Sat, 26 Jul 2025 16:24:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 79102 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Does this maybe help?
Harald
$ git show -p nsterm.m
commit e3380669ed6db7a1c1574c4b39d58f9200a3ffab (HEAD -> master, origin/master, origin/HEAD)
Author: Alan Third <alan <at> idiocy.org>
Date: Fri Jun 6 21:45:20 2025 +0100
Fix incorrectly nested ns_focus/ns_unfocus calls
* src/nsterm.m (ns_draw_fringe_bitmap): Move the call to ns_focus out of
the if for overlay_p and rename the rect from clearRect to bmpRect to
make it's purpose clearer.
diff --git a/src/nsterm.m b/src/nsterm.m
index 38e49406d66..1d86fab3db5 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -3035,35 +3035,32 @@ Hide the window (X11 semantics)
struct frame *f = XFRAME (WINDOW_FRAME (w));
struct face *face = p->face;
- NSRect clearRect = NSZeroRect;
+ NSRect bmpRect = NSZeroRect;
NSRect rowRect = ns_row_rect (w, row, ANY_AREA);
NSTRACE_WHEN (NSTRACE_GROUP_FRINGE, "ns_draw_fringe_bitmap");
NSTRACE_MSG ("which:%d cursor:%d overlay:%d width:%d height:%d period:%d",
p->which, p->cursor_p, p->overlay_p, p->wd, p->h, p->dh);
- /* Clear screen unless overlay. */
- if (!p->overlay_p)
- {
- /* Work out the rectangle we will need to clear. */
- clearRect = NSMakeRect (p->x, p->y, p->wd, p->h);
+ /* Work out the rectangle we will need to clear. */
+ bmpRect = NSMakeRect (p->x, p->y, p->wd, p->h);
- if (p->bx >= 0)
- clearRect = NSUnionRect (clearRect, NSMakeRect (p->bx, p->by, p->nx, p->ny));
+ if (p->bx >= 0)
+ bmpRect = NSUnionRect (bmpRect, NSMakeRect (p->bx, p->by, p->nx, p->ny));
- /* Handle partially visible rows. */
- clearRect = NSIntersectionRect (clearRect, rowRect);
+ /* Handle partially visible rows. */
+ bmpRect = NSIntersectionRect (bmpRect, rowRect);
- /* The visible portion of imageRect will always be contained
- within clearRect. */
- ns_focus (f, &clearRect, 1);
- if (!NSIsEmptyRect (clearRect))
- {
- NSTRACE_RECT ("clearRect", clearRect);
+ /* Clip to the bitmap's area. */
+ ns_focus (f, &bmpRect, 1);
- [[NSColor colorWithUnsignedLong:face->background] set];
- NSRectFill (clearRect);
- }
+ /* Clear screen unless overlay. */
+ if (!p->overlay_p && !NSIsEmptyRect (clearRect))
+ {
+ NSTRACE_RECT ("clearRect", clearRect);
+
+ [[NSColor colorWithUnsignedLong:face->background] set];
+ NSRectFill (clearRect);
}
NSBezierPath *bmp = [fringe_bmp objectForKey:[NSNumber numberWithInt:p->which]];
> On 26. Jul 2025, at 15:03, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> From: Harald <harald <at> maierh.de>
>> Date: Sat, 26 Jul 2025 13:58:00 +0200
>>
>>
>> By building the Nextstep port I am getting the following error:
>> GEN globals.h
>> CC nsterm.o
>> nsterm.m:3058:40: error: use of undeclared identifier 'clearRect'
>> 3058 | if (!p->overlay_p && !NSIsEmptyRect (clearRect))
>> | ^
>> nsterm.m:3063:19: error: use of undeclared identifier 'clearRect'
>> 3063 | NSRectFill (clearRect);
>> | ^
>> 2 errors generated.
>> make: *** [nsterm.o] Error 1
>>
>> !!! The previous version worked fine !!!
>
> What was "the previous version", please>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79102
; Package
emacs
.
(Sat, 26 Jul 2025 16:45:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 79102 <at> debbugs.gnu.org (full text, mbox):
> From: Harald <harald <at> maierh.de>
> Date: Sat, 26 Jul 2025 18:22:56 +0200
> Cc: 79102 <at> debbugs.gnu.org
>
> Does this maybe help?
>
> Harald
>
> $ git show -p nsterm.m
> commit e3380669ed6db7a1c1574c4b39d58f9200a3ffab (HEAD -> master, origin/master, origin/HEAD)
> Author: Alan Third <alan <at> idiocy.org>
> Date: Fri Jun 6 21:45:20 2025 +0100
>
> Fix incorrectly nested ns_focus/ns_unfocus calls
>
> * src/nsterm.m (ns_draw_fringe_bitmap): Move the call to ns_focus out of
> the if for overlay_p and rename the rect from clearRect to bmpRect to
> make it's purpose clearer.
Are you saying this commit is the one which causes the problem?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79102
; Package
emacs
.
(Sat, 26 Jul 2025 16:59:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 79102 <at> debbugs.gnu.org (full text, mbox):
Hello Eli,
Did again a fresh checkout and it works now fine.
I am using
git clone --depth 1 https://github.com/emacs-mirror/emacs
Maybe a short sync problem.
Harald
> On 26. Jul 2025, at 18:44, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> From: Harald <harald <at> maierh.de>
>> Date: Sat, 26 Jul 2025 18:22:56 +0200
>> Cc: 79102 <at> debbugs.gnu.org
>>
>> Does this maybe help?
>>
>> Harald
>>
>> $ git show -p nsterm.m
>> commit e3380669ed6db7a1c1574c4b39d58f9200a3ffab (HEAD -> master, origin/master, origin/HEAD)
>> Author: Alan Third <alan <at> idiocy.org>
>> Date: Fri Jun 6 21:45:20 2025 +0100
>>
>> Fix incorrectly nested ns_focus/ns_unfocus calls
>>
>> * src/nsterm.m (ns_draw_fringe_bitmap): Move the call to ns_focus out of
>> the if for overlay_p and rename the rect from clearRect to bmpRect to
>> make it's purpose clearer.
>
> Are you saying this commit is the one which causes the problem?
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 26 Jul 2025 17:08:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Harald <harald <at> maierh.de>
:
bug acknowledged by developer.
(Sat, 26 Jul 2025 17:08:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 79102-done <at> debbugs.gnu.org (full text, mbox):
> From: Harald <harald <at> maierh.de>
> Date: Sat, 26 Jul 2025 18:58:28 +0200
> Cc: 79102 <at> debbugs.gnu.org
>
> Hello Eli,
>
> Did again a fresh checkout and it works now fine.
>
> I am using
>
> git clone --depth 1 https://github.com/emacs-mirror/emacs
>
> Maybe a short sync problem.
Thanks, so I'm closing this bug.
This bug report was last modified 21 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.