aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/allout.el11
-rw-r--r--lisp/org/org-protocol.el15
-rw-r--r--lisp/progmodes/hideif.el11
-rw-r--r--lisp/progmodes/js.el2
4 files changed, 14 insertions, 25 deletions
diff --git a/lisp/allout.el b/lisp/allout.el
index a123ece9b95..242b1f2c87f 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -4351,7 +4351,7 @@ subtopics into siblings of the item."
4351 (let ((children-chart (allout-chart-subtree 1))) 4351 (let ((children-chart (allout-chart-subtree 1)))
4352 (if (listp (car children-chart)) 4352 (if (listp (car children-chart))
4353 ;; whoops: 4353 ;; whoops:
4354 (setq children-chart (allout-flatten children-chart))) 4354 (setq children-chart (flatten-tree children-chart)))
4355 (save-excursion 4355 (save-excursion
4356 (dolist (child-point children-chart) 4356 (dolist (child-point children-chart)
4357 (goto-char child-point) 4357 (goto-char child-point)
@@ -6547,14 +6547,7 @@ If BEG is bigger than END we return 0."
6547 (apply 'concat 6547 (apply 'concat
6548 (mapcar (lambda (char) (if (= char ?%) "%%" (char-to-string char))) 6548 (mapcar (lambda (char) (if (= char ?%) "%%" (char-to-string char)))
6549 string))) 6549 string)))
6550;;;_ : lists 6550(define-obsolete-function-alias 'allout-flatten #'flatten-tree "27.1")
6551;;;_ > allout-flatten (list)
6552(defun allout-flatten (list)
6553 "Return a list of all atoms in list."
6554 ;; classic.
6555 (cond ((null list) nil)
6556 ((atom (car list)) (cons (car list) (allout-flatten (cdr list))))
6557 (t (append (allout-flatten (car list)) (allout-flatten (cdr list))))))
6558;;;_ : Compatibility: 6551;;;_ : Compatibility:
6559;;;_ : xemacs undo-in-progress provision: 6552;;;_ : xemacs undo-in-progress provision:
6560(unless (boundp 'undo-in-progress) 6553(unless (boundp 'undo-in-progress)
diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el
index 33957ee3269..bb88c2fe1fd 100644
--- a/lisp/org/org-protocol.el
+++ b/lisp/org/org-protocol.el
@@ -349,17 +349,20 @@ returned list."
349 ret) 349 ret)
350 l))) 350 l)))
351 351
352(defun org-protocol-flatten (list) 352(if (fboundp 'flatten-tree)
353 "Transform LIST into a flat list. 353 (defalias 'org-protocol-flatten 'flatten-tree)
354 (defun org-protocol-flatten (list)
355 "Transform LIST into a flat list.
354 356
355Greedy handlers might receive a list like this from emacsclient: 357Greedy handlers might receive a list like this from emacsclient:
356\((\"/dir/org-protocol:/greedy:/~/path1\" (23 . 12)) (\"/dir/param\")) 358\((\"/dir/org-protocol:/greedy:/~/path1\" (23 . 12)) (\"/dir/param\"))
357where \"/dir/\" is the absolute path to emacsclients working directory. 359where \"/dir/\" is the absolute path to emacsclients working directory.
358This function transforms it into a flat list." 360This function transforms it into a flat list."
359 (if (null list) () 361 (if (null list) ()
360 (if (listp list) 362 (if (listp list)
361 (append (org-protocol-flatten (car list)) (org-protocol-flatten (cdr list))) 363 (append (org-protocol-flatten (car list))
362 (list list)))) 364 (org-protocol-flatten (cdr list)))
365 (list list)))))
363 366
364(defun org-protocol-parse-parameters (info &optional new-style default-order) 367(defun org-protocol-parse-parameters (info &optional new-style default-order)
365 "Return a property list of parameters from INFO. 368 "Return a property list of parameters from INFO.
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el
index 62e8c453389..84cbb6e6d17 100644
--- a/lisp/progmodes/hideif.el
+++ b/lisp/progmodes/hideif.el
@@ -672,12 +672,7 @@ that form should be displayed.")
672 result)) 672 result))
673 (nreverse result))) 673 (nreverse result)))
674 674
675(defun hif-flatten (l) 675(define-obsolete-function-alias 'hif-flatten #'flatten-tree "27.1")
676 "Flatten a tree."
677 (apply #'nconc
678 (mapcar (lambda (x) (if (listp x)
679 (hif-flatten x)
680 (list x))) l)))
681 676
682(defun hif-expand-token-list (tokens &optional macroname expand_list) 677(defun hif-expand-token-list (tokens &optional macroname expand_list)
683 "Perform expansion on TOKENS till everything expanded. 678 "Perform expansion on TOKENS till everything expanded.
@@ -748,7 +743,7 @@ detecting self-reference."
748 743
749 expanded)) 744 expanded))
750 745
751 (hif-flatten (nreverse expanded))))) 746 (flatten-tree (nreverse expanded)))))
752 747
753(defun hif-parse-exp (token-list &optional macroname) 748(defun hif-parse-exp (token-list &optional macroname)
754 "Parse the TOKEN-LIST. 749 "Parse the TOKEN-LIST.
@@ -1166,7 +1161,7 @@ preprocessing token"
1166 (setq actual-parms (cdr actual-parms))) 1161 (setq actual-parms (cdr actual-parms)))
1167 1162
1168 ;; Replacement completed, flatten the whole token list 1163 ;; Replacement completed, flatten the whole token list
1169 (setq macro-body (hif-flatten macro-body)) 1164 (setq macro-body (flatten-tree macro-body))
1170 1165
1171 ;; Stringification and token concatenation happens here 1166 ;; Stringification and token concatenation happens here
1172 (hif-token-concatenation (hif-token-stringification macro-body))))) 1167 (hif-token-concatenation (hif-token-stringification macro-body)))))
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index ddba7636b4a..11ccb5fc527 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -623,8 +623,6 @@ then the \".\"s will be lined up:
623 "Parse state at `js--last-parse-pos'.") 623 "Parse state at `js--last-parse-pos'.")
624(make-variable-buffer-local 'js--state-at-last-parse-pos) 624(make-variable-buffer-local 'js--state-at-last-parse-pos)
625 625
626(define-obsolete-function-alias 'js--flatten-list #'flatten-tree "27.1")
627
628(defun js--maybe-join (prefix separator suffix &rest list) 626(defun js--maybe-join (prefix separator suffix &rest list)
629 "Helper function for `js--update-quick-match-re'. 627 "Helper function for `js--update-quick-match-re'.
630If LIST contains any element that is not nil, return its non-nil 628If LIST contains any element that is not nil, return its non-nil