Browse Source

Deprecate `org-char-to-string' in favor of `char-to-string'

* lisp/org-macs.el (org-char-to-string): Remove function.
* lisp/org-compat.el (org-char-to-string): Declare function as obsolete.
* lisp/org.el (org-link-unescape-compound): Apply removal.
Nicolas Goaziou 3 years ago
parent
commit
23d84285bf
3 changed files with 2 additions and 16 deletions
  1. 1 0
      lisp/org-compat.el
  2. 0 15
      lisp/org-macs.el
  3. 1 1
      lisp/org.el

+ 1 - 0
lisp/org-compat.el

@@ -88,6 +88,7 @@
 (define-obsolete-function-alias 'org-floor* 'cl-floor "Org 9.0")
 
 ;;;; Functions available since Emacs 24.3
+(define-obsolete-function-alias 'org-char-to-string 'char-to-string "Org 9.0")
 (define-obsolete-function-alias 'org-buffer-narrowed-p 'buffer-narrowed-p "Org 9.0")
 (define-obsolete-function-alias 'org-delete-directory 'delete-directory "Org 9.0")
 (define-obsolete-function-alias 'org-number-sequence 'number-sequence "Org 9.0")

+ 0 - 15
lisp/org-macs.el

@@ -31,21 +31,6 @@
 
 ;;; Code:
 
-(eval-and-compile
-  (unless (fboundp 'declare-function)
-    (defmacro declare-function (fn file &optional _arglist _fileonly)
-      `(autoload ',fn ,file)))
-
-  (if (>= emacs-major-version 23)
-      (defsubst org-char-to-string(c)
-	"Defsubst to decode UTF-8 character values in emacs 23 and beyond."
-	(char-to-string c))
-    (defsubst org-char-to-string (c)
-      "Defsubst to decode UTF-8 character values in emacs 22."
-      (string (decode-char 'ucs c)))))
-
-(declare-function org-add-props "org-compat" (string plist &rest props))
-
 (defmacro org-with-gensyms (symbols &rest body)
   (declare (debug (sexp body)) (indent 1))
   `(let ,(mapcar (lambda (s)

+ 1 - 1
lisp/org.el

@@ -10190,7 +10190,7 @@ Note: this function also decodes single byte encodings like
 	  (when (> eat 0) (setq eat (- eat 1)))
 	  (cond
 	   ((= 0 eat)			;multi byte
-	    (setq ret (concat ret (org-char-to-string sum)))
+	    (setq ret (concat ret (char-to-string sum)))
 	    (setq sum 0))
 	   ((not bytes)			; single byte(s)
 	    (setq ret (org-link-unescape-single-byte-sequence hex))))))