From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Arash Esbati Newsgroups: gmane.emacs.devel Subject: Adding % to `ispell-tex-arg-end' Date: Sat, 09 Jul 2016 11:02:27 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1468055023 32069 80.91.229.3 (9 Jul 2016 09:03:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Jul 2016 09:03:43 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 09 11:03:34 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bLoAf-0000QM-P0 for ged-emacs-devel@m.gmane.org; Sat, 09 Jul 2016 11:03:33 +0200 Original-Received: from localhost ([::1]:49468 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLoAf-0002gG-0D for ged-emacs-devel@m.gmane.org; Sat, 09 Jul 2016 05:03:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLoA9-0002gA-Ay for emacs-devel@gnu.org; Sat, 09 Jul 2016 05:03:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLoA4-0006Dp-Au for emacs-devel@gnu.org; Sat, 09 Jul 2016 05:03:00 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:36430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLoA4-0006Di-3w for emacs-devel@gnu.org; Sat, 09 Jul 2016 05:02:56 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bLoA1-00008V-P4 for emacs-devel@gnu.org; Sat, 09 Jul 2016 11:02:53 +0200 Original-Received: from p4fed17b2.dip0.t-ipconnect.de ([79.237.23.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 09 Jul 2016 11:02:53 +0200 Original-Received: from esbati by p4fed17b2.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 09 Jul 2016 11:02:53 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 45 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: p4fed17b2.dip0.t-ipconnect.de Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:205465 Archived-At: Hi all, when I run Ispell over the following snippet, the second [htbp] is matched by Ispell: \begin{figure} [htbp] \caption{foo} \end{figure} \begin{figure}% [htbp] % <== matched by Ispell \caption{foo} \end{figure} It is due to the regexp in `ispell-tex-arg-end': (defun ispell-tex-arg-end (&optional arg) "Skip across ARG number of braces." (condition-case nil (progn (while (looking-at "[ \t\n]*\\[") (forward-sexp)) (forward-sexp (or arg 1))) (error (message "Error skipping s-expressions at point %d." (point)) (beep) (sit-for 2)))) Would it be possible to add "%" to this function? (defun ispell-tex-arg-end (&optional arg) "Skip across ARG number of braces." (condition-case nil (progn (while (looking-at "[ \t\n%]*\\[") (forward-sexp)) (forward-sexp (or arg 1))) (error (message "Error skipping s-expressions at point %d." (point)) (beep) (sit-for 2)))) I hope that nobody writes such LaTeX code, but Ispell should match valid code here. Best, Arash