emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/hyperbole ce72dc8a8d 2/2: Cleanup - Remove unused funct


From: ELPA Syncer
Subject: [elpa] externals/hyperbole ce72dc8a8d 2/2: Cleanup - Remove unused function and do not use removed function (#236)
Date: Tue, 27 Sep 2022 02:57:45 -0400 (EDT)

branch: externals/hyperbole
commit ce72dc8a8dd9c40563f12d29c011f476f9589e81
Author: Mats Lidell <mats.lidell@lidells.se>
Commit: GitHub <noreply@github.com>

    Cleanup - Remove unused function and do not use removed function (#236)
---
 ChangeLog |  6 ++++++
 hact.el   |  6 +++---
 hypb.el   | 32 +-------------------------------
 3 files changed, 10 insertions(+), 34 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index da1525f2f6..5c2550a42b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-09-19  Mats Lidell  <matsl@gnu.org>
+
+* hypb.el (hypb:replace-match-string): Remove unused function.
+
+* hact.el: Use byte-code-function-p.
+
 2022-09-14  Mats Lidell  <matsl@gnu.org>
 
 * hywconfig.el:
diff --git a/hact.el b/hact.el
index d6cf0310cf..b77e0bae9b 100644
--- a/hact.el
+++ b/hact.el
@@ -3,9 +3,9 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:    18-Sep-91 at 02:57:09
-;; Last-Mod:     29-Aug-22 at 00:21:24 by Bob Weiner
+;; Last-Mod:     18-Sep-22 at 22:23:21 by Mats Lidell
 ;;
-;; Copyright (C) 1991-2021  Free Software Foundation, Inc.
+;; Copyright (C) 1991-2022  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
 ;;
 ;; This file is part of GNU Hyperbole.
@@ -383,7 +383,7 @@ performing ACTION."
       (let ((hist-elt (hhist:element)))
        (run-hooks 'action-act-hook)
        (prog1 (or (if (or (symbolp action) (listp action)
-                          (hypb:emacs-byte-code-p action)
+                          (byte-code-function-p action)
                           (subrp action)
                           (and (stringp action) (not (integerp action))
                                (setq action (key-binding action))))
diff --git a/hypb.el b/hypb.el
index 9400590f49..decd80b15b 100644
--- a/hypb.el
+++ b/hypb.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:     6-Oct-91 at 03:42:38
-;; Last-Mod:     29-Aug-22 at 00:30:34 by Bob Weiner
+;; Last-Mod:     18-Sep-22 at 22:39:36 by Mats Lidell
 ;;
 ;; Copyright (C) 1991-2022  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
@@ -573,8 +573,6 @@ WINDOW pixelwise."
        ((symbolp object)
         (get object 'hyperbole))))
 
-(make-obsolete 'hypb:replace-match-string 'replace-regexp-in-string "8.0.1")
-
 (defun hypb:readable-directories (&rest dirs)
   "Flatten rest of DIRS and return or error if any of DIRS are unreadable."
   (setq dirs (flatten-list dirs))
@@ -584,34 +582,6 @@ WINDOW pixelwise."
             (string-join unreadable-dirs "\n"))))
   dirs)
 
-(defun hypb:replace-match-string (regexp str new &optional literal fixedcase)
-  "Replace all matches for REGEXP in STR with NEW string and return the result.
-If NEW is nil, return STR unchanged.
-
-Optional LITERAL non-nil means do a literal replacement.
-Otherwise treat \\ in NEW string as special:
-  \\& means substitute original matched text,
-  \\N means substitute match for \(...\) number N,
-  \\\\ means insert one \\.
-
-If optional fifth arg FIXEDCASE is non-nil, do not alter the case of
-the replacement text.  Otherwise, maybe capitalize the whole text, or
-maybe just word initials, based on the replaced text.  If the replaced
-text has only capital letters and has at least one multiletter word,
-convert NEW to all caps.  Otherwise if all words are capitalized
-in the replaced text, capitalize each word in NEW.
-
-NEW may instead be a function of one argument (the string to replace in)
-that returns a replacement string."
-  (if (null new)
-      str
-    (unless (stringp str)
-      (error "(hypb:replace-match-string): 2nd arg must be a string: %s" str))
-    (unless (or (stringp new) (functionp new))
-      (error "(hypb:replace-match-string): 3rd arg must be a string or 
function: %s"
-            new))
-    (replace-regexp-in-string regexp new str fixedcase literal)))
-
 ;;;###autoload
 (defun hypb:require-package (package-name)
   "Prompt user to install, if necessary, and require the Emacs PACKAGE-NAME.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]