From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.devel Subject: Re: when do we remove backward compatibility definitions? Date: Tue, 21 Nov 2017 12:37:13 -0500 Organization: disorganization Message-ID: References: Reply-To: sds@gnu.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1511285873 16382 195.159.176.226 (21 Nov 2017 17:37:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 21 Nov 2017 17:37:53 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (darwin) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 21 18:37:49 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHCUS-0003hM-11 for ged-emacs-devel@m.gmane.org; Tue, 21 Nov 2017 18:37:44 +0100 Original-Received: from localhost ([::1]:35729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHCUZ-0001hL-FR for ged-emacs-devel@m.gmane.org; Tue, 21 Nov 2017 12:37:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHCUN-0001g0-Nj for emacs-devel@gnu.org; Tue, 21 Nov 2017 12:37:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHCUL-0003tU-3I for emacs-devel@gnu.org; Tue, 21 Nov 2017 12:37:39 -0500 Original-Received: from [195.159.176.226] (port=60716 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eHCUK-0003t4-NX for emacs-devel@gnu.org; Tue, 21 Nov 2017 12:37:37 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eHCU7-0002Tt-R7 for emacs-devel@gnu.org; Tue, 21 Nov 2017 18:37:23 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 158 Original-X-Complaints-To: usenet@blaine.gmane.org X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. Cancel-Lock: sha1:1ptLNKYMMI1aZlU1peDCmVlu6To= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:220330 Archived-At: --=-=-= Content-Type: text/plain Hi, I asked this question 3 weeks ago and got no replies: > * Sam Steingold [2017-11-02 11:04:22 -0400]: > > Gnus has a few backward compatibility face declarations like this: > > (put 'gnus-group-news-4-face 'obsolete-face "22.1") > > Emacs 22.1 was released on 2007-06-02 -- over 10 years ago. > > What is the policy on removing such declarations? > > R releases? > M major releases? > Y years? > > Where is it officially documented? To salivate our thinking, here are the obsolescence annotations in the lisp sources (the code is attached): --8<---------------cut here---------------start------------->8--- (insert-counter-alist (counter-table-to-sorted-alist (second (elof-count-all-obsolete "..../emacs/trunk/lisp")))) 25.1 193 22.1 172 24.3 127 24.1 125 24.4 123 23.1 88 26.1 65 Org 9.0 63 23.2 32 Org 9.1 15 Emacs 24.1 7 23.3 7 24.5 7 Gnus 5.10.9 (Emacs 22.1) 6 23.4 5 22.2 5 ERC 5.1 4 27.1 4 21.1 4 Gnus 5.10 (Emacs 22.1) 2 Emacs 22.1 2 Emacs 23.1 2 Org 8.2 2 Org 8.3 2 speedbar 1.0pre3 (Emacs 23.1) 2 rst 1.0.0 2 icalendar 0.19 1 CEDET 1.1 1 Emacs 26.1 1 20.3 1 Gnus 5.9 (Emacs 22.1) 1 19.34 1 2011-08-02 1 CC Mode 5.31.4, 2006-04-14 1 at least 19.34 1 before 19.34 1 25.2 1 --8<---------------cut here---------------end--------------->8--- It does look like GNU Emacs 22.1 (2007-06-02) is a good cut-off candidate. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=elisp-obsolete.el Content-Transfer-Encoding: quoted-printable Content-Description: Find Emacs Lisp obsolete forms. ;; Find Emacs Lisp obsolete forms. (defun elof-file (file-name versions-table forms-table) "Count obsolescence forms in FILE-NAME. Update hash tables VERSIONS-TABLE and FORMS-TABLE." (with-temp-buffer (insert-file-contents file-name) (let ((keep-going t) (found 0) (forms 0)) (while keep-going (condition-case err (let* ((form (read (current-buffer))) (since (and (listp form) (elof-unquote (elof-obsolete-since form))))) (incf forms) (when since (incf (gethash since versions-table 0)) (incf (gethash (first form) forms-table 0)) (incf found))) (end-of-file (message "Found %d/%d in %s" found forms file-name) (setq keep-going nil)))) forms))) (defun elof-obsolete-since (form) (cl-case (first form) ((make-obsolete-variable make-obsolete define-obsolete-function-alias define-obsolete-variable-alias) (fourth form)) ((defun defmacro) (let ((decl (if (stringp (fourth form)) (fifth form) (fourth form)))) (and (listp decl) (eq (first decl) 'declare) (third (assq 'obsolete (rest decl)))))) (put (when (equal (third form) ''obsolete-face) (fourth form))))) (defun elof-unquote (form) "Sometimes the version string is quoted" (if (and (listp form) (eq (car form) 'quote)) (second form) form)) (defun elof-count-all-obsolete (dir) "Count all obsolete forms in DIR and its subdirectories." (let ((versions-table (make-hash-table :test 'equal)) (forms-table (make-hash-table)) (forms 0) (files (find-lisp-find-files dir "\.el$"))) (message "Found %d Emacs Lisp files under %s" (length files) dir) (dolist (file-name files) (incf forms (elof-file file-name versions-table forms-table))) (message "Found %d forms" forms) (list forms versions-table forms-table))) (defun counter-table-to-sorted-alist (hash-table) "Convert a counter hash table to a sorted alist." (let (alist) (maphash (lambda (key value) (push (cons key value) alist)) hash-table) (sort alist (lambda (c1 c2) (> (cdr c1) (cdr c2)))))) (defun insert-counter-alist (alist &optional mincount) "Insert the result of counter-table-to-sorted-alist" (setq mincount (or mincount 0)) (dolist (cell alist) (when (< mincount (cdr cell)) (insert (format "%30s %5d\n" (car cell) (cdr cell)))))) --=-=-= Content-Type: text/plain -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504 http://steingoldpsychology.com http://www.childpsy.net https://ffii.org http://think-israel.org https://jihadwatch.org http://www.dhimmitude.org WinWord 6.0 UNinstall: Not enough disk space to uninstall WinWord --=-=-=--