* cc mode, c offset alist @ 2006-08-29 10:31 Florian Kaufmann 2006-08-29 19:09 ` Do-you Aspell for French? Sébastien Vauban 0 siblings, 1 reply; 10+ messages in thread From: Florian Kaufmann @ 2006-08-29 10:31 UTC (permalink / raw) Hello I'd like to customize c-offset-alist such that I would have the following indentation MyMethod( a, b, c, d ); MyMethod( a, b, c, d ); I tryied the following arglist-intro : + arglist-cont : (c-lineup-gcc-asm-reg 0) arglist-cont-nonempty : (c-lineup-gcc-asm-reg 0) arglist-close : + also arglist-cont : + arglist-cont-nonempty : + But neither did what I liked. Can someone help me? Thank you & Greetings Flo ^ permalink raw reply [flat|nested] 10+ messages in thread
* Do-you Aspell for French? 2006-08-29 10:31 cc mode, c offset alist Florian Kaufmann @ 2006-08-29 19:09 ` Sébastien Vauban 2006-08-29 20:29 ` Michaël Cadilhac [not found] ` <mailman.5961.1156884196.9609.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 10+ messages in thread From: Sébastien Vauban @ 2006-08-29 19:09 UTC (permalink / raw) Hi, I'm getting constant errors with my ispell checking functions with words separated by dashes. For example, "penses-tu" (do you think) is correct and constituted with words that are correct on their own, but the interrogative way is always flagged as erroneous. Do you know what to do? Thanks, seb -- Sébastien Vauban ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Do-you Aspell for French? 2006-08-29 19:09 ` Do-you Aspell for French? Sébastien Vauban @ 2006-08-29 20:29 ` Michaël Cadilhac [not found] ` <mailman.5961.1156884196.9609.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 10+ messages in thread From: Michaël Cadilhac @ 2006-08-29 20:29 UTC (permalink / raw) Cc: help-gnu-emacs [-- Attachment #1.1: Type: text/plain, Size: 925 bytes --] Sébastien Vauban <ewgeocaufsfb@spammotel.com> writes: > Hi, > > I'm getting constant errors with my ispell checking functions > with words separated by dashes. > > For example, "penses-tu" (do you think) is correct and > constituted with words that are correct on their own, but the > interrogative way is always flagged as erroneous. Do you know > what to do? > > Thanks, > seb I use a quick-n-dirty trick for that: (defun ispell-get-otherchars () (replace-regexp-in-string "-" "" (ispell-get-decoded-string 3))) (I didn't use an advice the day I did that, wonder why...) -- | Michaël `Micha' Cadilhac | Would someone please DTRT with this, | | Epita/LRDE Promo 2007 | then ACK? | | http://www.lrde.org/~cadilh_m | -- Richard Stallman | `-- - JID: micha@amessage.be --' - --' [-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --] [-- Attachment #2: Type: text/plain, Size: 152 bytes --] _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <mailman.5961.1156884196.9609.help-gnu-emacs@gnu.org>]
* Re: Do-you Aspell for French? [not found] ` <mailman.5961.1156884196.9609.help-gnu-emacs@gnu.org> @ 2006-08-30 19:44 ` Sébastien Vauban 2006-08-30 20:30 ` Peter Dyballa 0 siblings, 1 reply; 10+ messages in thread From: Sébastien Vauban @ 2006-08-30 19:44 UTC (permalink / raw) Cc: Sébastien Vauban, help-gnu-emacs Hello Michael, >> "penses-tu" (do you think) is correct and constituted with >> words that are correct on their own, but the interrogative >> way is always flagged as erroneous. > > I use a quick-n-dirty trick for that: > > (defun ispell-get-otherchars () > (replace-regexp-in-string "-" "" (ispell-get-decoded-string 3))) I did add your function, but... no, it does not work... I still got the coumpound words underlined... Seb -- Sébastien Vauban ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Do-you Aspell for French? 2006-08-30 19:44 ` Sébastien Vauban @ 2006-08-30 20:30 ` Peter Dyballa 2006-08-30 20:53 ` Michaël Cadilhac 0 siblings, 1 reply; 10+ messages in thread From: Peter Dyballa @ 2006-08-30 20:30 UTC (permalink / raw) Cc: help-gnu-emacs, Michaël Cadilhac Am 30.08.2006 um 21:44 schrieb Sébastien Vauban: >> (defun ispell-get-otherchars () >> (replace-regexp-in-string "-" "" (ispell-get-decoded-string 3))) > > I did add your function, but... no, it does not work... I still > got the coumpound words underlined... To me the French affixes file looks suspicious, compared to English or German. Could be this one needs a fix – and ispell and the dictionary a re-compile? I have to admit that I see the same trouble (as if I were using Apple's Mac OS X's spell checker from Lernout & Hauspie). -- Greetings Pete Increase the size of your bike by at least *five* inches! ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Do-you Aspell for French? 2006-08-30 20:30 ` Peter Dyballa @ 2006-08-30 20:53 ` Michaël Cadilhac 2006-08-30 21:42 ` Peter Dyballa 0 siblings, 1 reply; 10+ messages in thread From: Michaël Cadilhac @ 2006-08-30 20:53 UTC (permalink / raw) Cc: Sébastien Vauban, help-gnu-emacs [-- Attachment #1.1: Type: text/plain, Size: 1219 bytes --] Peter Dyballa <Peter_Dyballa@Web.DE> writes: > Am 30.08.2006 um 21:44 schrieb Sébastien Vauban: > >>> (defun ispell-get-otherchars () >>> (replace-regexp-in-string "-" "" (ispell-get-decoded-string 3))) >> >> I did add your function, but... no, it does not work... I still >> got the coumpound words underlined... Strange... I use CVS Emacs, what version are you running? Where did you put it? If it's in your .emacs, did you put a (require 'ispell) before? > To me the French affixes file looks suspicious, compared to English or > German. Could be this one needs a fix – and ispell and the dictionary > a re-compile? Well, it's Emacs related. The function `ispell-get-word' gets the current word according to some configuration (see ispell-dictionary-alist-3). What I did with my function, is to redef the function that gets a part of this configuration. -- | Michaël `Micha' Cadilhac | Would someone please DTRT with this, | | Epita/LRDE Promo 2007 | then ACK? | | http://www.lrde.org/~cadilh_m | -- Richard Stallman | `-- - JID: micha@amessage.be --' - --' [-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --] [-- Attachment #2: Type: text/plain, Size: 152 bytes --] _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Do-you Aspell for French? 2006-08-30 20:53 ` Michaël Cadilhac @ 2006-08-30 21:42 ` Peter Dyballa 2006-08-30 22:27 ` Michaël Cadilhac [not found] ` <mailman.6056.1156976889.9609.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 10+ messages in thread From: Peter Dyballa @ 2006-08-30 21:42 UTC (permalink / raw) Cc: Sébastien Vauban, help-gnu-emacs [-- Attachment #1.1: Type: text/plain, Size: 2242 bytes --] Am 30.08.2006 um 22:53 schrieb Michaël Cadilhac: > Peter Dyballa <Peter_Dyballa@Web.DE> writes: > >> Am 30.08.2006 um 21:44 schrieb Sébastien Vauban: >> >>>> (defun ispell-get-otherchars () >>>> (replace-regexp-in-string "-" "" (ispell-get-decoded-string 3))) >>> >>> I did add your function, but... no, it does not work... I still >>> got the coumpound words underlined... > > Strange... I use CVS Emacs, what version are you running? 21.3.50, 22.0.50, 23.0.0. > > Where did you put it? If it's in your .emacs, did you put a (require > 'ispell) before? No. But I can tell you that your lines change the value of OTHERCHARS, from default "[-'^`\".@]" (in a version running some time) to "[-']". And with (require 'ispell) no change ... I'm not sure whether it's an Emacs thing to decide where a word ends. IMO Emacs passes a region or a buffer to the ispell process which then reads through this. And so it's ispell then, that decides where a word ends. Since I think ispell's not correctly set up ... In Fink Martin Costabel is the maintainer of this package; in francais.aff this is recorded: Copyright 1999, Christophe Pythoud et GUTenberg. Here is an excerpt from ispell.4: Characters described with the boundarychars statement are considered part of a word only if they appear singly, embedded between characters declared with the wordchars or stringchar statements. For example, if the hyphen is a boundary character (useful in French), the string "foo- bar" would be a single word, but "-foo" would be the same as "foo", and "foo--bar" would be two words separated by non-word characters. Since francais.aff contains boundarychars [-] penses-tu is one word! Would it work to subtract - from OTHERCHARS in ispell-dictionary-alist-3? Michaël, could you check your francais.aff file? Maybe this explains why you're so successful ... -- Greetings Pete A lot of us are working harder than we want, at things we don't like to do. Why? ...In order to afford the sort of existence we don't care to live. -- Bradford Angier [-- Attachment #1.2: Signierter Teil der Nachricht --] [-- Type: application/pgp-signature, Size: 194 bytes --] [-- Attachment #2: Type: text/plain, Size: 152 bytes --] _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Do-you Aspell for French? 2006-08-30 21:42 ` Peter Dyballa @ 2006-08-30 22:27 ` Michaël Cadilhac [not found] ` <mailman.6056.1156976889.9609.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 10+ messages in thread From: Michaël Cadilhac @ 2006-08-30 22:27 UTC (permalink / raw) Cc: Sébastien Vauban, help-gnu-emacs [-- Attachment #1.1: Type: text/plain, Size: 2665 bytes --] Peter Dyballa <Peter_Dyballa@Web.DE> writes: > Am 30.08.2006 um 22:53 schrieb Michaël Cadilhac: > >> Peter Dyballa <Peter_Dyballa@Web.DE> writes: >> >>> Am 30.08.2006 um 21:44 schrieb Sébastien Vauban: >>> >>>>> (defun ispell-get-otherchars () >>>>> (replace-regexp-in-string "-" "" (ispell-get-decoded-string 3))) >>>> >>>> I did add your function, but... no, it does not work... I still >>>> got the coumpound words underlined... >> >> Strange... I use CVS Emacs, what version are you running? > > 21.3.50, 22.0.50, 23.0.0. > >> >> Where did you put it? If it's in your .emacs, did you put a (require >> 'ispell) before? > > No. But I can tell you that your lines change the value of OTHERCHARS, > from default "[-'^`\".@]" (in a version running some time) to "[-']". Gosh! How come? In ispell.el, (ispell-get-otherchars) is (defun ispell-get-otherchars () (ispell-get-decoded-string 3)) What I just did is to REMOVE the "-" from this string. I really don't see how (replace-regexp-in-string) could lead to the result you say it leads! However, I've made a big mistake so far, you guys were talking about ispell, will I had flyspell in mind. Flyspell using ispell-get-word (or so), the underlining is rightly done with the fix I propose. But M-x ispell-buffer using ispell-get-line (or so) and calling ispell on it, the result is not the same. > I'm not sure whether it's an Emacs thing to decide where a word ends. Depends on the case. The present one is not determined by Emacs (my mistake). > IMO Emacs passes a region or a buffer to the ispell process which > then reads through this. And so it's ispell then, that decides where > a word ends. Since I think ispell's not correctly set up ... You're completely right, my bad. > In Fink Martin Costabel is the maintainer of this package; in > francais.aff this is recorded: Copyright 1999, Christophe Pythoud et > GUTenberg. From here, I consider I don't have the necessary knowledge to help, sorry. > Would it work to subtract - from OTHERCHARS in > ispell-dictionary-alist-3? No, that's what my proposition did, even if it seems not to work with you (any idea why?). However, this solution is maybe equivalent (but at another level, ispell's one) to remove ``boundarychars [-]'' from francais.aff. -- | Michaël `Micha' Cadilhac | Isn't vi that text editor with | | Epita/LRDE Promo 2007 | two modes... One that beeps and | | http://www.lrde.org/~cadilh_m | one that corrupts your file? | `-- - JID: micha@amessage.be --' -- Dan Jacobson - --' [-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --] [-- Attachment #2: Type: text/plain, Size: 152 bytes --] _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <mailman.6056.1156976889.9609.help-gnu-emacs@gnu.org>]
* Re: Do-you Aspell for French? [not found] ` <mailman.6056.1156976889.9609.help-gnu-emacs@gnu.org> @ 2006-08-31 21:01 ` Sébastien Vauban 2006-09-22 10:25 ` Sébastien Vauban 1 sibling, 0 replies; 10+ messages in thread From: Sébastien Vauban @ 2006-08-31 21:01 UTC (permalink / raw) Hello everybody, >> Am 30.08.2006 um 22:53 schrieb Michaël Cadilhac: >>> Peter Dyballa <Peter_Dyballa@Web.DE> writes: >>>> Am 30.08.2006 um 21:44 schrieb Sébastien Vauban: >>>> >>>>>> (defun ispell-get-otherchars () >>>>>> (replace-regexp-in-string "-" "" (ispell-get-decoded-string 3))) >>>>> >>>>> I did add your function, but... no, it does not work... I still >>>>> got the coumpound words underlined... >>> >>> Strange... I use CVS Emacs, what version are you running? >> >> 21.3.50, 22.0.50, 23.0.0. GNU Emacs 21.4.1, and other verions... On Ubuntu and on Windows. >>> Where did you put it? If it's in your .emacs, did you put a (require >>> 'ispell) before? Yes, now I did (I already had autoloads), but no change. > However, I've made a big mistake so far, you guys were talking about > ispell, will I had flyspell in mind. No, figure out I meant flyspell as well... I use it mainly for my mails... I even have since long ago the following in my .emacs: ;; dash character (`-') is considered as a word delimiter (setq flyspell-consider-dash-as-word-delimiter-flag t) but it does seem not to do anything... Here interesting parts of my config, if it can help. ,---- | ;;; .emacs --- my Emacs Init File | | (require 'ispell) | | ;; use GNU Aspell instead of (port of) ispell | (setq ispell-program-name | (if running-ms-windows | "C:/Program Files/Aspell/bin/aspell.exe" | "/usr/bin/aspell")) | | (when (and ispell-program-name | (file-executable-p ispell-program-name)) | | ;; aspell extensions should be used | (setq ispell-really-aspell t) | | ;; remove uninstalled dictonaries from the default list | (setq ispell-dictionary-alist | '((nil ; default (English.aff) | "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1) | ("american" ; Yankee English | "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1) | ("british" ; British version | "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "british") nil iso-8859-1) | ("english" ; make English explicitly selectable | "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1) | ("francais" ; Francais.aff | "[A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374]" | "[^A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374]" | "[-']" t nil "~list" iso-8859-1))) | | ;; ispell | (autoload 'ispell-word "ispell" "Check the spelling of word in buffer." 't) | (autoload 'ispell-region "ispell" "Check the spelling of region." 't) | (autoload 'ispell-buffer "ispell" "Check the spelling of buffer." t) | | ;; save the personal dictionary without confirmation | (setq ispell-silently-savep t) | | (defun ispell-get-otherchars () | (replace-regexp-in-string "-" "" (ispell-get-decoded-string 3))) | | | ;; ;; consider using the `ispell-parser' to check your text | ;; ;; Warning! Assignment to free variable ispell-parser!! | ;; (add-hook 'tex-mode-hook | ;; '(lambda () | ;; (setq ispell-parser 'tex))) | | ;; ;; TODO Problems in *mail*: checking all the headers!! | ;; ;; turn on flyspell for all text modes | ;; (add-hook 'text-mode-hook | ;; '(lambda () | ;; (flyspell-mode 1))) | | ;; ;; start Flyspell when editing LaTeX source files | ;; (add-hook 'LaTeX-mode-hook 'flyspell-mode) | | ;; ;; ignore the \citep and \citet commands of the NatBib bibliography style | ;; (eval-after-load "ispell" | ;; '(let ((list (car ispell-tex-skip-alists))) | ;; (add-to-list 'list '("\\\\cite[tp]" ispell-tex-arg-end)) | ;; (setcar ispell-tex-skip-alists list))) | | ;; on-the-fly spelling checking | (autoload 'flyspell-mode "flyspell" "On-the-fly spelling checking" t) | | ;; enable the likeness criteria | (setq flyspell-sort-corrections nil) | | ;; | (setq flyspell-auto-correct-previous-word t) | | ;; dash character (`-') is considered as a word delimiter | (setq flyspell-consider-dash-as-word-delimiter-flag t) | | (defun my-turn-on-flyspell-french () | "Unconditionally turn on Flyspell mode (in French)." | (interactive) | (flyspell-mode 1) ;; extra | (ispell-change-dictionary "francais") | (flyspell-buffer)) ;; extra | | (global-set-key [(shift f7)] 'my-turn-on-flyspell-french) | | (defun my-turn-on-flyspell-english () | "Unconditionally turn on Flyspell mode (in English)." | (interactive) | (flyspell-mode 1) | (ispell-change-dictionary "english") | (flyspell-buffer)) | | (global-set-key [(control f7)] 'my-turn-on-flyspell-english) | | ;; turn flyspell-mode on [instead of just toggling the mode | ;; by calling it like: (add-hook 'text-mode-hook 'flyspell-mode)] | (add-hook 'message-mode-hook 'my-turn-on-flyspell-french) | | | ;; (defun activate-flyspell () | ;; "Turn on flyspell-mode and call flyspell-buffer." | ;; (interactive) | ;; ;; This next line REALLY slows buffer switching. | ;; (flyspell-mode) | ;; (flyspell-buffer)) | | ;; (defvar customised-hooks-alist | ;; '(emacs-lisp-mode-hook | ;; nxml-mode-hook | ;; python-mode-hook | ;; sh-mode-hook | ;; text-mode-hook) | ;; "An alist of hooks that require customisations.") | | ;; (unless noninteractive | ;; ;; Activate flyspell for various major modes. | ;; (add-hook-list customised-hooks-alist 'activate-flyspell)) | | ;; turn on flyspell-prog-mode instead, in emacs-lisp-mode, python-mode, | ;; and sh-mode? | | (defun my-turn-off-flyspell () | "Unconditionally turn off Flyspell mode." | (interactive) | (flyspell-mode -1)) | | ;; from Alex Schroeder | (defun my-change-dictionary () | "Change the dictionary." | (interactive) | (let ((dict (or ispell-local-dictionary ispell-dictionary))) | (setq dict (if (string= dict "francais") "american" "francais")) | (message "Switched to %S" dict) | (sit-for 0.4) | (ispell-change-dictionary dict) | (when flyspell-mode | (flyspell-delete-all-overlays)))) | | ;; key bindings | (global-set-key [(meta $)] 'ispell-word) | (global-set-key [(f7)] 'ispell-word) | (global-set-key [(shift f7)] 'my-change-dictionary) | (global-set-key [(control f7)] 'ispell-change-dictionary) | | ;; ;;* flyspell comments and strings in programming modes | ;; ;; From: "Stefan Monnier <foo @ acm.com>" | ;; (defun flyspell-generic-progmode-verify () | ;; "Used for `flyspell-generic-check-word-p' in programming modes." | ;; (let ((f (get-text-property (point) 'face))) | ;; (memq f '(font-lock-comment-face font-lock-string-face)))) | ;; (defun flyspell-prog-mode () | ;; "Turn on `flyspell-mode' for comments and strings." | ;; (interactive) | ;; (setq flyspell-generic-check-word-p 'flyspell-generic-progmode-verify) | ;; (flyspell-mode 1)) | ;; (add-hook 'c-mode-common-hook 'flyspell-prog-mode t) | ;; (add-hook 'java-mode-common-hook 'flyspell-prog-mode t) | | | ;;; ----[ The Syntax Table | | ;; change word constituent syntax for `text-mode-syntax-table' | (defun my-change-word-constituent () | (map nil | (function | (lambda (char) | (modify-syntax-entry char "w" text-mode-syntax-table))) | ;; accented characters | "áéíóúàèìòùâêîôûäëïöüñåç")) | | (my-change-word-constituent) | | ;; now '-' is not considered a word-delimiter | ;; (add-hook 'emacs-lisp-mode-hook | ;; '(lambda () | ;; (modify-syntax-entry ?- "w"))) | | ;;; .emacs ends here `---- Thanks for all in advance, Seb -- Sébastien Vauban ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Do-you Aspell for French? [not found] ` <mailman.6056.1156976889.9609.help-gnu-emacs@gnu.org> 2006-08-31 21:01 ` Sébastien Vauban @ 2006-09-22 10:25 ` Sébastien Vauban 1 sibling, 0 replies; 10+ messages in thread From: Sébastien Vauban @ 2006-09-22 10:25 UTC (permalink / raw) Hello Michaël, >>>>>> (defun ispell-get-otherchars () >>>>>> (replace-regexp-in-string "-" "" (ispell-get-decoded-string 3))) >>>>> >>>>> I did add your function, but... no, it does not work... I still >>>>> got the coumpound words underlined... Contrarily to what I previously stated, adding: (require ispell) earlier in my .emacs file made your fix working! Great... Many thanks for your help, Seb -- Sébastien Vauban ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-09-22 10:25 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-08-29 10:31 cc mode, c offset alist Florian Kaufmann 2006-08-29 19:09 ` Do-you Aspell for French? Sébastien Vauban 2006-08-29 20:29 ` Michaël Cadilhac [not found] ` <mailman.5961.1156884196.9609.help-gnu-emacs@gnu.org> 2006-08-30 19:44 ` Sébastien Vauban 2006-08-30 20:30 ` Peter Dyballa 2006-08-30 20:53 ` Michaël Cadilhac 2006-08-30 21:42 ` Peter Dyballa 2006-08-30 22:27 ` Michaël Cadilhac [not found] ` <mailman.6056.1156976889.9609.help-gnu-emacs@gnu.org> 2006-08-31 21:01 ` Sébastien Vauban 2006-09-22 10:25 ` Sébastien Vauban
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).