commit ff053c706cb903534936c45b04a2aa38e3db1261 (HEAD, refs/remotes/origin/master) Author: Stefan Monnier Date: Wed Jun 16 12:53:59 2021 -0400 * lisp/emacs-lisp/cl-generic.el: Fix bug#49053 and bug#47454 (cl-generic-define-method): Shorten the time window where the symbol is defined to `dummy`. diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 31aa0cb4f9..544704be38 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -568,17 +568,17 @@ The set of acceptable TYPEs (also called \"specializers\") is defined (cons method mt) ;; Keep the ordering; important for methods with :extra qualifiers. (mapcar (lambda (x) (if (eq x (car me)) method x)) mt))) - (let ((sym (cl--generic-name generic))) ; Actual name (for aliases). + (let ((sym (cl--generic-name generic)) ; Actual name (for aliases). + ;; FIXME: Try to avoid re-constructing a new function if the old one + ;; is still valid (e.g. still empty method cache)? + (gfun (cl--generic-make-function generic))) (unless (symbol-function sym) (defalias sym 'dummy)) ;Record definition into load-history. (cl-pushnew `(cl-defmethod . ,(cl--generic-load-hist-format (cl--generic-name generic) qualifiers specializers)) current-load-list :test #'equal) - ;; FIXME: Try to avoid re-constructing a new function if the old one - ;; is still valid (e.g. still empty method cache)? - (let ((gfun (cl--generic-make-function generic)) - ;; Prevent `defalias' from recording this as the definition site of + (let (;; Prevent `defalias' from recording this as the definition site of ;; the generic function. current-load-list ;; BEWARE! Don't purify this function definition, since that leads commit 7c22aa36cd622ba2a9176e319ce5fb2b06f87801 Author: Mattias EngdegÄrd Date: Wed Jun 16 18:05:41 2021 +0200 Eliminate some GCC warnings * src/doprnt.c (exprintf, evxprintf): * src/lisp.h (exprintf, evxprintf): Don't use a pointer-to-const type for the `nonheapbuf` argument: although it is never dereferenced, GCC will warn when passing a pointer to uninitialised memory otherwise. * src/fns.c (sort_vector_copy, realize_face, realize_gui_face) (realize_tty_face): Use the same signatures in the prototypes as in the actual function definitions. diff --git a/src/doprnt.c b/src/doprnt.c index b6b5978c89..fe484b8e76 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -563,7 +563,7 @@ esprintf (char *buf, char const *format, ...) BUFSIZE_MAX. */ ptrdiff_t exprintf (char **buf, ptrdiff_t *bufsize, - char const *nonheapbuf, ptrdiff_t bufsize_max, + char *nonheapbuf, ptrdiff_t bufsize_max, char const *format, ...) { ptrdiff_t nbytes; @@ -579,7 +579,7 @@ exprintf (char **buf, ptrdiff_t *bufsize, /* Act like exprintf, except take a va_list. */ ptrdiff_t evxprintf (char **buf, ptrdiff_t *bufsize, - char const *nonheapbuf, ptrdiff_t bufsize_max, + char *nonheapbuf, ptrdiff_t bufsize_max, char const *format, va_list ap) { for (;;) diff --git a/src/fns.c b/src/fns.c index 40ade57800..a178216622 100644 --- a/src/fns.c +++ b/src/fns.c @@ -39,8 +39,9 @@ along with GNU Emacs. If not, see . */ #include "puresize.h" #include "gnutls.h" -static void sort_vector_copy (Lisp_Object, ptrdiff_t, - Lisp_Object *restrict, Lisp_Object *restrict); +static void sort_vector_copy (Lisp_Object pred, ptrdiff_t len, + Lisp_Object src[restrict VLA_ELEMS (len)], + Lisp_Object dest[restrict VLA_ELEMS (len)]); enum equal_kind { EQUAL_NO_QUIT, EQUAL_PLAIN, EQUAL_INCLUDING_PROPERTIES }; static bool internal_equal (Lisp_Object, Lisp_Object, enum equal_kind, int, Lisp_Object); diff --git a/src/lisp.h b/src/lisp.h index 91b7a89d0f..4fb8923678 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -4064,10 +4064,10 @@ extern ptrdiff_t doprnt (char *, ptrdiff_t, const char *, const char *, va_list); extern ptrdiff_t esprintf (char *, char const *, ...) ATTRIBUTE_FORMAT_PRINTF (2, 3); -extern ptrdiff_t exprintf (char **, ptrdiff_t *, char const *, ptrdiff_t, +extern ptrdiff_t exprintf (char **, ptrdiff_t *, char *, ptrdiff_t, char const *, ...) ATTRIBUTE_FORMAT_PRINTF (5, 6); -extern ptrdiff_t evxprintf (char **, ptrdiff_t *, char const *, ptrdiff_t, +extern ptrdiff_t evxprintf (char **, ptrdiff_t *, char *, ptrdiff_t, char const *, va_list) ATTRIBUTE_FORMAT_PRINTF (5, 0); diff --git a/src/xfaces.c b/src/xfaces.c index ab4440f46a..fed7b3336a 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -353,10 +353,13 @@ static bool menu_face_changed_default; struct named_merge_point; -static struct face *realize_face (struct face_cache *, Lisp_Object *, +static struct face *realize_face (struct face_cache *, + Lisp_Object [LFACE_VECTOR_SIZE], int); -static struct face *realize_gui_face (struct face_cache *, Lisp_Object *); -static struct face *realize_tty_face (struct face_cache *, Lisp_Object *); +static struct face *realize_gui_face (struct face_cache *, + Lisp_Object [LFACE_VECTOR_SIZE]); +static struct face *realize_tty_face (struct face_cache *, + Lisp_Object [LFACE_VECTOR_SIZE]); static bool realize_basic_faces (struct frame *); static bool realize_default_face (struct frame *); static void realize_named_face (struct frame *, Lisp_Object, int); commit 1f4e919cb2fc81976346aacbef4126753c423724 Author: Glenn Morris Date: Wed Jun 16 08:34:32 2021 -0700 * lisp/simple.el (save-interprogram-paste-before-kill): Fix type. ; Would not "integer" be better than "number", in type and docs? diff --git a/lisp/simple.el b/lisp/simple.el index fdaeb6ac22..71db7ffe5d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5047,8 +5047,9 @@ The value of this variable can also be a number, in which case the clipboard data is only saved to the `kill-ring' if it's shorter (in characters) than that number. Any other non-nil value will save the clipboard data unconditionally." - :type '(choice (const :tag "Always" t) - number) + :type '(choice (const nil) + number + (other :tag "Always" t)) :group 'killing :version "23.2") commit 706e186581e06edc7350a9388c19070f00417612 Author: Mattias EngdegÄrd Date: Wed Jun 16 11:37:00 2021 +0200 * src/xdisp.c (gui_draw_bottom_divider): Fix misleading indentation. diff --git a/src/xdisp.c b/src/xdisp.c index 6854fa03fe..c30084cc8b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -34380,7 +34380,7 @@ gui_draw_bottom_divider (struct window *w) && !NILP (XWINDOW (p->parent)->next)))) x1 -= WINDOW_RIGHT_DIVIDER_WIDTH (w); - FRAME_RIF (f)->draw_window_divider (w, x0, x1, y0, y1); + FRAME_RIF (f)->draw_window_divider (w, x0, x1, y0, y1); } }