From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: replace deprecated function ? Date: Tue, 13 Feb 2018 12:16:19 -0600 Organization: NewsGuy.com Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1518545969 25921 195.159.176.226 (13 Feb 2018 18:19:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 13 Feb 2018 18:19:29 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 13 19:19:25 2018 Return-path: Envelope-to: geh-help-gnu-emacs@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 1elfAV-00053c-RH for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Feb 2018 19:19:03 +0100 Original-Received: from localhost ([::1]:59700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elfCV-0001GM-VO for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Feb 2018 13:21:07 -0500 X-Received: by 10.200.37.186 with SMTP id e55mr1496234qte.45.1518545794776; Tue, 13 Feb 2018 10:16:34 -0800 (PST) Original-Path: usenet.stanford.edu!q21no3293114qtn.1!news-out.google.com!o9ni607qte.1!nntp.google.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!spln!extra.newsguy.com!newsp.newsguy.com!news2 Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Original-NNTP-Posting-Host: p0a7a86b8512369c8abceb3786ee7c9731c44e9910cf33a01.newsdawg.com X-Mozilla-News-Host: news://news.newsguy.net:8080 X-Received-Bytes: 1738 X-Received-Body-CRC: 3801153170 Content-Language: en-US Original-Xref: usenet.stanford.edu gnu.emacs.help:221860 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:115975 Archived-At: In order to convert arabic numerals to superscripts (for example in plaintext to refer to footnotes)I have been using the following function for a few years: (defun num-to-supnum () ;; M-x sup "Replace digits with superscript digits." (interactive) (let ((start (point))) (save-excursion (query-replace-regexp-eval "[1234567890]" '(cdr (assoc (match-string-no-properties 0) '(("1" . "¹") ("2" . "²") ("3" . "³") ("4" . "⁴") ("5" . "⁵") ("6" . "⁶") ("7" . "⁷") ("8" . "⁸") ("9" . "⁹") ("0" . "⁰")) )) nil start (point-max)) ))) But I notice that query-replace-regexp-eval is no longer considered kosher. How should this be rewritten for Emacs ver. 25? Especially I would like a function that is more immediately understandable than what I have now. Thanks, Ed