From 043e3010b54ebc98de53e0cae42d832eb221801e7c34e0e37bb4d5ca268874c4 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 22 Oct 2018 13:58:30 +0000 Subject: [PATCH 1/3] Help ispell(.el) to find and provide the usable dictionaries even for hunspell (boo#1110387) OBS-URL: https://build.opensuse.org/package/show/editors/emacs?expand=0&rev=262 --- emacs-26.1.dif | 30 ++++++++++++++++++++++++++---- emacs.changes | 6 ++++++ 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/emacs-26.1.dif b/emacs-26.1.dif index 8183017..038ef73 100644 --- a/emacs-26.1.dif +++ b/emacs-26.1.dif @@ -11,13 +11,13 @@ lisp/net/ange-ftp.el | 8 +-- lisp/site-load.el | 41 ++++++++++++++++ lisp/speedbar.el | 1 - lisp/textmodes/ispell.el | 60 +++++++++++++++++++++++- + lisp/textmodes/ispell.el | 82 ++++++++++++++++++++++++++++++++- site-lisp/term/func-keys.el | 33 +++++++++++++ site-lisp/term/gnome.el | 97 ++++++++++++++++++++++++++++++++++++++++ site-lisp/term/kvt.el | 97 ++++++++++++++++++++++++++++++++++++++++ site-lisp/term/linux.el | 79 ++++++++++++++++++++++++++++++++ site-lisp/term/locale.el | 13 +++++ - 18 files changed, 449 insertions(+), 32 deletions(-) + 18 files changed, 471 insertions(+), 32 deletions(-) --- Makefile.in +++ Makefile.in 2018-05-29 13:07:53.479965338 +0000 @@ -346,7 +346,7 @@ "Program invoked by \\[ispell-word] and \\[ispell-region] commands." :type 'string :set (lambda (symbol value) -@@ -1414,6 +1416,56 @@ The variable `ispell-library-directory' +@@ -1414,6 +1416,78 @@ The variable `ispell-library-directory' (if ispell-menu-map-needed (progn (setq ispell-menu-map (make-sparse-keymap "Spell")) @@ -398,7 +398,29 @@ + (define-key ispell-menu-map (vector (intern name)) + (cons (concat "Select " (capitalize name) " Dict") + (list 'lambda () '(interactive) -+ (list 'ispell-change-dictionary name))))))))))) ++ (list 'ispell-change-dictionary name))))))))) ++ (if (and (functionp 'ispell-find-hunspell-dictionaries) ++ (symbolp 'ispell-program-name) ++ (string-match "hunspell" ispell-program-name)) ++ (progn ++ (ispell-find-hunspell-dictionaries) ++ (let ((dicts (reverse (cons (cons "default" nil) ++ (append ispell-local-dictionary-alist ispell-hunspell-dictionary-alist)))) ++ name load-dict) ++ (dolist (dict dicts) ++ (setq name (car dict)) ++ (cond ((not (stringp name)) ++ (define-key ispell-menu-map (vector 'default) ++ (cons "Select Default Dict" ++ (cons "Dictionary for which Hunspell was configured" ++ (list 'lambda () '(interactive) ++ (list 'ispell-change-dictionary "default")))))) ++ ((stringp name) ++ (define-key ispell-menu-map (vector (intern name)) ++ (cons (concat "Select " (capitalize name) " Dict") ++ (list 'lambda () '(interactive) ++ (list 'ispell-change-dictionary name) ++ ))))))))))) + ;; End adding list for ispell dictonaries installed on SuSE (define-key ispell-menu-map [ispell-change-dictionary] `(menu-item ,(purecopy "Change Dictionary...") ispell-change-dictionary diff --git a/emacs.changes b/emacs.changes index 5d784d3..f54b939 100644 --- a/emacs.changes +++ b/emacs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 22 13:56:16 UTC 2018 - Dr. Werner Fink + +- Help ispell(.el) to find and provide the usable dictionaries + even for hunspell (boo#1110387) + ------------------------------------------------------------------- Fri Jul 20 09:33:08 UTC 2018 - werner@suse.de From b142f47efefdf33effe4ace93e08db9f30f0d410b5255dd084aafd28c4db13fa Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 23 Oct 2018 06:39:02 +0000 Subject: [PATCH 2/3] Let site-start.el also work for hunspell (boo#1110387) OBS-URL: https://build.opensuse.org/package/show/editors/emacs?expand=0&rev=263 --- emacs.changes | 6 ++++++ site-lisp.tar.bz2 | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/emacs.changes b/emacs.changes index f54b939..b368b18 100644 --- a/emacs.changes +++ b/emacs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 23 06:37:33 UTC 2018 - Dr. Werner Fink + +- Let site-start.el also seek for hunspell to load the ispell + lisp library (boo#1110387) + ------------------------------------------------------------------- Mon Oct 22 13:56:16 UTC 2018 - Dr. Werner Fink diff --git a/site-lisp.tar.bz2 b/site-lisp.tar.bz2 index bc90f63..14b1d43 100644 --- a/site-lisp.tar.bz2 +++ b/site-lisp.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:573745709c98d3a20e5805fbde9f52ae57528eb74b9966434c0a0c369fe50b6a -size 51723 +oid sha256:a1d2ebbc40bd8a9d89fdf72ceb92465087fc803567c65259bd884cfa33c11dbc +size 51806 From aff8e914a14b07507d54f361cae3cc1ac370040daa306fe8dff647f95e195282 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 23 Oct 2018 08:27:54 +0000 Subject: [PATCH 3/3] type error strinp on nil OBS-URL: https://build.opensuse.org/package/show/editors/emacs?expand=0&rev=264 --- emacs-26.1.dif | 16 +++++++++++++--- emacs.changes | 7 +++++++ emacs.spec | 2 +- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/emacs-26.1.dif b/emacs-26.1.dif index 038ef73..7c89576 100644 --- a/emacs-26.1.dif +++ b/emacs-26.1.dif @@ -11,13 +11,13 @@ lisp/net/ange-ftp.el | 8 +-- lisp/site-load.el | 41 ++++++++++++++++ lisp/speedbar.el | 1 - lisp/textmodes/ispell.el | 82 ++++++++++++++++++++++++++++++++- + lisp/textmodes/ispell.el | 85 ++++++++++++++++++++++++++++++++--- site-lisp/term/func-keys.el | 33 +++++++++++++ site-lisp/term/gnome.el | 97 ++++++++++++++++++++++++++++++++++++++++ site-lisp/term/kvt.el | 97 ++++++++++++++++++++++++++++++++++++++++ site-lisp/term/linux.el | 79 ++++++++++++++++++++++++++++++++ site-lisp/term/locale.el | 13 +++++ - 18 files changed, 471 insertions(+), 32 deletions(-) + 18 files changed, 473 insertions(+), 33 deletions(-) --- Makefile.in +++ Makefile.in 2018-05-29 13:07:53.479965338 +0000 @@ -346,7 +346,17 @@ "Program invoked by \\[ispell-word] and \\[ispell-region] commands." :type 'string :set (lambda (symbol value) -@@ -1414,6 +1416,78 @@ The variable `ispell-library-directory' +@@ -1179,7 +1181,8 @@ dictionary from that list was found." + (setq hunspell-default-dict (or hunspell-multi-dict + (car hunspell-default-dict))) + (setq hunspell-default-dict-entry +- (ispell-parse-hunspell-affix-file hunspell-default-dict)) ++ (if hunspell-default-dict ++ (ispell-parse-hunspell-affix-file hunspell-default-dict) nil)) + ;; Create an alist of found dicts with only names, except for default dict. + (setq ispell-hunspell-dictionary-alist + (list (cons nil (cdr hunspell-default-dict-entry)))) +@@ -1414,6 +1417,78 @@ The variable `ispell-library-directory' (if ispell-menu-map-needed (progn (setq ispell-menu-map (make-sparse-keymap "Spell")) diff --git a/emacs.changes b/emacs.changes index b368b18..14c8d2f 100644 --- a/emacs.changes +++ b/emacs.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Oct 23 08:25:39 UTC 2018 - Dr. Werner Fink + +- Let ispell.el perform even on older systems without default + hunspell dictionary as otherwise this leades to wrong type + error as nil is not a pointer to a string + ------------------------------------------------------------------- Tue Oct 23 06:37:33 UTC 2018 - Dr. Werner Fink diff --git a/emacs.spec b/emacs.spec index 5019985..3f2efe3 100644 --- a/emacs.spec +++ b/emacs.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ #