Commit 0bf36cbf authored by David Byers's avatar David Byers
Browse files

Hopefully fixed menus in all emacs versions.

Allow emacs 22.1 to follow links on mouse-1
parent 3c6f9e2a
2007-06-09 <David Byers@GULAG>
* language.el (lyskom-language-keymap-internal): Let Emacs 22.1
follow links with mouse-1.
* filter.el (lyskom-copy-filter): Renamed from copy-filter.
(lyskom-filter-p): Renamed from filter-p.
(lyskom-make-filter): Renamed from make-filter.
* lyskom-rest.el (kom-backward-text): Renamed backward-text to
kom-backward-text. Renamed forward-text to kom-forward-text.
(lyskom-silent-read): Renamed silent-read to lyskom-silent-read.
* parse.el: Renamed apply-parser lyskom-apply-parser.
* review.el: Replaced all calls to nfirst with lyskom-nfirst.
* lyskom-rest.el (lyskom-startup-check-recommended-memberships):
Use lyskom-filter-list, not filter-list.
* faqs.el (lyskom-get-unread-faqs): Same.
* completing-read.el (lyskom-read-conf-guess-initial): Same.
* utilities.el (lyskom-filter-list): Renamed from filter-list.
(lyskom-nfirst): Renamed from nfirst.
Fix menu display in Gnu Emacs 22.1:
* menus.el (lyskom-define-menu-gnu-title-encoding-type): New
variable used to encode top-level menu titles differently from
nested menus.
* language.el (lyskom-get-menu-string): Don't encode the menu
strings here, since encoding needs to be different in different
places.
* menus.el (lyskom-menu-encoding-rules): New variable.
(lyskom-menu-encode): New function.
(lyskom-define-menu-xemacs): Encode menu strings.
(lyskom-define-menu-gnu): Encode menu strings.
2007-06-08 <David Byers@TAMIZDAT> 2007-06-08 <David Byers@TAMIZDAT>
Compatibility fixes for Gnu Emacs 22.1:
* lyskom-rest.el (lyskom-sentinel): Check that proc is a process * lyskom-rest.el (lyskom-sentinel): Check that proc is a process
before using it as such. Call lyskom-remove-unread-buffer with the before using it as such. Call lyskom-remove-unread-buffer with the
right argument (the buffer, not the process). right argument (the buffer, not the process).
......
...@@ -140,7 +140,7 @@ return non-nil if the item is to be included in the list." ...@@ -140,7 +140,7 @@ return non-nil if the item is to be included in the list."
in ADDED added." in ADDED added."
(let ((new-nos (nconc (mapcar 'aux-item->aux-no deleted) (let ((new-nos (nconc (mapcar 'aux-item->aux-no deleted)
(mapcar 'aux-item->aux-no added)))) (mapcar 'aux-item->aux-no added))))
(nconc (filter-list (lambda (el) (not (memq (aux-item->aux-no el) new-nos))) (nconc (lyskom-filter-list (lambda (el) (not (memq (aux-item->aux-no el) new-nos)))
item-list) item-list)
added))) added)))
......
...@@ -2448,9 +2448,9 @@ person you need either the old password for the person, or have ...@@ -2448,9 +2448,9 @@ person you need either the old password for the person, or have
administrative privileges enabled." administrative privileges enabled."
(interactive) (interactive)
(let ((pers-no (lyskom-read-conf-no 'whos-passwd '(pers) nil nil t)) (let ((pers-no (lyskom-read-conf-no 'whos-passwd '(pers) nil nil t))
(old-pw (silent-read (lyskom-get-string 'old-passwd))) (old-pw (lyskom-silent-read (lyskom-get-string 'old-passwd)))
(new-pw1 (silent-read (lyskom-get-string 'new-passwd))) (new-pw1 (lyskom-silent-read (lyskom-get-string 'new-passwd)))
(new-pw2 (silent-read (lyskom-get-string 'new-passwd-again)))) (new-pw2 (lyskom-silent-read (lyskom-get-string 'new-passwd-again))))
(if (lyskom-string= new-pw1 new-pw2) (if (lyskom-string= new-pw1 new-pw2)
(progn (progn
......
...@@ -267,7 +267,7 @@ See lyskom-read-conf for a description of the parameters." ...@@ -267,7 +267,7 @@ See lyskom-read-conf for a description of the parameters."
(uconf-stat->name (uconf-stat->name
(car (car
(filter-list (lyskom-filter-list
(lambda (uconf-stat) (lambda (uconf-stat)
(and uconf-stat (and uconf-stat
(not (memq nil (not (memq nil
......
...@@ -2873,8 +2873,8 @@ Change privileges for %#1P (%#1p)...") ...@@ -2873,8 +2873,8 @@ Change privileges for %#1P (%#1p)...")
;; Running in) buffer ;; Running in) buffer
(define-key lyskom-en-mode-map (kbd "M-p") 'backward-text) (define-key lyskom-en-mode-map (kbd "M-p") 'kom-backward-text)
(define-key lyskom-en-mode-map (kbd "M-n") 'forward-text) (define-key lyskom-en-mode-map (kbd "M-n") 'kom-forward-text)
(define-key lyskom-en-mode-map (kbd "C-M-p") 'kom-prev-prompt) (define-key lyskom-en-mode-map (kbd "C-M-p") 'kom-prev-prompt)
(define-key lyskom-en-mode-map (kbd "C-M-n") 'kom-next-prompt) (define-key lyskom-en-mode-map (kbd "C-M-n") 'kom-next-prompt)
(define-key lyskom-en-mode-map (kbd "s a") 'kom-save-text) (define-key lyskom-en-mode-map (kbd "s a") 'kom-save-text)
......
...@@ -426,7 +426,7 @@ create a new FAQ." ...@@ -426,7 +426,7 @@ create a new FAQ."
(conf-stat->aux-items conf-stat) (conf-stat->aux-items conf-stat)
(server-info->aux-item-list lyskom-server-info))) (server-info->aux-item-list lyskom-server-info)))
(faq-list (faq-list
(filter-list (lyskom-filter-list
(lambda (faq) (lambda (faq)
(not (lyskom-faq-is-read conf-no faq))) (not (lyskom-faq-is-read conf-no faq)))
(delq nil (delq nil
......
...@@ -43,11 +43,11 @@ ...@@ -43,11 +43,11 @@
(defvar filter-edit-list-start nil) (defvar filter-edit-list-start nil)
(defvar filter-edit-list-end nil) (defvar filter-edit-list-end nil)
(defun copy-filter-list (l) (defun lyskom-copy-filter-list (l)
"Copy the filter list L" "Copy the filter list L"
(cond ((null l) nil) (cond ((null l) nil)
(t (cons (copy-filter (car l)) (t (cons (lyskom-copy-filter (car l))
(copy-filter-list (cdr l)))))) (lyskom-copy-filter-list (cdr l))))))
(defun lyskom-reverse-pairs (l) (defun lyskom-reverse-pairs (l)
"Reverse the pairs in the assoc list L" "Reverse the pairs in the assoc list L"
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
"Return non-nil if FILTER is a valid filter list" "Return non-nil if FILTER is a valid filter list"
(cond ((null filter) t) (cond ((null filter) t)
((not (listp filter)) nil) ((not (listp filter)) nil)
((not (filter-p (car filter))) nil) ((not (lyskom-filter-p (car filter))) nil)
(t (and (lyskom-verify-filter-pattern (t (and (lyskom-verify-filter-pattern
(filter->pattern (car filter))) (filter->pattern (car filter)))
(lyskom-verify-filter-list (cdr filter)))))) (lyskom-verify-filter-list (cdr filter))))))
...@@ -447,7 +447,7 @@ If NEWLINE is non-nil, insert a newline after the header." ...@@ -447,7 +447,7 @@ If NEWLINE is non-nil, insert a newline after the header."
t)) t))
(setq permanent (setq permanent
(lyskom-j-or-n-p (lyskom-get-string 'filter-permanent))) (lyskom-j-or-n-p (lyskom-get-string 'filter-permanent)))
(setq filter (make-filter nil (setq filter (lyskom-make-filter nil
(list (cons 'action (list (cons 'action
(cdr (assoc action rev-actions))) (cdr (assoc action rev-actions)))
(cons 'expire (not permanent))))) (cons 'expire (not permanent)))))
...@@ -759,7 +759,7 @@ If NOERROR is non-nil, return nil instead of signaling an error." ...@@ -759,7 +759,7 @@ If NOERROR is non-nil, return nil instead of signaling an error."
(delete-region filter-edit-list-start filter-edit-list-end) (delete-region filter-edit-list-start filter-edit-list-end)
(goto-char filter-edit-list-start) (goto-char filter-edit-list-start)
(insert "\n") (insert "\n")
(lyskom-format-filter-list (copy-filter-list filter-edit-filter-list)) (lyskom-format-filter-list (lyskom-copy-filter-list filter-edit-filter-list))
(set-marker filter-edit-list-end (point)) (set-marker filter-edit-list-end (point))
(setq filter-edit-change-flag nil) (setq filter-edit-change-flag nil)
(lyskom-filter-edit-beginning-of-list)))) (lyskom-filter-edit-beginning-of-list))))
...@@ -894,7 +894,7 @@ undesired filters and to create complex filters." ...@@ -894,7 +894,7 @@ undesired filters and to create complex filters."
server-name)) server-name))
(setq filter-edit-list-start (point-marker)) (setq filter-edit-list-start (point-marker))
(insert "\n") (insert "\n")
(lyskom-format-filter-list (copy-filter-list filter-edit-filter-list)) (lyskom-format-filter-list (lyskom-copy-filter-list filter-edit-filter-list))
(setq filter-edit-list-end (point-max-marker)) (setq filter-edit-list-end (point-max-marker))
(insert (make-string (1- (window-width)) ?=) (insert (make-string (1- (window-width)) ?=)
(format (lyskom-get-string 'filter-edit-footer)))) (format (lyskom-get-string 'filter-edit-footer))))
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
;;; expire -- When the filter expires. Not used. ;;; expire -- When the filter expires. Not used.
;;; ;;;
(defun make-filter (&optional p a) (defun lyskom-make-filter (&optional p a)
"Creates and returns a filter structure. "Creates and returns a filter structure.
Optional P and A initialize pattern and attributes, respectively." Optional P and A initialize pattern and attributes, respectively."
(lyskom-create-filter p a (lyskom-create-compile-filter-function p))) (lyskom-create-filter p a (lyskom-create-compile-filter-function p)))
...@@ -71,12 +71,12 @@ Optional P and A initialize pattern and attributes, respectively." ...@@ -71,12 +71,12 @@ Optional P and A initialize pattern and attributes, respectively."
(lyskom-create-compile-filter-function (lyskom-create-compile-filter-function
(filter->pattern filter)))) (filter->pattern filter))))
(defun copy-filter (f) (defun lyskom-copy-filter (f)
"Create a copy of the filter F" "Create a copy of the filter F"
(make-filter (copy-tree (filter->pattern f)) (lyskom-make-filter (copy-tree (filter->pattern f))
(copy-tree (filter->attribute-list f)))) (copy-tree (filter->attribute-list f))))
(defun filter-p (f) (defun lyskom-filter-p (f)
"Returns T if f looks like a filter" "Returns T if f looks like a filter"
(and (listp f) (and (listp f)
(eq 'filter (car f)))) (eq 'filter (car f))))
...@@ -469,7 +469,7 @@ To change existing filters, use `kom-filter-edit'." ...@@ -469,7 +469,7 @@ To change existing filters, use `kom-filter-edit'."
(setq perm (lyskom-filter-read-permanent)) (setq perm (lyskom-filter-read-permanent))
(lyskom-add-filter (lyskom-add-filter
(make-filter filter (lyskom-make-filter filter
(list (cons 'action action) (list (cons 'action action)
(cons 'expire (not perm)))))))) (cons 'expire (not perm))))))))
...@@ -498,7 +498,7 @@ To change existing filters, use `kom-filter-edit'." ...@@ -498,7 +498,7 @@ To change existing filters, use `kom-filter-edit'."
(setq action (lyskom-filter-read-action)) (setq action (lyskom-filter-read-action))
(setq permanent (lyskom-filter-read-permanent)) (setq permanent (lyskom-filter-read-permanent))
(lyskom-add-filter (lyskom-add-filter
(make-filter filter (lyskom-make-filter filter
(list (cons 'action action) (list (cons 'action action)
(cons 'expire (not permanent))))))) (cons 'expire (not permanent)))))))
...@@ -514,7 +514,7 @@ To change existing filters, use `kom-filter-edit'." ...@@ -514,7 +514,7 @@ To change existing filters, use `kom-filter-edit'."
(permanent (lyskom-filter-read-permanent))) (permanent (lyskom-filter-read-permanent)))
(cond ((and conf-no (not (zerop conf-no))) (cond ((and conf-no (not (zerop conf-no)))
(lyskom-add-filter (lyskom-add-filter
(make-filter (list (cons 'recipient-no conf-no)) (lyskom-make-filter (list (cons 'recipient-no conf-no))
(list (cons 'action action) (list (cons 'action action)
(cons 'expire (not permanent))))) (cons 'expire (not permanent)))))
)))) ))))
...@@ -592,7 +592,7 @@ This command accepts text number prefix arguments \(see ...@@ -592,7 +592,7 @@ This command accepts text number prefix arguments \(see
(when (string-match "^\\s-*$" lyskom-current-subject) (setq text "")) (when (string-match "^\\s-*$" lyskom-current-subject) (setq text ""))
(lyskom-add-filter (lyskom-add-filter
(make-filter (list (lyskom-make-filter (list
(cons 'subject-re (cons 'subject-re
(concat (if (string-equal text "") "^" "") (concat (if (string-equal text "") "^" "")
"\\([rR][eE]: *\\|[Ff][Ww][Dd]: *\\)*" "\\([rR][eE]: *\\|[Ff][Ww][Dd]: *\\)*"
...@@ -639,7 +639,7 @@ To change existing filters, use `kom-filter-edit'." ...@@ -639,7 +639,7 @@ To change existing filters, use `kom-filter-edit'."
(setq action (lyskom-filter-read-action)) (setq action (lyskom-filter-read-action))
(setq perm (lyskom-filter-read-permanent)) (setq perm (lyskom-filter-read-permanent))
(lyskom-add-filter (lyskom-add-filter
(make-filter filter (lyskom-make-filter filter
(list (cons 'action action) (list (cons 'action action)
(cons 'expire (not perm)))))))) (cons 'expire (not perm))))))))
......
...@@ -103,7 +103,8 @@ sessions." ...@@ -103,7 +103,8 @@ sessions."
;; If the "real" keymap has no value, set it to an empty keymap ;; If the "real" keymap has no value, set it to an empty keymap
(if (eval keymap) (if (eval keymap)
nil nil
(set keymap (make-sparse-keymap))) (set keymap (make-sparse-keymap))
(define-key (symbol-value keymap) [follow-link] 'mouse-face))
;; Add it to the list of keymaps ;; Add it to the list of keymaps
(or (memq keymap lyskom-language-keymaps) (or (memq keymap lyskom-language-keymaps)
(setq lyskom-language-keymaps (setq lyskom-language-keymaps
...@@ -252,11 +253,9 @@ lyskom-define-language." ...@@ -252,11 +253,9 @@ lyskom-define-language."
Looks for the 'lyskom-menu category, or 'lyskom-command Looks for the 'lyskom-menu category, or 'lyskom-command
if 'lyskom-menu is not found." if 'lyskom-menu is not found."
(lyskom-encode-coding-string
(or (lyskom-try-get-string symbol 'lyskom-menu) (or (lyskom-try-get-string symbol 'lyskom-menu)
(lyskom-try-get-string symbol 'lyskom-command) (lyskom-try-get-string symbol 'lyskom-command)
(lyskom-get-string-error 'lyskom-get-menu-string symbol 'lyskom-menu)) (lyskom-get-string-error 'lyskom-get-menu-string symbol 'lyskom-menu)))
'iso-8859-1))
(defun lyskom-define-language (language coding &rest names) (defun lyskom-define-language (language coding &rest names)
(let ((match (assq language lyskom-languages))) (let ((match (assq language lyskom-languages)))
......
...@@ -954,7 +954,7 @@ by PERS-NO" ...@@ -954,7 +954,7 @@ by PERS-NO"
(defun lyskom-startup-check-recommended-memberships () (defun lyskom-startup-check-recommended-memberships ()
"Create invitations for new membership recommendations" "Create invitations for new membership recommendations"
(let ((recommendations (let ((recommendations
(filter-list (lyskom-filter-list
(lambda (rec) (lambda (rec)
(not (lyskom-recommendation-already-rejected (car rec)))) (not (lyskom-recommendation-already-rejected (car rec))))
(mapcar (lambda (aux) (mapcar (lambda (aux)
...@@ -3046,13 +3046,13 @@ A list of pairs means OPTARG will be used as a key to look up the real ...@@ -3046,13 +3046,13 @@ A list of pairs means OPTARG will be used as a key to look up the real
(defun backward-text (&optional arg) (defun kom-backward-text (&optional arg)
"Searches backwards for a text start and recenters with that text at the top." "Searches backwards for a text start and recenters with that text at the top."
(interactive "p") (interactive "p")
(lyskom-prev-area (or arg 1) 'lyskom-text-start t) (lyskom-prev-area (or arg 1) 'lyskom-text-start t)
(beginning-of-line)) (beginning-of-line))
(defun forward-text (&optional arg) (defun kom-forward-text (&optional arg)
"Searches forward for a text start and recenters with that text at the top." "Searches forward for a text start and recenters with that text at the top."
(interactive "p") (interactive "p")
(lyskom-next-area (or arg 1) 'lyskom-text-start t)) (lyskom-next-area (or arg 1) 'lyskom-text-start t))
...@@ -3130,7 +3130,7 @@ See `kom-save-text-body' for an alternative to this command." ...@@ -3130,7 +3130,7 @@ See `kom-save-text-body' for an alternative to this command."
(let ((name nil)) (let ((name nil))
(save-excursion (save-excursion
(while (and arg (> arg 0)) (while (and arg (> arg 0))
(backward-text 1) (kom-backward-text 1)
(if (looking-at "\\([0-9]+\\)\\s-") (if (looking-at "\\([0-9]+\\)\\s-")
(setq list-of-texts (cons (lyskom-string-to-number (match-string 1)) (setq list-of-texts (cons (lyskom-string-to-number (match-string 1))
list-of-texts) list-of-texts)
...@@ -4069,7 +4069,7 @@ Returns the selected alternative (a symbol)" ...@@ -4069,7 +4069,7 @@ Returns the selected alternative (a symbol)"
(elt (assq input-char alts) 2)))) (elt (assq input-char alts) 2))))
(defun impl () (defun lyskom-not-implemented ()
(error "Not implemented")) (error "Not implemented"))
...@@ -4429,12 +4429,12 @@ Other objects are converted correctly." ...@@ -4429,12 +4429,12 @@ Other objects are converted correctly."
;;;; Utility routines. ;;;; Utility routines.
;;; silent-read was ;;; lyskom-silent-read was
;; Written by Lars Willf|r <willfor@lysator.liu.se> ;; Written by Lars Willf|r <willfor@lysator.liu.se>
;; Copyright and copyleft Lars Willf|r. ;; Copyright and copyleft Lars Willf|r.
;; Last modified jun 93 by Linus Tolke ;; Last modified jun 93 by Linus Tolke
(defun silent-read (prompt-str) (defun lyskom-silent-read (prompt-str)
"Read a string in the minibuffer without echoing. "Read a string in the minibuffer without echoing.
One parameter - the prompt string." One parameter - the prompt string."
(interactive "sPrompt string: ") (interactive "sPrompt string: ")
......
...@@ -438,6 +438,38 @@ ...@@ -438,6 +438,38 @@
keymap) keymap)
result) result)
;;; ============================================================
;;; Creating menus
(defvar lyskom-menu-encoding-rules
(lyskom-xemacs-or-gnu
'((title . iso-8859-1)
(item . iso-8859-1)
(keys . iso8859-1))
(cond ((< emacs-major-version 22) '((title . iso-8859-1)
(item . iso-8859-1)
(keys . iso8859-1)))
((boundp 'gtk-version-string) '((title . utf-8)
(item . utf-8)
(keys . utf-8)))
((memq window-system '(win32 mswindows w32)) '((title . utf-8)
(item . nil)
(keys . utf-8)))
(t '((title . iso-8859-1) (item . iso-8859-1) (keys . iso8859-1)))))
"Rules for encoding menu strings")
(defun lyskom-menu-encode (string what)
"Encode a string for use in menus.
STRING is the string to encode
WHAT is one of title, item or keys"
(let ((coding (cdr (assq what lyskom-menu-encoding-rules))))
(cond ((and coding (coding-system-p coding))
(lyskom-encode-coding-string string coding))
((functionp coding)
(funcall coding string))
(t string))))
(defun lyskom-build-menus () (defun lyskom-build-menus ()
"Create menus according to LYSKOM-MENUS" "Create menus according to LYSKOM-MENUS"
(lyskom-xemacs-or-gnu (lyskom-build-menus-xemacs) (lyskom-xemacs-or-gnu (lyskom-build-menus-xemacs)
...@@ -476,7 +508,8 @@ ...@@ -476,7 +508,8 @@
((eq (car menus) 'menu) ; A menu ((eq (car menus) 'menu) ; A menu
(let ((menu-title (car (cdr menus))) (let ((menu-title (car (cdr menus)))
(menu-items (car (cdr (cdr menus))))) (menu-items (car (cdr (cdr menus)))))
(cons (lyskom-get-menu-string menu-title) (cons (lyskom-menu-encode
(lyskom-get-menu-string menu-title) 'title)
(mapcar (mapcar
(lambda (item) (lambda (item)
(let ((type (car item)) (let ((type (car item))
...@@ -500,11 +533,16 @@ ...@@ -500,11 +533,16 @@
(car (cdr (assq symbol specials))) (car (cdr (assq symbol specials)))
" ")))) " "))))
(if shortcut (if shortcut
(vector (lyskom-get-menu-string symbol) (vector (lyskom-menu-encode
(lyskom-get-menu-string symbol)
'item)
symbol symbol
':active t ':active t
':keys shortcut) ':keys (lyskom-menu-encode
(vector (lyskom-get-menu-string symbol) symbol ':active t)))) shortcut 'keys))
(vector (lyskom-menu-encode
(lyskom-get-menu-string symbol)
'item) symbol ':active t))))
((eq type 'hline) ((eq type 'hline)
"--:shadowEtchedIn") "--:shadowEtchedIn")
((eq type 'menu) ((eq type 'menu)
...@@ -514,6 +552,7 @@ ...@@ -514,6 +552,7 @@
(t nil)))) (t nil))))
(defvar lyskom-define-menu-gnu-title-encoding-type 'title)
(defun lyskom-define-menu-gnu (map menus &optional specials) (defun lyskom-define-menu-gnu (map menus &optional specials)
(let ((specials (or specials (let ((specials (or specials
(when (current-local-map) (when (current-local-map)
...@@ -525,8 +564,11 @@ ...@@ -525,8 +564,11 @@
(cond ((eq 'hline type) (cond ((eq 'hline type)
(define-key map (vector (lyskom-gensym)) '("--"))) (define-key map (vector (lyskom-gensym)) '("--")))
((eq 'menu type) ((eq 'menu type)
(let* ((name (lyskom-get-menu-string symbol)) (let* ((name (lyskom-menu-encode
(submap (make-sparse-keymap name))) (lyskom-get-menu-string symbol)
lyskom-define-menu-gnu-title-encoding-type))
(submap (make-sparse-keymap name))
(lyskom-define-menu-gnu-title-encoding-type 'item))
(define-key map (vector symbol) (define-key map (vector symbol)
(cons name submap)) (cons name submap))
(lyskom-define-menu-gnu submap (lyskom-define-menu-gnu submap
...@@ -551,13 +593,13 @@ ...@@ -551,13 +593,13 @@
(car (cdr (assq symbol specials))) (car (cdr (assq symbol specials)))
" ")))) " "))))
(if shortcut (if shortcut
(progn (when (memq window-system '(win32 mswindows w32))
(setq shortcut (lyskom-encode-coding-string shortcut 'iso-8859-1)))
(define-key map (vector symbol) (define-key map (vector symbol)
`(menu-item ,(lyskom-get-menu-string symbol) ,symbol `(menu-item ,(lyskom-menu-encode
:keys ,shortcut))) (lyskom-get-menu-string symbol)
'item) ,symbol
:keys ,(lyskom-menu-encode shortcut 'keys)))
(define-key map (vector symbol) (define-key map (vector symbol)
(cons (lyskom-get-menu-string symbol) symbol))))) (cons (lyskom-menu-encode (lyskom-get-menu-string symbol) 'item) symbol)))))
(t (error "Menu description invalid in lyskom-define-menu"))))))) (t (error "Menu description invalid in lyskom-define-menu")))))))
......
...@@ -1202,7 +1202,7 @@ i.e creates the buffer, sets all markers and pointers." ...@@ -1202,7 +1202,7 @@ i.e creates the buffer, sets all markers and pointers."
(call-info (lyskom-locate-ref-no kom-queue ref-no))) (call-info (lyskom-locate-ref-no kom-queue ref-no)))
(set-buffer lyskom-unparsed-buffer) (set-buffer lyskom-unparsed-buffer)
(if call-info (if call-info
(apply-parser call-info)) (lyskom-apply-parser call-info))
(set-buffer buffer) (set-buffer buffer)
(lyskom-decrease-pending-calls) (lyskom-decrease-pending-calls)
(setq lyskom-pending-calls (setq lyskom-pending-calls
...@@ -1239,7 +1239,7 @@ car is equal to ELT." ...@@ -1239,7 +1239,7 @@ car is equal to ELT."
(cdr head))) (cdr head)))
(defun apply-parser (call-info) (defun lyskom-apply-parser (call-info)
"Try to parse a reply from the server. "Try to parse a reply from the server.
CALL-INFO looks like this: (See lyskom-call-data). CALL-INFO looks like this: (See lyskom-call-data).
('CALL REF-NO PARSER PARSER-DATA HANDLER HANDLER-DATA) ('CALL REF-NO PARSER PARSER-DATA HANDLER HANDLER-DATA)
......
...@@ -652,12 +652,12 @@ Cannot be called from a callback." ...@@ -652,12 +652,12 @@ Cannot be called from a callback."
(if (> num 0) (if (> num 0)
(progn (progn
(setq lyskom-last-review-saved-result-list (setq lyskom-last-review-saved-result-list
(nfirst (- (length result) num) result)) (lyskom-nfirst (- (length result) num) result))
(nthcdr (max 0 (- (length result) num)) result)) (nthcdr (max 0 (- (length result) num)) result))
(progn (progn
(setq lyskom-last-review-saved-result-list (setq lyskom-last-review-saved-result-list
(nthcdr (- num) result)) (nthcdr (- num) result))
(nfirst (- num) result)))))) (lyskom-nfirst (- num) result))))))
...@@ -928,7 +928,7 @@ Args: persno confno num &optional again pstart cstart" ...@@ -928,7 +928,7 @@ Args: persno confno num &optional again pstart cstart"
(if (> num 0) (if (> num 0)
(progn (progn