From unknown Tue Aug 19 10:01:34 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#28362 <28362@debbugs.gnu.org> To: bug#28362 <28362@debbugs.gnu.org> Subject: Status: 26.0.50; [PATCH] gensym in core elisp Reply-To: bug#28362 <28362@debbugs.gnu.org> Date: Tue, 19 Aug 2025 17:01:34 +0000 retitle 28362 26.0.50; [PATCH] gensym in core elisp reassign 28362 emacs submitter 28362 Mark Oteiza severity 28362 wishlist tag 28362 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 05 13:11:58 2017 Received: (at submit) by debbugs.gnu.org; 5 Sep 2017 17:11:58 +0000 Received: from localhost ([127.0.0.1]:51706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dpHOH-0000xi-0d for submit@debbugs.gnu.org; Tue, 05 Sep 2017 13:11:57 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dpHOE-0000xW-NP for submit@debbugs.gnu.org; Tue, 05 Sep 2017 13:11:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpHO2-0002FK-Kj for submit@debbugs.gnu.org; Tue, 05 Sep 2017 13:11:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:37557) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dpHO2-0002F7-Em for submit@debbugs.gnu.org; Tue, 05 Sep 2017 13:11:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpHNv-0003ou-EG for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2017 13:11:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpHNo-00023A-Nx for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2017 13:11:35 -0400 Received: from mail-qk0-x22e.google.com ([2607:f8b0:400d:c09::22e]:34532) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dpHNo-00020v-Cs for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2017 13:11:28 -0400 Received: by mail-qk0-x22e.google.com with SMTP id b23so13438171qkg.1 for ; Tue, 05 Sep 2017 10:11:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version; bh=e+nzK/cBh8rrlZUnCAwRi7HHAxeA2S5+HCijoLLfAFw=; b=fcsJzD2lmoX8qaC5CJRewgctNoFJFREiNCuFBP1gjPAZJsmsLQl0z/V1j8GaGcP3yT y/V86AraAIEXjacP6DlSDw8dFm1Mzr2GgYZRIcqftUFRgpix13US5vhxdqTNdV4vlz7q 2yI2wgNZw7sT6vD97Zdw+3jKQDJbGjpVWM/rAd88EpRlcSAHocBNP7hUrGBKBx92Vb5s oskRlKe26fKNIQddIFhwrXS6z9sNxyIvb7yiZyeyaS+ZIDIGKejtSo6Q6GxjS9VkDeFy 9wXH9+T4DxkYuuC/wIkBqg78/vYKsOoWsdvZxwoTD+C+aAjIK3q/Elz9ceEVfATjufOC UG9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=e+nzK/cBh8rrlZUnCAwRi7HHAxeA2S5+HCijoLLfAFw=; b=ZuABEYr39LLJAdyhXJXHUTNa6+Tz8XYk0PN3OFzf+beSUaXpMOdW1XigsV9OJULFvV vD1baPNbrDSRUEeSQoIJgGFKNY0Um/nAzrXsMwhFvD/KjFmqNCHrwDCQFfV/yovML1d/ 9CImePL5nxr0vcxeKFGYWoQtEHY5hWpAcki4MEBnoHI/6squKr935Qe91mc1A19j0XIy CzIc5BPt6jPkwDkIQY5jaUWV7ycaKvAiKC/vsY07JZHb/I2gVmGTzHiEglj+FLI2H9CH 3qDFr2weHbtACohs8sJbmCVzmmHnPr16tLQtMuJ5assfvHn6Wkinwpg5EJtqDSXi/Mu2 MgIA== X-Gm-Message-State: AHPjjUgTtMxuza6lFShoh0NrIJ1HlHH/gYuk2I/FRwz+QFZLbM6jG/II wzxeXC6TkKmjVu/fjZ+2tA== X-Google-Smtp-Source: ADKCNb6Y2ijDnrwCcAbTZDWVlMTIN5l1b7X0S5bT1oPmLd/8AOGnFG6rNzgZd2T+yS3YtdRJsOPQww== X-Received: by 10.55.200.210 with SMTP id t79mr1639088qkl.299.1504631485186; Tue, 05 Sep 2017 10:11:25 -0700 (PDT) Received: from holos.localdomain (pool-173-67-36-61.bltmmd.fios.verizon.net. [173.67.36.61]) by smtp.gmail.com with ESMTPSA id s6sm700378qtb.55.2017.09.05.10.11.24 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Sep 2017 10:11:24 -0700 (PDT) Received: by holos.localdomain (Postfix, from userid 1000) id 8E3FA68E72; Tue, 5 Sep 2017 13:11:23 -0400 (EDT) From: Mark Oteiza To: bug-gnu-emacs@gnu.org Subject: 26.0.50; [PATCH] gensym in core elisp Date: Tue, 05 Sep 2017 13:11:23 -0400 Message-ID: <8737812hqc.fsf@holos> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.4 (----) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Wishlist. It would be nice to have gensym live in subr.el or C for the utility of having uniquely named uninterned symbols. It is helpful, for instance, in the readability of macroexpansions of pcase and other macros that generate many uninterned symbols of the same name. As far as C vs Elisp--cl-gensym is about 10x slower than make-symbol, but as far as macroexpansion goes, I get the impression gensym is not a big contributing factor. Consider the following: (defmacro case-lambda (&rest spec) "Return an arbitrary arity function." (declare (indent 0) (debug (&rest (pcase-QPAT body)))) (let ((args (make-symbol "args"))) `(lambda (&rest ,args) (pcase-exhaustive ,args ,@spec)))) (benchmark-run-compiled 1000 (macroexpand-all '(case-lambda (`() t) (`(,x) (cons x 1)) (`(,x ,y) (list x y 2)) (`(,x ,y . ,z) (pcase-lambda (`(,cat ,dog)) (vector cat dog x y z 8))))) The difference between the benchmark with make-symbol and make-symbol fset to gensym is less than 1% (looking at profiler samples, interval set to 1us). I wrote a na=C3=AFve gensym in C that is only about 1.5x to 2x faster than cl-gensym (and incompatible because of the inaccessible counter). Patch attached. I also attached a patch putting gensym into subr.el. I've tested both patches. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=gensym_alloc_c.patch Content-Description: gensym implemented in alloc.c diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index b1ada00f4a..2db256d631 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -161,25 +161,19 @@ cl--expr-depends-p ;;; Symbols. -(defvar cl--gensym-counter 0) +(defvaralias 'cl--gensym-counter 'gensym-counter) ;;;###autoload -(defun cl-gensym (&optional prefix) - "Generate a new uninterned symbol. -The name is made by appending a number to PREFIX, default \"G\"." - (let ((pfix (if (stringp prefix) prefix "G")) - (num (if (integerp prefix) prefix - (prog1 cl--gensym-counter - (setq cl--gensym-counter (1+ cl--gensym-counter)))))) - (make-symbol (format "%s%d" pfix num)))) +(cl--defalias 'cl-gensym 'gensym) +(defvar cl--gentemp-counter 0) ;;;###autoload (defun cl-gentemp (&optional prefix) "Generate a new interned symbol with a unique name. -The name is made by appending a number to PREFIX, default \"G\"." - (let ((pfix (if (stringp prefix) prefix "G")) +The name is made by appending a number to PREFIX, default \"T\"." + (let ((pfix (if (stringp prefix) prefix "T")) name) - (while (intern-soft (setq name (format "%s%d" pfix cl--gensym-counter))) - (setq cl--gensym-counter (1+ cl--gensym-counter))) + (while (intern-soft (setq name (format "%s%d" pfix cl--gentemp-counter))) + (setq cl--gentemp-counter (1+ cl--gentemp-counter))) (intern name))) diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index 73eb9a4e86..306237ca38 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el @@ -250,7 +250,6 @@ cl-unload-function eval-when destructuring-bind gentemp - gensym pairlis acons subst diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index c6ef8d7a99..3190346497 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -1193,7 +1193,7 @@ edebug-make-enter-wrapper ;; Uses the dynamically bound vars edebug-def-name and edebug-def-args. ;; Do this after parsing since that may find a name. (setq edebug-def-name - (or edebug-def-name edebug-old-def-name (cl-gensym "edebug-anon"))) + (or edebug-def-name edebug-old-def-name (gensym "edebug-anon"))) `(edebug-enter (quote ,edebug-def-name) ,(if edebug-inside-func diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el index 4cf9d9609e..1413b9cd0b 100644 --- a/lisp/emacs-lisp/ert-x.el +++ b/lisp/emacs-lisp/ert-x.el @@ -295,7 +295,7 @@ ert-with-message-capture code under test from the behavior of the *Messages* buffer." (declare (debug (symbolp body)) (indent 1)) - (let ((g-advice (cl-gensym))) + (let ((g-advice (gensym))) `(let* ((,var "") (,g-advice (lambda (func &rest args) (if (or (null args) (equal (car args) "")) diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index c232b08bd1..07acc20ae8 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -293,8 +293,8 @@ ert--expand-should-1 (error `(signal ',(car err) ',(cdr err)))))) (cond ((or (atom form) (ert--special-operator-p (car form))) - (let ((value (cl-gensym "value-"))) - `(let ((,value (cl-gensym "ert-form-evaluation-aborted-"))) + (let ((value (gensym "value-"))) + `(let ((,value (gensym "ert-form-evaluation-aborted-"))) ,(funcall inner-expander `(setq ,value ,form) `(list ',whole :form ',form :value ,value) @@ -307,10 +307,10 @@ ert--expand-should-1 (and (consp fn-name) (eql (car fn-name) 'lambda) (listp (cdr fn-name))))) - (let ((fn (cl-gensym "fn-")) - (args (cl-gensym "args-")) - (value (cl-gensym "value-")) - (default-value (cl-gensym "ert-form-evaluation-aborted-"))) + (let ((fn (gensym "fn-")) + (args (gensym "args-")) + (value (gensym "value-")) + (default-value (gensym "ert-form-evaluation-aborted-"))) `(let* ((,fn (function ,fn-name)) (,args (condition-case err (let ((signal-hook-function #'ert--should-signal-hook)) @@ -352,7 +352,7 @@ ert--expand-should (ert--expand-should-1 whole form (lambda (inner-form form-description-form value-var) - (let ((form-description (cl-gensym "form-description-"))) + (let ((form-description (gensym "form-description-"))) `(let (,form-description) ,(funcall inner-expander `(unwind-protect @@ -430,8 +430,8 @@ ert--should-error-handle-error `(should-error ,form ,@keys) form (lambda (inner-form form-description-form value-var) - (let ((errorp (cl-gensym "errorp")) - (form-description-fn (cl-gensym "form-description-fn-"))) + (let ((errorp (gensym "errorp")) + (form-description-fn (gensym "form-description-fn-"))) `(let ((,errorp nil) (,form-description-fn (lambda () ,form-description-form))) (condition-case -condition- diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el index c96b400809..fe5d2d0728 100644 --- a/lisp/emacs-lisp/generator.el +++ b/lisp/emacs-lisp/generator.el @@ -86,10 +86,7 @@ cps--cleanup-table-symbol (defvar cps--cleanup-function nil) (defmacro cps--gensym (fmt &rest args) - ;; Change this function to use `cl-gensym' if you want the generated - ;; code to be easier to read and debug. - ;; (cl-gensym (apply #'format fmt args)) - `(progn (ignore ,@args) (make-symbol ,fmt))) + `(gensym (format ,fmt ,@args))) (defvar cps--dynamic-wrappers '(identity) "List of transformer functions to apply to atomic forms we diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index 253b60e753..5935845743 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -213,7 +213,7 @@ pcase--make-docstring (defmacro pcase-exhaustive (exp &rest cases) "The exhaustive version of `pcase' (which see)." (declare (indent 1) (debug pcase)) - (let* ((x (make-symbol "x")) + (let* ((x (gensym "x")) (pcase--dontwarn-upats (cons x pcase--dontwarn-upats))) (pcase--expand ;; FIXME: Could we add the FILE:LINE data in the error message? @@ -304,7 +304,7 @@ pcase-dolist (declare (indent 1) (debug ((pcase-PAT form) body))) (if (pcase--trivial-upat-p (car spec)) `(dolist ,spec ,@body) - (let ((tmpvar (make-symbol "x"))) + (let ((tmpvar (gensym "x"))) `(dolist (,tmpvar ,@(cdr spec)) (pcase-let* ((,(car spec) ,tmpvar)) ,@body))))) @@ -715,7 +715,7 @@ pcase--funcall (call (progn (when (memq arg vs) ;; `arg' is shadowed by `env'. - (let ((newsym (make-symbol "x"))) + (let ((newsym (gensym "x"))) (push (list newsym arg) env) (setq arg newsym))) (if (functionp fun) @@ -842,7 +842,7 @@ pcase--u1 ;; A upat of the form (app FUN PAT) (pcase--mark-used sym) (let* ((fun (nth 1 upat)) - (nsym (make-symbol "x")) + (nsym (gensym "x")) (body ;; We don't change `matches' to reuse the newly computed value, ;; because we assume there shouldn't be such redundancy in there. diff --git a/lisp/json.el b/lisp/json.el index 64486258cc..fd2f63324c 100644 --- a/lisp/json.el +++ b/lisp/json.el @@ -683,6 +683,23 @@ json-readtable table) "Readtable for JSON reader.") +(defmacro json-readtable-dispatch (char) + "Dispatch reader function for CHAR." + (declare (debug (symbolp))) + (let ((table + '((?t json-read-keyword "true") + (?f json-read-keyword "false") + (?n json-read-keyword "null") + (?{ json-read-object) + (?\[ json-read-array) + (?\" json-read-string))) + res) + (dolist (c '(?- ?+ ?. ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9)) + (push (list c 'json-read-number) table)) + (pcase-dolist (`(,c . ,rest) table) + (push `(,c (,@rest)) res)) + `(pcase ,char ,@res (_ (signal 'json-readtable-error ,char))))) + (defun json-read () "Parse and return the JSON object following point. Advances point just past JSON object." @@ -690,10 +707,7 @@ json-read (let ((char (json-peek))) (if (zerop char) (signal 'json-end-of-file nil) - (let ((record (cdr (assq char json-readtable)))) - (if (functionp (car record)) - (apply (car record) (cdr record)) - (signal 'json-readtable-error record)))))) + (json-readtable-dispatch char)))) ;; Syntactic sugar for the reader diff --git a/lisp/subr.el b/lisp/subr.el index 2ad52f6a63..ebb8b53b50 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -280,6 +280,20 @@ ignore-errors ;;;; Basic Lisp functions. +(defvar gensym-counter 0 + "Number used to construct the name of the next symbol created by `gensym'.") + +(defun gensym (&optional prefix) + "Return a new uninterned symbol. +The name is made by appending `gensym-counter' to PREFIX. +PREFIX can be a string, and defaults to \"G\". +If PREFIX is a number, it replaces the value of `gensym-counter'." + (let ((pfix (if (stringp prefix) prefix "G")) + (num (if (integerp prefix) prefix + (prog1 gensym-counter + (setq gensym-counter (1+ gensym-counter)))))) + (make-symbol (format "%s%d" pfix num)))) + (defun ignore (&rest _ignore) "Do nothing and return nil. This function accepts any number of arguments, but ignores them." diff --git a/lisp/textmodes/conf-mode.el b/lisp/textmodes/conf-mode.el index d03ee5eb31..59a72006a8 100644 --- a/lisp/textmodes/conf-mode.el +++ b/lisp/textmodes/conf-mode.el @@ -1,4 +1,4 @@ -;;; conf-mode.el --- Simple major mode for editing conf/ini/properties files +;;; conf-mode.el --- Simple major mode for editing conf/ini/properties files -*- lexical-binding: t -*- ;; Copyright (C) 2004-2017 Free Software Foundation, Inc. diff --git a/lisp/xdg.el b/lisp/xdg.el index 4973065f91..19accd71e9 100644 --- a/lisp/xdg.el +++ b/lisp/xdg.el @@ -29,6 +29,7 @@ ;; - XDG Base Directory Specification ;; - Thumbnail Managing Standard ;; - xdg-user-dirs configuration +;; - Desktop Entry Specification ;;; Code: @@ -146,6 +147,64 @@ xdg-user-dir (let ((dir (cdr (assoc name xdg-user-dirs)))) (when dir (expand-file-name dir)))) + +;; Desktop Entry Specification +;; https://specifications.freedesktop.org/desktop-entry-spec/latest/ + +(defconst xdg-desktop-group-regexp + (rx "[" (group-n 1 (+? (in " -Z\\^-~"))) "]") + "Regexp matching desktop file group header names.") + +(defconst xdg-desktop-entry-regexp + (rx (group-n 1 (+ (in "A-Za-z0-9-"))) + (* blank) "=" (* blank) + (group-n 2 (* nonl))) + "Regexp matching desktop file entry key-value pairs.") + +(defconst xdg-desktop-things + '("OnlyShowIn" "NotShowIn" "Actions" "MimeType" "Categories" "Implements") + "Names of recognized keys of type \"string(s)\".") + +(defun xdg--desktop-value-partition (str) + "Partition STRING into elements delimited by unescaped semicolons." + (let (res) + (dolist (x (split-string (replace-regexp-in-string "\\\\;" "\0" str) ";")) + (push (replace-regexp-in-string "\0" "\\\\;" x) res)) + (when (null (string-match-p "[^[:blank:]]" (car res))) (pop res)) + (nreverse res))) + +(defun xdg--desktop-parse-line () + (skip-chars-forward "[:blank:]") + (when (/= (following-char) ?#) + (cond + ((looking-at xdg-desktop-group-regexp) + (match-string 1)) + ((looking-at xdg-desktop-entry-regexp) + (cons (match-string 1) (match-string 2)))))) + +(defun xdg-desktop-read-file (filename) + "Return contents of desktop file FILENAME as an alist." + (let (elt group entries res) + (with-temp-buffer + (insert-file-contents filename) + (goto-char (point-min)) + (while (not (eobp)) + (when (setq elt (xdg--desktop-parse-line)) + (cond + ((stringp elt) + (if (null group) (setq group elt) + (push (cons group (nreverse entries)) res) + (setq group nil entries nil))) + ((consp elt) + (pcase-let ((`(,k . ,v) elt)) + (if (member k xdg-desktop-things) + (push (cons k (xdg--desktop-value-partition v)) entries) + (push elt entries)))))) + (forward-line)) + (when (and group entries) + (push (cons group entries) res))) + (nreverse res))) + (provide 'xdg) ;;; xdg.el ends here diff --git a/src/alloc.c b/src/alloc.c index 2cee646256..89372c11b5 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -3632,6 +3632,32 @@ Its value is void, and its function definition and property list are nil. */) return val; } +static Lisp_Object default_gensym_prefix; + +DEFUN ("gensym", Fgensym, Sgensym, 0, 1, 0, + doc: /* Return a new uninterned symbol. +The name is made by concatenating PREFIX with a counter value. +PREFIX is a string and defaults to "g". +There is no provision for resetting the counter. */) + (Lisp_Object prefix) +{ + static int gensym_counter = 0; + + Lisp_Object suffix, name; + int len; + char buf[INT_STRLEN_BOUND (EMACS_INT)]; + + if (NILP (prefix)) + prefix = default_gensym_prefix; + CHECK_STRING (prefix); + + EMACS_INT count = gensym_counter++; + len = sprintf (buf, "%"pI"d", count); + suffix = make_string (buf, len); + name = concat2 (prefix, suffix); + return Fmake_symbol (name); +} + /*********************************************************************** @@ -7515,6 +7541,8 @@ The time is in seconds as a floating point value. */); DEFVAR_INT ("gcs-done", gcs_done, doc: /* Accumulated number of garbage collections done. */); + default_gensym_prefix = build_pure_c_string ("g"); + defsubr (&Scons); defsubr (&Slist); defsubr (&Svector); @@ -7527,6 +7555,7 @@ The time is in seconds as a floating point value. */); defsubr (&Smake_string); defsubr (&Smake_bool_vector); defsubr (&Smake_symbol); + defsubr (&Sgensym); defsubr (&Smake_marker); defsubr (&Smake_finalizer); defsubr (&Spurecopy); --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=gensym.patch Content-Description: gensym moved to subr.el diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index b1ada00f4a..d8f3dbf93d 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -161,25 +161,19 @@ cl--expr-depends-p ;;; Symbols. -(defvar cl--gensym-counter 0) +(defvaralias 'cl--gensym-counter 'gensym-counter) ;;;###autoload -(defun cl-gensym (&optional prefix) - "Generate a new uninterned symbol. -The name is made by appending a number to PREFIX, default \"G\"." - (let ((pfix (if (stringp prefix) prefix "G")) - (num (if (integerp prefix) prefix - (prog1 cl--gensym-counter - (setq cl--gensym-counter (1+ cl--gensym-counter)))))) - (make-symbol (format "%s%d" pfix num)))) +(cl--defalias 'cl-gensym 'gensym) +(defvar cl--gentemp-counter 0) ;;;###autoload (defun cl-gentemp (&optional prefix) "Generate a new interned symbol with a unique name. -The name is made by appending a number to PREFIX, default \"G\"." - (let ((pfix (if (stringp prefix) prefix "G")) +The name is made by appending a number to PREFIX, default \"T\"." + (let ((pfix (if (stringp prefix) prefix "T")) name) - (while (intern-soft (setq name (format "%s%d" pfix cl--gensym-counter))) - (setq cl--gensym-counter (1+ cl--gensym-counter))) + (while (intern-soft (setq name (format "%s%d" pfix cl--gentemp-counter))) + (setq cl--gentemp-counter (1+ cl--gentemp-counter))) (intern name))) diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index 73eb9a4e86..306237ca38 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el @@ -250,7 +250,6 @@ cl-unload-function eval-when destructuring-bind gentemp - gensym pairlis acons subst diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index c6ef8d7a99..3190346497 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -1193,7 +1193,7 @@ edebug-make-enter-wrapper ;; Uses the dynamically bound vars edebug-def-name and edebug-def-args. ;; Do this after parsing since that may find a name. (setq edebug-def-name - (or edebug-def-name edebug-old-def-name (cl-gensym "edebug-anon"))) + (or edebug-def-name edebug-old-def-name (gensym "edebug-anon"))) `(edebug-enter (quote ,edebug-def-name) ,(if edebug-inside-func diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el index 4cf9d9609e..1413b9cd0b 100644 --- a/lisp/emacs-lisp/ert-x.el +++ b/lisp/emacs-lisp/ert-x.el @@ -295,7 +295,7 @@ ert-with-message-capture code under test from the behavior of the *Messages* buffer." (declare (debug (symbolp body)) (indent 1)) - (let ((g-advice (cl-gensym))) + (let ((g-advice (gensym))) `(let* ((,var "") (,g-advice (lambda (func &rest args) (if (or (null args) (equal (car args) "")) diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index c232b08bd1..07acc20ae8 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -293,8 +293,8 @@ ert--expand-should-1 (error `(signal ',(car err) ',(cdr err)))))) (cond ((or (atom form) (ert--special-operator-p (car form))) - (let ((value (cl-gensym "value-"))) - `(let ((,value (cl-gensym "ert-form-evaluation-aborted-"))) + (let ((value (gensym "value-"))) + `(let ((,value (gensym "ert-form-evaluation-aborted-"))) ,(funcall inner-expander `(setq ,value ,form) `(list ',whole :form ',form :value ,value) @@ -307,10 +307,10 @@ ert--expand-should-1 (and (consp fn-name) (eql (car fn-name) 'lambda) (listp (cdr fn-name))))) - (let ((fn (cl-gensym "fn-")) - (args (cl-gensym "args-")) - (value (cl-gensym "value-")) - (default-value (cl-gensym "ert-form-evaluation-aborted-"))) + (let ((fn (gensym "fn-")) + (args (gensym "args-")) + (value (gensym "value-")) + (default-value (gensym "ert-form-evaluation-aborted-"))) `(let* ((,fn (function ,fn-name)) (,args (condition-case err (let ((signal-hook-function #'ert--should-signal-hook)) @@ -352,7 +352,7 @@ ert--expand-should (ert--expand-should-1 whole form (lambda (inner-form form-description-form value-var) - (let ((form-description (cl-gensym "form-description-"))) + (let ((form-description (gensym "form-description-"))) `(let (,form-description) ,(funcall inner-expander `(unwind-protect @@ -430,8 +430,8 @@ ert--should-error-handle-error `(should-error ,form ,@keys) form (lambda (inner-form form-description-form value-var) - (let ((errorp (cl-gensym "errorp")) - (form-description-fn (cl-gensym "form-description-fn-"))) + (let ((errorp (gensym "errorp")) + (form-description-fn (gensym "form-description-fn-"))) `(let ((,errorp nil) (,form-description-fn (lambda () ,form-description-form))) (condition-case -condition- diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el index c96b400809..4073e26956 100644 --- a/lisp/emacs-lisp/generator.el +++ b/lisp/emacs-lisp/generator.el @@ -86,10 +86,7 @@ cps--cleanup-table-symbol (defvar cps--cleanup-function nil) (defmacro cps--gensym (fmt &rest args) - ;; Change this function to use `cl-gensym' if you want the generated - ;; code to be easier to read and debug. - ;; (cl-gensym (apply #'format fmt args)) - `(progn (ignore ,@args) (make-symbol ,fmt))) + `(gensym (format ,fmt ,@args))) (defvar cps--dynamic-wrappers '(identity) "List of transformer functions to apply to atomic forms we diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el index a8b8974cb4..42b1c21695 100644 --- a/lisp/emacs-lisp/gv.el +++ b/lisp/emacs-lisp/gv.el @@ -431,7 +431,7 @@ setf ;; code is large, but otherwise results in more efficient code. `(if ,test ,(gv-get then do) ,@(macroexp-unprogn (gv-get (macroexp-progn else) do))) - (let ((v (make-symbol "v"))) + (let ((v (gensym "v"))) (macroexp-let2 nil gv `(if ,test ,(gv-letplace (getter setter) then `(cons (lambda () ,getter) @@ -456,7 +456,7 @@ setf (gv-get (macroexp-progn (cdr branch)) do))) (gv-get (car branch) do))) branches)) - (let ((v (make-symbol "v"))) + (let ((v (gensym "v"))) (macroexp-let2 nil gv `(cond ,@(mapcar diff --git a/lisp/emacs-lisp/inline.el b/lisp/emacs-lisp/inline.el index ce46f66aef..cf8e2f22d8 100644 --- a/lisp/emacs-lisp/inline.el +++ b/lisp/emacs-lisp/inline.el @@ -218,7 +218,7 @@ inline--do-letlisteval `(let* ((,bsym ()) (,listvar (mapcar (lambda (e) (if (macroexp-copyable-p e) e - (let ((v (make-symbol "v"))) + (let ((v (gensym "v"))) (push (list v e) ,bsym) v))) ,listvar))) diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index 253b60e753..5935845743 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -213,7 +213,7 @@ pcase--make-docstring (defmacro pcase-exhaustive (exp &rest cases) "The exhaustive version of `pcase' (which see)." (declare (indent 1) (debug pcase)) - (let* ((x (make-symbol "x")) + (let* ((x (gensym "x")) (pcase--dontwarn-upats (cons x pcase--dontwarn-upats))) (pcase--expand ;; FIXME: Could we add the FILE:LINE data in the error message? @@ -304,7 +304,7 @@ pcase-dolist (declare (indent 1) (debug ((pcase-PAT form) body))) (if (pcase--trivial-upat-p (car spec)) `(dolist ,spec ,@body) - (let ((tmpvar (make-symbol "x"))) + (let ((tmpvar (gensym "x"))) `(dolist (,tmpvar ,@(cdr spec)) (pcase-let* ((,(car spec) ,tmpvar)) ,@body))))) @@ -715,7 +715,7 @@ pcase--funcall (call (progn (when (memq arg vs) ;; `arg' is shadowed by `env'. - (let ((newsym (make-symbol "x"))) + (let ((newsym (gensym "x"))) (push (list newsym arg) env) (setq arg newsym))) (if (functionp fun) @@ -842,7 +842,7 @@ pcase--u1 ;; A upat of the form (app FUN PAT) (pcase--mark-used sym) (let* ((fun (nth 1 upat)) - (nsym (make-symbol "x")) + (nsym (gensym "x")) (body ;; We don't change `matches' to reuse the newly computed value, ;; because we assume there shouldn't be such redundancy in there. diff --git a/lisp/subr.el b/lisp/subr.el index b3f9f90234..83c1fbfe8c 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -280,6 +280,20 @@ ignore-errors ;;;; Basic Lisp functions. +(defvar gensym-counter 0 + "Number used to construct the name of the next symbol created by `gensym'.") + +(defun gensym (&optional prefix) + "Return a new uninterned symbol. +The name is made by appending `gensym-counter' to PREFIX. +PREFIX can be a string, and defaults to \"G\". +If PREFIX is a number, it replaces the value of `gensym-counter'." + (let ((pfix (if (stringp prefix) prefix "G")) + (num (if (integerp prefix) prefix + (prog1 gensym-counter + (setq gensym-counter (1+ gensym-counter)))))) + (make-symbol (format "%s%d" pfix num)))) + (defun ignore (&rest _ignore) "Do nothing and return nil. This function accepts any number of arguments, but ignores them." --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 05 13:27:41 2017 Received: (at 28362) by debbugs.gnu.org; 5 Sep 2017 17:27:41 +0000 Received: from localhost ([127.0.0.1]:51722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dpHdV-0001ME-F1 for submit@debbugs.gnu.org; Tue, 05 Sep 2017 13:27:41 -0400 Received: from mail-qt0-f182.google.com ([209.85.216.182]:33609) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dpHdU-0001Lz-C0 for 28362@debbugs.gnu.org; Tue, 05 Sep 2017 13:27:40 -0400 Received: by mail-qt0-f182.google.com with SMTP id i50so13860580qtf.0 for <28362@debbugs.gnu.org>; Tue, 05 Sep 2017 10:27:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=swV+XAb+FsZ+F4drwUkoYNjtHjOACPUneFTb2K0Iwf4=; b=sPJvDjcJxoUmeCUNVDLH80EPWlGG5NddGKAw2E/B02gm9D8ETUTEqQBVpcXvD/mYp7 3cNSUSK6SIju4qkxD1KGB7Uuexvg/j2Y47N3p9Zp0yQfPOypESInG0YyR6cUy4ysi9PU 1+xEI7rKkvs0KXn3qumMYMLkcyrnf5c0u8I3JOV1/NEJ5sOglZBV31jCGBk0mXoHB5S0 WBxtS48/xoTeaDjRSoAItdxmrxN9wBQuUFmMdbqkXm7KPSXole3TsO5sW5/uL5cQd227 S1jMW7qGFS0iwIX/MvBHWG3c0EDDuFd4LCsO6d4YoHRxfDDVOWqXa6hdshnNIEl8sr9k TjhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=swV+XAb+FsZ+F4drwUkoYNjtHjOACPUneFTb2K0Iwf4=; b=E5i6u0DsR2T3N4maGrUNccBfsKq0lwXJx71cVSvwDwUS8PCahMn1FiDuuMWlMU9Z0a a4oFqwHM4LDZk9zAnmSTCwy/DGwxeIEuXjNyQsS4Tp9NcNGpm0SmX7XjN1bkFAafFOBP SGfZjwemRts88lzr5K9WSDOdvOGCNy+R6sZe/w7Bp2a5CDXnjT8AI40B9hvROxDuT1qX MBh1lR9top5PGuvUg9QOwDyJXc91v6NAGjlsZuEfIu8Flpo+UljVDyzTn/b1UefZ3lY2 c+qn6hEWEPNR1o/ptRivrU5nP721pFXTiJRK3dt+a7BoGwtkrCbMY9faQOz3hmYBQ2gW zloQ== X-Gm-Message-State: AHPjjUh1OnnhIHlN/CAaqRS49gcD+C8OI1swCM7JLEkBGF9emJO35D6Q QkoZboBe2tXc1xdnvFY6wg== X-Google-Smtp-Source: ADKCNb6l3gYhh4bJqvMm13HflE1tg+kSfR/URWb/7mKxJJmja78NxkVDeAa/F1JOrfO8bUIsNwh+vw== X-Received: by 10.237.33.253 with SMTP id m58mr6948531qtc.328.1504632454756; Tue, 05 Sep 2017 10:27:34 -0700 (PDT) Received: from holos.localdomain (pool-173-67-36-61.bltmmd.fios.verizon.net. [173.67.36.61]) by smtp.gmail.com with ESMTPSA id r11sm765932qkh.80.2017.09.05.10.27.33 for <28362@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Sep 2017 10:27:33 -0700 (PDT) Received: by holos.localdomain (Postfix, from userid 1000) id 5B9EF68E72; Tue, 5 Sep 2017 13:27:33 -0400 (EDT) Date: Tue, 5 Sep 2017 13:27:33 -0400 From: Mark Oteiza To: 28362@debbugs.gnu.org Subject: Re: 26.0.50; [PATCH] gensym in core elisp Message-ID: <20170905172733.GA10016@holos.localdomain> References: <8737812hqc.fsf@holos> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ReaqsoxgOBHFXBhH" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8737812hqc.fsf@holos> User-Agent: Mutt/1.9.0 (2017-09-02) X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 28362 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit On 05/09/17 at 01:11pm, Mark Oteiza wrote: >I wrote a naïve gensym in C that is only about 1.5x to 2x faster than >cl-gensym (and incompatible because of the inaccessible counter). Patch >attached. There was a bunch of other crap in that patch--clean one attached. --ReaqsoxgOBHFXBhH Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="gensym_alloc_c.patch" diff --git a/src/alloc.c b/src/alloc.c index 2cee646256..89372c11b5 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -3632,6 +3632,32 @@ Its value is void, and its function definition and property list are nil. */) return val; } +static Lisp_Object default_gensym_prefix; + +DEFUN ("gensym", Fgensym, Sgensym, 0, 1, 0, + doc: /* Return a new uninterned symbol. +The name is made by concatenating PREFIX with a counter value. +PREFIX is a string and defaults to "g". +There is no provision for resetting the counter. */) + (Lisp_Object prefix) +{ + static int gensym_counter = 0; + + Lisp_Object suffix, name; + int len; + char buf[INT_STRLEN_BOUND (EMACS_INT)]; + + if (NILP (prefix)) + prefix = default_gensym_prefix; + CHECK_STRING (prefix); + + EMACS_INT count = gensym_counter++; + len = sprintf (buf, "%"pI"d", count); + suffix = make_string (buf, len); + name = concat2 (prefix, suffix); + return Fmake_symbol (name); +} + /*********************************************************************** @@ -7515,6 +7541,8 @@ The time is in seconds as a floating point value. */); DEFVAR_INT ("gcs-done", gcs_done, doc: /* Accumulated number of garbage collections done. */); + default_gensym_prefix = build_pure_c_string ("g"); + defsubr (&Scons); defsubr (&Slist); defsubr (&Svector); @@ -7527,6 +7555,7 @@ The time is in seconds as a floating point value. */); defsubr (&Smake_string); defsubr (&Smake_bool_vector); defsubr (&Smake_symbol); + defsubr (&Sgensym); defsubr (&Smake_marker); defsubr (&Smake_finalizer); defsubr (&Spurecopy); --ReaqsoxgOBHFXBhH-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 11 16:35:11 2017 Received: (at 28362) by debbugs.gnu.org; 11 Sep 2017 20:35:11 +0000 Received: from localhost ([127.0.0.1]:34149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drVQF-0005IB-4q for submit@debbugs.gnu.org; Mon, 11 Sep 2017 16:35:11 -0400 Received: from mail-qk0-f177.google.com ([209.85.220.177]:38028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drVQD-0005Hy-Hv for 28362@debbugs.gnu.org; Mon, 11 Sep 2017 16:35:09 -0400 Received: by mail-qk0-f177.google.com with SMTP id a128so21180750qkc.5 for <28362@debbugs.gnu.org>; Mon, 11 Sep 2017 13:35:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=b1ztwxzMI4xBe0UJfKrVrmWK56UjelEtySswc5C2t4c=; b=M3Csg1QHvjofC4tPNcwMVm4BZArOIEJXgNdmge2blhvhsdCavWlcPsZekGHxwYx8fV QzrRfIN4Mul93VYdOJ15xbK0gUvbQ1CNzrYF7gg4UrXDzBo6nbe4MmSjzKVa8WITG2y0 /0DZHWZY8R+LQmfeGAUcXyi0jDhGSbZQeoa2rivFPYnR7dudlfhbCmnAx+SQVSUcQR62 AYDbQAhfEefwmxAJE87nbVNgx+TjLoZ/4t57d7dyOWAF0T5aObpNnF8Gw9QkTXKOrlLw v1p4fEmmpi4RvTMxL2J9BvtB7yzSq6700zLRIrBTJZEewDqv8Hs8ZNMN4sd2AiNnlEls 3A8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=b1ztwxzMI4xBe0UJfKrVrmWK56UjelEtySswc5C2t4c=; b=ko5M74P4DpxCMGjtmZRK46/vWa826OkEK3h/pH7Sito4MplV47MiX8TWE39DQP8/Ue JOPgDIwD3ucOTNwTvSlUWwdvveAai8qYYEU4yYngbEZyYXSMfiCmBW8T13NHhX0YToHH jYRRUhtDTBev9PNnrg33s7h8P5Ha0HSzKomY8bljbCt9u46lZV+wG/KhP5UKrCsr51kU 1HU+h0UwvJ2OiZM6tzfjGElIQ523GE5q1XVOdotEnpwJSK/JimZ7u7t9tfnr4TNY7zzH KxDg8WpOxXqua/HM2Ep1fK4aLcv+26qF/Sp7e8OHNpN7UjhekKZixEkCR8brgHfB8Ln7 spmA== X-Gm-Message-State: AHPjjUj3zrCHsbXW293DbS8xC+Iwc0yE+BZvFj1Z/nrHQDVL05LLihld OIer3u4sV0MVew6da/yJnQ== X-Google-Smtp-Source: AOwi7QDQHGLj58pKi/A02Z9+4bsNdia3DZ/NzWBNL8Q7vmahrwbhF7XmclznMoR7jG+sV6nNEgdzzg== X-Received: by 10.55.167.144 with SMTP id q138mr16571546qke.74.1505162103552; Mon, 11 Sep 2017 13:35:03 -0700 (PDT) Received: from holos.localdomain (pool-173-67-36-61.bltmmd.fios.verizon.net. [173.67.36.61]) by smtp.gmail.com with ESMTPSA id h67sm6549788qkf.6.2017.09.11.13.35.02 for <28362@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Sep 2017 13:35:02 -0700 (PDT) Received: by holos.localdomain (Postfix, from userid 1000) id 1149968E70; Mon, 11 Sep 2017 16:35:02 -0400 (EDT) Date: Mon, 11 Sep 2017 16:35:01 -0400 From: Mark Oteiza To: 28362@debbugs.gnu.org Subject: Re: 26.0.50; [PATCH] gensym in core elisp Message-ID: <20170911203501.GA28750@holos.localdomain> References: <8737812hqc.fsf@holos> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8737812hqc.fsf@holos> User-Agent: Mutt/1.9.0 (2017-09-02) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 28362 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 05/09/17 at 01:11pm, Mark Oteiza wrote: > > Wishlist. > > I attached a patch putting gensym into subr.el. Any comments? Moving gensym doesn't affect much, so I'll happily commit, say, at the end of the week. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 12 10:39:24 2017 Received: (at 28362) by debbugs.gnu.org; 12 Sep 2017 14:39:24 +0000 Received: from localhost ([127.0.0.1]:35962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drmLU-0002DA-Gx for submit@debbugs.gnu.org; Tue, 12 Sep 2017 10:39:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drmLS-0002Cy-EP for 28362@debbugs.gnu.org; Tue, 12 Sep 2017 10:39:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drmLJ-0006eQ-VY for 28362@debbugs.gnu.org; Tue, 12 Sep 2017 10:39:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35489) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drmLJ-0006eM-S0; Tue, 12 Sep 2017 10:39:13 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1975 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1drmLI-0003tA-W7; Tue, 12 Sep 2017 10:39:13 -0400 Date: Tue, 12 Sep 2017 17:39:12 +0300 Message-Id: <83o9qgq8vj.fsf@gnu.org> From: Eli Zaretskii To: Mark Oteiza In-reply-to: <20170911203501.GA28750@holos.localdomain> (message from Mark Oteiza on Mon, 11 Sep 2017 16:35:01 -0400) Subject: Re: bug#28362: 26.0.50; [PATCH] gensym in core elisp References: <8737812hqc.fsf@holos> <20170911203501.GA28750@holos.localdomain> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28362 Cc: 28362@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Mon, 11 Sep 2017 16:35:01 -0400 > From: Mark Oteiza > > On 05/09/17 at 01:11pm, Mark Oteiza wrote: > > > > Wishlist. > > > > I attached a patch putting gensym into subr.el. > > Any comments? Moving gensym doesn't affect much, so I'll happily > commit, say, at the end of the week. I see no reasons to have gensym in C, so let's go with the Lisp version. Please also add a NEWS entry about this. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 12 11:14:33 2017 Received: (at 28362-done) by debbugs.gnu.org; 12 Sep 2017 15:14:33 +0000 Received: from localhost ([127.0.0.1]:36002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drmtV-00034B-Bk for submit@debbugs.gnu.org; Tue, 12 Sep 2017 11:14:33 -0400 Received: from mail-qk0-f171.google.com ([209.85.220.171]:36053) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drmtT-00033y-6w for 28362-done@debbugs.gnu.org; Tue, 12 Sep 2017 11:14:32 -0400 Received: by mail-qk0-f171.google.com with SMTP id z143so25737596qkb.3 for <28362-done@debbugs.gnu.org>; Tue, 12 Sep 2017 08:14:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rVC5XWFCN4YgZHXjMFVg6kL4+m/if0iSxiN5bzMvwNM=; b=uCauNtvxMfMVfsz0KlBgxIbKAywgXaz4zd3/nXfIaKZvGSbqC8KrVMrrn6yTqgq9NW DGr9IrmrGt1I2+gd23zOc4LNWqs4GxQ1pTDNvdElf4ERmWDPIli9Sgkcr5TImfSlr/DL gxvwuC2RISA7PwIa4YkCnOwd5ZoH3erqA/iDvOZP0UN/ioIlRpFopvZdRpR8ZwVmbbMA EERYuae26B4/L+1BvhIeTyB1PeVZrl0B0An0h3gkOApDa29h3jx8eUUXjEm0a8gKmGdn 5CuE1+/yM8Enuoo9cjuNZDvGBH9Drpo6b8e5sJ/R9KbPOciWiaL1SEOvpPCbnS2hZMWs 3vIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rVC5XWFCN4YgZHXjMFVg6kL4+m/if0iSxiN5bzMvwNM=; b=f1+O4XWqGb0oIA+lQzQ1pZN0JaoX5yLv300iGFElwIh2DNwK+rA/DyFg5LayKsaE3d 56hM+0GApHM70g6Jsvxyzh3SOWeFMuQ9slXRVWBqlSiBionBVW6ZjAwstvtH3NcMh4uu 3nVUz5Ad5tvId+U5NGigMLArDhMht4owe2GEP2N3QUwnYs7puPCtlXtA5cFcEmdcDtry Kyqy4IkUECsvjEfNpGEu+3VqcLDd9YsOSZF2yb+l8rk6CF7orJJOxKQ8JRYVkChYic4n 2hoZtdx29ymD8GyWv4kC2SUiAttPPXr+tUAwqZ9TH45xYSYJE2w/RZ61IQmWgneoHs1S dboA== X-Gm-Message-State: AHPjjUiF3cgeJa75l9XuzrQ/1zpw0kAfl21RLCzmx/klaZTm2D7t+cWX aFnremBwOTIBoGXVIC4MEg== X-Google-Smtp-Source: AOwi7QAT0EmQ466MF9LuU31GFjfwt09E7JwIfgwzPbF321Wkf0PJe33gbZzNFwmpYAypDPDM0zpqeQ== X-Received: by 10.55.101.23 with SMTP id z23mr16386452qkb.257.1505229265368; Tue, 12 Sep 2017 08:14:25 -0700 (PDT) Received: from holos.localdomain (pool-173-67-36-61.bltmmd.fios.verizon.net. [173.67.36.61]) by smtp.gmail.com with ESMTPSA id k7sm7629691qkf.61.2017.09.12.08.14.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Sep 2017 08:14:24 -0700 (PDT) Received: by holos.localdomain (Postfix, from userid 1000) id 31A7268221; Tue, 12 Sep 2017 11:14:24 -0400 (EDT) Date: Tue, 12 Sep 2017 11:14:24 -0400 From: Mark Oteiza To: Eli Zaretskii Subject: Re: bug#28362: 26.0.50; [PATCH] gensym in core elisp Message-ID: <20170912151424.GA3145@holos.localdomain> References: <8737812hqc.fsf@holos> <20170911203501.GA28750@holos.localdomain> <83o9qgq8vj.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83o9qgq8vj.fsf@gnu.org> User-Agent: Mutt/1.9.0 (2017-09-02) X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 28362-done Cc: 28362-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On 12/09/17 at 05:39pm, Eli Zaretskii wrote: > > Date: Mon, 11 Sep 2017 16:35:01 -0400 > > From: Mark Oteiza > > > > On 05/09/17 at 01:11pm, Mark Oteiza wrote: > > > > > > Wishlist. > > > > > > I attached a patch putting gensym into subr.el. > > > > Any comments? Moving gensym doesn't affect much, so I'll happily > > commit, say, at the end of the week. > > I see no reasons to have gensym in C, so let's go with the Lisp > version. > > Please also add a NEWS entry about this. Done, thank you. From unknown Tue Aug 19 10:01:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 11 Oct 2017 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator