Просмотр исходного кода

Merge branch 'stretch' of https://github.com/bashrc/freedombone

Bob Mottram 7 лет назад
Родитель
Сommit
50f29ef374
1 измененных файлов: 57 добавлений и 2 удалений
  1. 57
    2
      src/freedombone-app-emacs

+ 57
- 2
src/freedombone-app-emacs Просмотреть файл

@@ -34,7 +34,8 @@ IN_DEFAULT_INSTALL=1
34 34
 SHOW_ON_ABOUT=0
35 35
 
36 36
 emacs_variables=(USB_MOUNT
37
-                 MY_USERNAME)
37
+                 MY_USERNAME
38
+                 DEFAULT_LANGUAGE)
38 39
 
39 40
 function logging_on_emacs {
40 41
     echo -n ''
@@ -164,7 +165,7 @@ function remove_emacs {
164 165
 }
165 166
 
166 167
 function install_emacs {
167
-    apt-get -yq install emacs
168
+    apt-get -yq install emacs ispell ibritish ifrench ispanish iitalian irussian iswedish inorwegian iirish ingerman iswiss iogerman idutch idanish ibrazilian ibulgarian ipolish iczech iestonian ilithuanian iukrainian icatalan
168 169
     update-alternatives --set editor /usr/bin/emacs
169 170
 
170 171
     # A minimal emacs configuration
@@ -274,6 +275,60 @@ function install_emacs {
274 275
                     echo "(dolist (hook '(text-mode-hook))" >> /home/$USERNAME/.emacs-mutt
275 276
                     echo '    (add-hook hook (lambda () (flyspell-mode 1))))' >> /home/$USERNAME/.emacs-mutt
276 277
                     echo '(setq-default fill-column 72)' >> /home/$USERNAME/.emacs-mutt
278
+                    if [[ $DEFAULT_LANGUAGE == 'en_US'* ]]; then
279
+                        echo '(setq ispell-dictionary "american")' >> /home/$USERNAME/.emacs-mutt
280
+                    fi
281
+                    if [[ $DEFAULT_LANGUAGE == 'en_GB'* ]]; then
282
+                        echo '(setq ispell-dictionary "british")' >> /home/$USERNAME/.emacs-mutt
283
+                    fi
284
+                    if [[ $DEFAULT_LANGUAGE == 'fr_FR'* ]]; then
285
+                        echo '(setq ispell-dictionary "french")' >> /home/$USERNAME/.emacs-mutt
286
+                    fi
287
+                    if [[ $DEFAULT_LANGUAGE == 'it_IT'* ]]; then
288
+                        echo '(setq ispell-dictionary "italian")' >> /home/$USERNAME/.emacs-mutt
289
+                    fi
290
+                    if [[ $DEFAULT_LANGUAGE == 'cs_CZ'* ]]; then
291
+                        echo '(setq ispell-dictionary "czech")' >> /home/$USERNAME/.emacs-mutt
292
+                    fi
293
+                    if [[ $DEFAULT_LANGUAGE == 'da_DK'* ]]; then
294
+                        echo '(setq ispell-dictionary "danish")' >> /home/$USERNAME/.emacs-mutt
295
+                    fi
296
+                    if [[ $DEFAULT_LANGUAGE == 'nl_NL'* ]]; then
297
+                        echo '(setq ispell-dictionary "dutch")' >> /home/$USERNAME/.emacs-mutt
298
+                    fi
299
+                    if [[ $DEFAULT_LANGUAGE == 'ru_RU'* ]]; then
300
+                        echo '(setq ispell-dictionary "russian")' >> /home/$USERNAME/.emacs-mutt
301
+                    fi
302
+                    if [[ $DEFAULT_LANGUAGE == 'es_ES'* ]]; then
303
+                        echo '(setq ispell-dictionary "spanish")' >> /home/$USERNAME/.emacs-mutt
304
+                    fi
305
+                    if [[ $DEFAULT_LANGUAGE == 'sv_SE'* ]]; then
306
+                        echo '(setq ispell-dictionary "swedish")' >> /home/$USERNAME/.emacs-mutt
307
+                    fi
308
+                    if [[ $DEFAULT_LANGUAGE == 'no_NO'* ]]; then
309
+                        echo '(setq ispell-dictionary "norwegian")' >> /home/$USERNAME/.emacs-mutt
310
+                    fi
311
+                    if [[ $DEFAULT_LANGUAGE == 'de_DE'* ]]; then
312
+                        echo '(setq ispell-dictionary "ngerman")' >> /home/$USERNAME/.emacs-mutt
313
+                    fi
314
+                    if [[ $DEFAULT_LANGUAGE == 'bg_BG'* ]]; then
315
+                        echo '(setq ispell-dictionary "bulgarian")' >> /home/$USERNAME/.emacs-mutt
316
+                    fi
317
+                    if [[ $DEFAULT_LANGUAGE == 'pl'* ]]; then
318
+                        echo '(setq ispell-dictionary "polish")' >> /home/$USERNAME/.emacs-mutt
319
+                    fi
320
+                    if [[ $DEFAULT_LANGUAGE == 'et_EE'* ]]; then
321
+                        echo '(setq ispell-dictionary "estonian")' >> /home/$USERNAME/.emacs-mutt
322
+                    fi
323
+                    if [[ $DEFAULT_LANGUAGE == 'lt_LT'* ]]; then
324
+                        echo '(setq ispell-dictionary "lithuanian")' >> /home/$USERNAME/.emacs-mutt
325
+                    fi
326
+                    if [[ $DEFAULT_LANGUAGE == 'uk_UA'* ]]; then
327
+                        echo '(setq ispell-dictionary "ukranian")' >> /home/$USERNAME/.emacs-mutt
328
+                    fi
329
+                    if [[ $DEFAULT_LANGUAGE == 'ca_ES'* ]]; then
330
+                        echo '(setq ispell-dictionary "catalan")' >> /home/$USERNAME/.emacs-mutt
331
+                    fi
277 332
                     echo '(setq auto-fill-mode 0)' >> /home/$USERNAME/.emacs-mutt
278 333
                     echo "(add-hook 'text-mode-hook 'turn-on-auto-fill)" >> /home/$USERNAME/.emacs-mutt
279 334
                     echo "(setq-default auto-fill-function 'do-auto-fill)" >> /home/$USERNAME/.emacs-mutt