Skip to content

Commit

Permalink
Revert "Use compat-string-trim-* functions for compatibility"
Browse files Browse the repository at this point in the history
This reverts commit b6382f4.
  • Loading branch information
zonuexe committed Nov 3, 2022
1 parent cf10f7c commit 08ef915
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
1 change: 0 additions & 1 deletion Cask
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(package "php-mode" "1.24.1" "Major mode for editing PHP code")
(source gnu)
(source melpa)

(package-file "lisp/php-mode.el")
Expand Down
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ AUTOLOADS = php-mode-autoloads.el
ELCS = $(ELS:.el=.elc)

%.elc: %.el
$(EMACS) --batch -L lisp/ --eval \
"(let ((default-directory (expand-file-name \".cask\" default-directory))) \
(normal-top-level-add-subdirs-to-load-path))" \
-f batch-byte-compile $<
$(EMACS) --batch -L lisp/ -f batch-byte-compile $<

all: autoloads $(ELCS) authors

Expand Down
9 changes: 2 additions & 7 deletions lisp/php-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
;; URL: https://github.com/emacs-php/php-mode
;; Keywords: languages php
;; Version: 1.24.1
;; Package-Requires: ((emacs "25.2") (compat "28.1.1.0"))
;; Package-Requires: ((emacs "25.2"))
;; License: GPL-3.0-or-later

(eval-and-compile
Expand Down Expand Up @@ -82,7 +82,6 @@
(require 'rx)
(require 'cl-lib)
(require 'regexp-opt)
(require 'compat-26 nil t)
(defvar add-log-current-defun-header-regexp)
(defvar add-log-current-defun-function)
(defvar c-syntactic-context)
Expand All @@ -93,11 +92,7 @@
(eval-when-compile
(let* ((fallback-version (format "%s-non-vcs" (with-no-warnings php-mode-version-number))))
(if (locate-dominating-file default-directory ".git")
(funcall
(if (and (boundp 'string-trim-left) (boundp 'string-trim-right))
(lambda (s) (string-trim-left (string-trim-right s) "v"))
(lambda (s) (compat-string-trim-left (compat-string-trim-right s) "v")))
(shell-command-to-string "git describe --tags"))
(string-trim-left (string-trim-right (shell-command-to-string "git describe --tags")) "v")
fallback-version)))
"PHP Mode build ID.
Expand Down

0 comments on commit 08ef915

Please sign in to comment.