diff options
| author | Paul Eggert | 2018-12-17 10:19:23 -0800 |
|---|---|---|
| committer | Paul Eggert | 2018-12-17 10:26:15 -0800 |
| commit | ef144113f3473f39d3df3e96e780c832e0d5420e (patch) | |
| tree | 4dcdfeb3a0d55a6f891983f9e59b9f5d1b3f5378 /lisp/progmodes | |
| parent | a5995a326d1dad9bccf1ad7eb96e4e8146f6dcbe (diff) | |
| download | emacs-ef144113f3473f39d3df3e96e780c832e0d5420e.tar.gz emacs-ef144113f3473f39d3df3e96e780c832e0d5420e.zip | |
Some more flatten-tree aliases
* lisp/allout.el (allout-flatten):
* lisp/progmodes/hideif.el (hif-flatten):
Now an obsolete alias for flatten-tree. All callers changed.
* lisp/org/org-protocol.el (org-protocol-flatten):
Make it an alias for flatten-tree if available.
* lisp/progmodes/js.el (js--flatten-list):
Remove alias. We shouldn’t need obsolete function aliases for
private functions.
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/hideif.el | 11 | ||||
| -rw-r--r-- | lisp/progmodes/js.el | 2 |
2 files changed, 3 insertions, 10 deletions
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'. |
| 630 | If LIST contains any element that is not nil, return its non-nil | 628 | If LIST contains any element that is not nil, return its non-nil |