-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #262 from minad/dump-compat-symbols
Add tools/compat-dump.el which generates data/compat-symbols
- Loading branch information
Showing
3 changed files
with
37 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
((file-has-changed-p--hash-table set-transient-map-timer set-transient-map-timeout lisp-directory color-luminance-dark-limit read-answer-short read-char-from-minibuffer-map-hash read-char-from-minibuffer-map read-char-history major-mode--suspended regexp-unmatchable mouse-select-region-move-to-beginning mounted-file-systems gensym-counter text-quoting-style) ert-with-temp-directory ert-with-temp-file cl-once-only cl-with-gensyms cl-constantly count-sentences read-multiple-choice buttonize-region buttonize button--properties substitute-quotes define-key defvar-keymap define-keymap keymap-global-lookup keymap-local-lookup keymap-lookup keymap-set-after keymap-substitute keymap-local-unset keymap-global-unset keymap-local-set keymap-global-set keymap-unset keymap-set key-parse keymap--check key-valid-p file-has-changed-p file-name-parent-directory file-attribute-file-identifier file-name-split directory-abbrev-apply directory-abbrev-make-regexp while-let add-display-text-property with-buffer-unmodified-if-unchanged get-scratch-buffer-create use-region-end use-region-beginning use-region-noncontiguous-p char-uppercase-p set-transient-map match-buffers buffer-match-p function-alias-p compiled-function-p string-split with-memoization without-restriction with-restriction delete-line plistp list-of-strings-p buffer-local-set-state buffer-local-set-state--get buffer-local-restore-state readablep string-lines funcall-with-delayed-message with-delayed-message pos-eol pos-bol plist-member plist-put plist-get string-equal-ignore-case take ntake get-display-property window-configuration-equal-p button-buttonize text-quoting-style decoded-time-period with-environment-variables macroexp-file-name macroexp-warn-and-return mark-thing-at-mouse bounds-of-thing-at-mouse thing-at-mouse count-windows with-window-non-dedicated color-dark-p format-prompt make-lock-file-name file-backup-file-names file-modes-number-to-symbolic directory-empty-p file-name-with-extension named-let string-chop-newline string-pad string-fill string-clean-whitespace subr-native-elisp-p subr-primitive-p ensure-list dlet with-existing-directory buffer-local-boundp replace-regexp-in-region replace-string-in-region insert-into-buffer always string-replace process-lines-ignore-status process-lines-handling-status make-separator-line color-values-from-color-spec directory-files-and-attributes directory-files string-width garbage-collect-maybe file-name-concat length> length< length= string-search native-comp-available-p read-answer ring-resize text-property-search-backward text-property-search-forward date-ordinal-to-time date-days-in-month make-decoded-time package-get-version regexp-opt make-empty-file executable-find exec-path file-size-human-readable-iec file-size-human-readable file-name-unquote file-name-quote file-name-quoted-p image--set-property with-suppressed-warnings with-minibuffer-selected-window minibuffer-history-value read-char-from-minibuffer read-char-from-minibuffer-insert-other read-char-from-minibuffer-insert-char major-mode-restore major-mode-suspend assoc-delete-all xor flatten-tree dolist-with-progress-reporter ignore-error setq-local bignump fixnump time-equal-p lookup-key recenter string-distance proper-list-p read-multiple-choice image-property file-attribute-collect file-attribute-device-number file-attribute-inode-number file-attribute-modes file-attribute-size file-attribute-status-change-time file-attribute-modification-time file-attribute-access-time file-attribute-group-id file-attribute-user-id file-attribute-link-number file-attribute-type make-nearby-temp-file make-temp-file temporary-file-directory file-local-name and-let* when-let* if-let* gensym cddddr cdddar cddadr cddaar cdaddr cdadar cdaadr cdaaar cadddr caddar cadadr cadaar caaddr caadar caaadr caaaar cdddr cddar cdadr cdaar caddr cadar caadr caaar string-trim string-trim-right string-trim-left alist-get assoc provided-mode-derived-p region-bounds line-number-at-pos mapcan buffer-hash macroexpand-1 macroexp-quote macroexp-parse-body thread-last thread-first hash-table-empty-p when-let if-let with-file-modes string-greaterp region-noncontiguous-p save-mark-and-excursion directory-name-p format-message sort bool-vector) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env -S emacs -Q --script | ||
(unless (string-suffix-p "/package-lint/" default-directory) | ||
(error "Not in the package-lint directory")) | ||
(let (symbols functions) | ||
(dolist (file (directory-files "../compat/" t "compat-[0-9]+\\.el$")) | ||
(with-temp-buffer | ||
(insert-file-contents file) | ||
(goto-char (point-min)) | ||
(while (search-forward-regexp (rx line-start | ||
"(compat-" (group (or "defun" "defmacro" "defvar" "defalias")) | ||
(+ space) | ||
symbol-start | ||
(group (+? any)) | ||
symbol-end) | ||
nil t) | ||
(pcase (match-string 1) | ||
("defvar" (push (intern (match-string 2)) symbols)) | ||
((or "defun" "defmacro" "defalias") (push (intern (match-string 2)) functions)))))) | ||
(with-temp-buffer | ||
(insert (prin1-to-string (cons symbols functions))) | ||
(write-region (point-min) (point-max) "data/compat-symbols" nil 'quiet))) |