Skip to content

Break compat with emacs version < 20#4

Open
Boruch-Baum wants to merge 9 commits intozedinosaur:masterfrom
Boruch-Baum:break-compat-with-emacs-version-<-20
Open

Break compat with emacs version < 20#4
Boruch-Baum wants to merge 9 commits intozedinosaur:masterfrom
Boruch-Baum:break-compat-with-emacs-version-<-20

Conversation

@Boruch-Baum
Copy link

No description provided.

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
+ 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant