Hi,
the recent update to emacs 27.1 gave me some headaches.
Starting emacs FILE, the warning 'Package cl is depricated' popped up
and did not open FILE.
To make it short:
Emacs started with path /usr/share/emacs/27.1/site-lisp in mind.
Then it did not find a proper file and continued to look at
/usr/share/emacs/site-lisp
further ignoring path /usr/share/emacs/27.1/site-lisp for any further
file lookup.
Moving /usr/share/emacs/site-lisp out of the way did resolve some quirks.
This note is just in case you run into this message "Package cl is
depricated".
Back to gnu apl emacs:
My .emacs includes
;; apl mode
(add-to-list 'load-path "/TOP_LVL_PATH/gnu-apl-mode")
(require 'gnu-apl-mode)
Which results in "Package cl is depricated" (too).
Further digging led to (include 'cl) which has to be replaced by
(include 'cl-lib).
Then subsequent errors popped up: loop, second, ... were not available
any more.
They need to be replaced by cl-loop, cl-second, .
The attachment has the patch file.
I hope it helps.
Best Regards,
Hans-Peter
Nur in gnu-apl-mode: .apl.history.
Nur in gnu-apl-mode: .git.
diff -u gnu-apl-mode-master/gnu-apl-documentation.el
gnu-apl-mode/gnu-apl-documentation.el
--- gnu-apl-mode-master/gnu-apl-documentation.el2020-01-08
17:33:17.0 +0100
+++ gnu-apl-mode/gnu-apl-documentation.el 2020-09-02 15:14:26.086912730
+0200
@@ -4,7 +4,7 @@
;;; Keymap buffer
;;;
-(require 'cl)
+(require 'cl-lib)
(require 'gnu-apl-util)
(require 'gnu-apl-network)
@@ -86,13 +86,13 @@
(let ((header (car content))
(lines (cdr content)))
(list header
- (loop for row in lines
+ (cl-loop for row in lines
for trim-row = (gnu-apl--trim-spaces row)
while (and (>= (length trim-row) 2) (string= (subseq
trim-row 0 2) "⍝⍝"))
collect (gnu-apl--remove-leading-space (subseq trim-row
2
(defun gnu-apl--get-doc-for-symbol (string)
- (loop for e in gnu-apl--symbol-doc
+ (cl-loop for e in gnu-apl--symbol-doc
for name = (car e)
when (or (and (stringp name)
(string= string name))
@@ -107,13 +107,13 @@
(if full-text-p "\n%s\n\n" "\n%s\n")))
(when doc
(with-temp-buffer
-(loop for e in (second doc)
+(cl-loop for e in (cl-second doc)
for first = t then nil
unless first
do (insert "\n")
do (progn
- (insert (format "%s: %s" (first e) (second e)))
- (insert (format format-short (third e)))
+ (insert (format "%s: %s" (first e) (cl-second e)))
+ (insert (format format-short (cl-third e)))
(let ((long (fourth e)))
(when long
(insert (format "%s\n" long)
@@ -133,7 +133,7 @@
(when content
(with-temp-buffer
(insert (format "Function: %s\n\n"
(gnu-apl--remove-local-variable-name (car content
-(loop for row in (cadr content)
+(cl-loop for row in (cadr content)
for first = t then nil
unless first do (insert "\n")
do (insert row))
@@ -166,13 +166,13 @@
(defun gnu-apl--name-at-point ()
(let ((symbol-chars "[a-zA-Z0-9_∆⍙¯]"))
(if (looking-at symbol-chars)
-(buffer-substring (save-excursion (loop while (and (> (point)
(point-min))
+(buffer-substring (save-excursion (cl-loop while (and (> (point)
(point-min))
(string-match
symbol-chars
(buffer-substring (1- (point))
(point
do (backward-char 1)
finally (return (point
- (save-excursion (loop while (< (point) (point-max))
+ (save-excursion (cl-loop while (< (point)
(point-max))
do (forward-char 1)
while (looking-at symbol-chars)
finally (return (point)
@@ -180,7 +180,7 @@
(when (and ch
(member (char-to-string ch)
(mapcan #'(lambda (v) (let ((m (car v)))
- (if (listp m) (copy-seq m)
(list m
+ (if (listp m) (cl-copy-seq
m) (list m
gnu-apl--symbol-doc)))
(char-to-string ch))
@@ -303,7 +303,7 @@
(let* ((key (match-string 1))
(found (cl-find key gnu-apl--symbols :key #'third :test
#