Break compat with emacs version < 20#4
Open
Boruch-Baum wants to merge 9 commits intozedinosaur:masterfrom
Open
Break compat with emacs version < 20#4Boruch-Baum wants to merge 9 commits intozedinosaur:masterfrom
Boruch-Baum wants to merge 9 commits intozedinosaur:masterfrom
Conversation
Byte compiling the file in emacs25 generated a number of warnings, most due the use of obsolete functions, one due to use of an obsolete library, and one due to a face being used as a variable. One of the warnings, about the use function `toggle-read-only', I wasn't sure how to solve because I wasn't sure what the function was exactly doing. Here are the compile warnings: post.el:275:1:Warning: cl package required at runtime In post-font-lock-syntactic-face-function: post.el:675:1:Warning: reference to free variable ‘post-signature-text-face’ In post-el-random-signature: post.el:868:13:Warning: Use ‘with-current-buffer’ rather than save-excursion+set-buffer post.el:855:20:Warning: ‘insert-file’ is for interactive use only; use ‘insert-file-contents’ instead. post.el:856:20:Warning: ‘beginning-of-buffer’ is for interactive use only; use ‘(goto-char (point-min))’ instead. In post-select-signature-from-file: post.el:882:4:Warning: ‘insert-file’ is for interactive use only; use ‘insert-file-contents’ instead. In post-select-signature-from-dir: post.el:926:18:Warning: ‘toggle-read-only’ is an obsolete function (as of 24.3); use ‘read-only-mode’ instead. In post-select-signature-select-sig-from-dir: post.el:941:17:Warning: ‘insert-file’ is for interactive use only; use ‘insert-file-contents’ instead. In post-mode: post.el:1123:9:Warning: ‘flet’ is an obsolete macro (as of 24.3); use either ‘cl-flet’ or ‘cl-letf’. post.el:1137:7:Warning: ‘not-modified’ is for interactive use only; use ‘set-buffer-modified-p’ instead. In header-references-length: post.el:1326:66:Warning: ‘interactive-p’ is an obsolete function (as of 23.2); use ‘called-interactively-p’ instead.
1] Set the signature select buffer to read-only mode also in function `post-select-signature-from-file' 2] Replace use of the obsolete function `toggle-read-only' with function `read-only-mode'
evaluation of exit function needs to be made at runtime
Move history data from post.el file
+ purpose was to maintain compatibility with emacs version < 20.xx. + was only used once in the package + replaced with underlying function `read-string`
+ breaks compatibility with emacs version < 20 + defgroup, defcustom, defface + buffer-substring-no-properties
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.