summaryrefslogtreecommitdiff
path: root/lisp/cedet/semantic/wisent/comp.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2022-08-10 00:41:25 +0200
committerStefan Kangas <stefan@marxist.se>2022-08-10 00:45:50 +0200
commitec2bd7dd5c68510130e7abf7e76361d776c4fe22 (patch)
tree53ee499d679d71e927fb534ca9ee375ca11a7b06 /lisp/cedet/semantic/wisent/comp.el
parent561d09d7adfc6d346780b30e4a2afd908ae4f4a0 (diff)
downloademacs-ec2bd7dd5c68510130e7abf7e76361d776c4fe22.tar.gz
Make wisent-pad-string obsolete in favor of string-pad
* lisp/cedet/semantic/wisent/comp.el (wisent-pad-string): Make obsolete in favor of 'string-pad'. Update callers. (subr-x): Require when compiling.
Diffstat (limited to 'lisp/cedet/semantic/wisent/comp.el')
-rw-r--r--lisp/cedet/semantic/wisent/comp.el16
1 files changed, 6 insertions, 10 deletions
diff --git a/lisp/cedet/semantic/wisent/comp.el b/lisp/cedet/semantic/wisent/comp.el
index ba67d250604..17cd3b1d59a 100644
--- a/lisp/cedet/semantic/wisent/comp.el
+++ b/lisp/cedet/semantic/wisent/comp.el
@@ -38,6 +38,7 @@
;;; Code:
(require 'semantic/wisent)
(eval-when-compile (require 'cl-lib))
+(eval-when-compile (require 'subr-x)) ; `string-pad'
;;;; -------------------
;;;; Misc. useful things
@@ -80,18 +81,13 @@
`(dlet ,(wisent-context-bindings name)
,@body))
-;; Other utilities
-
(defsubst wisent-pad-string (s n &optional left)
"Fill string S with spaces.
Return a new string of at least N characters. Insert spaces on right.
If optional LEFT is non-nil insert spaces on left."
- (let ((i (length s)))
- (if (< i n)
- (if left
- (concat (make-string (- n i) ?\ ) s)
- (concat s (make-string (- n i) ?\ )))
- s)))
+ (declare (obsolete string-pad "29.1"))
+ (string-pad s n nil left))
+
;;;; ------------------------
;;;; Environment dependencies
@@ -704,7 +700,7 @@ S must be a vector of integers."
(setq i 1)
(while (<= i nrules)
(unless (aref ruseful i)
- (wisent-log "#%s " (wisent-pad-string (format "%d" i) 4))
+ (wisent-log "#%s " (string-pad (format "%d" i) 4))
(wisent-log "%s:" (wisent-tag (aref rlhs i)))
(setq r (aref rrhs i))
(while (natnump (aref ritem r))
@@ -2298,7 +2294,7 @@ there are any reduce/reduce conflicts."
;; Don't print rules disabled in `wisent-reduce-grammar-tables'.
(when (aref ruseful i)
(wisent-log " %s %s ->"
- (wisent-pad-string (number-to-string i) 6)
+ (string-pad (number-to-string i) 6)
(wisent-tag (aref rlhs i)))
(setq r (aref rrhs i))
(if (> (aref ritem r) 0)