From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mohammed Sadiq Newsgroups: gmane.emacs.bugs Subject: bug#60463: 29.0.60; c-ts-mode: M-x align doesn't work Date: Sun, 22 Jan 2023 14:16:31 +0530 Message-ID: <78fa4e9486dc13bd542ed8fcb9a624e0@sadiqpk.org> References: <9ECF22EB-D2FB-4697-A1DB-15F0AF3BF3B2@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30031"; mail-complaints-to="usenet@ciao.gmane.io" To: 60463@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 22 09:47:14 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pJW0P-0007bI-L0 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Jan 2023 09:47:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJW0G-00017C-RC; Sun, 22 Jan 2023 03:47:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJW0E-00016Y-Ud for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 03:47:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJW0E-0002I9-Mg for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 03:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pJW0E-0004Uk-Am for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 03:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mohammed Sadiq Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Jan 2023 08:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60463 X-GNU-PR-Package: emacs Original-Received: via spool by 60463-submit@debbugs.gnu.org id=B60463.167437720317253 (code B ref 60463); Sun, 22 Jan 2023 08:47:02 +0000 Original-Received: (at 60463) by debbugs.gnu.org; 22 Jan 2023 08:46:43 +0000 Original-Received: from localhost ([127.0.0.1]:50653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJVzv-0004UD-7q for submit@debbugs.gnu.org; Sun, 22 Jan 2023 03:46:43 -0500 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:60483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJVzs-0004Tv-Kz for 60463@debbugs.gnu.org; Sun, 22 Jan 2023 03:46:41 -0500 Original-Received: (Authenticated sender: sadiq@sadiqpk.org) by mail.gandi.net (Postfix) with ESMTPA id E3B90E0003 for <60463@debbugs.gnu.org>; Sun, 22 Jan 2023 08:46:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sadiqpk.org; s=gm1; t=1674377194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4/vIqAWSX6vYEED+Z9t2nukGDKMy+Iug/xmpATMeDtY=; b=DVEhkB+phnHKTxDBk4chErNN/KsOauvkEBaemO4At3mo4kjDUWPlwHrn6aexiSjy1uHEvc mkjZX9sEtodyzX65TtSDeOPtZYIYsm20IkGPQ7p0dq8EZiXxGU4wIgvK18bdlIpxPLbmsa Cp/92tgrQ0zGmZYZItGYEmAOoRFsRF/aJ4JwAz984CfXTfXAQ7H72+Ie4p/J579Y8idY8j vvom5kQEiZ9zx4rG/FPjWCoN/5Nf7B1o7Z7Cgf4LHqHVUiRUeryjrlxiG6rtmZk7TqMTom Tm/DjviqgqS9PC+UWItA+FmMd2bM5wS6sozNvLK5ybVlDGWaNTZOnq1CD4DY3g== In-Reply-To: X-Sender: sadiq@sadiqpk.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253913 Archived-At: Minimal example to reproduce the said issue (save to test.el): (let ((buffer (generate-new-buffer "temp.c"))) (with-current-buffer buffer (c-ts-mode) (insert "int main (int argc,\nchar *argv[])") (align (point-min) (point-max)))) Execute the file with: emacs -Q -batch -l test.el Error log: Error: wrong-type-argument (stringp nil) mapbacktrace(#f(compiled-function (evald func args flags) #)) debug-early-backtrace() debug-early(error (wrong-type-argument stringp nil)) looking-at(nil) c-guess-basic-syntax() #f(compiled-function () #)() align-region(1 34 "^\\s-*[{}]?\\s-*$" ((lisp-second-arg (regexp . "\\(^\\s-+[^( \11\n]\\|(\\(\\S-+\\)\\s-+\\)\\S-+\\(\\s-+\\)") (group . 3) (modes . align-lisp-modes) (run-if . #f(compiled-function () #))) (lisp-alist-dot (regexp . "\\(\\s-*\\)\\.\\(\\s-*\\)") (group 1 2) (modes . align-lisp-modes)) (open-comment (regexp . #f(compiled-function (end reverse) #)) (modes . align-open-comment-modes)) (c-macro-definition (regexp . "^\\s-*#\\s-*define\\s-+\\S-+\\(\\s-+\\)") (modes . align-c++-modes)) (c-variable-declaration (regexp . "[*&0-9A-Za-z_]>?[][&*]*\\(\\s-+[*&]*\\)[A-Za-z_][][0-9A-Za-z:_]*\\s-*\\(\\()\\|=[^=\n].*\\|(.*)\\|\\(\\[.*\\]\\)*\\)\\s-*[;,]\\|)\\s-*$\\)") (group . 1) (modes . align-c++-modes) (justify . t) (valid . #f(compiled-function () #))) (c-assignment (regexp . "[^-=!^&*+<>/| \11\n]\\(\\s-*[-=!^&*+<>/|]*\\)=\\(\\s-*\\)\\([^= \11\n]\\|$\\)") (group 1 2) (modes . align-c++-modes) (justify . t) (tab-stop)) (perl-assignment (regexp . "[^=!^&*+<>/| \11\n-]\\(\\s-*\\)=[~>]?\\(\\s-*\\)\\([^>= \11\n]\\|$\\)") (group 1 2) (modes . align-perl-modes) (tab-stop)) (python-assignment (regexp . "[^=!<> \11\n]\\(\\s-*\\)=\\(\\s-*\\)\\([^>= \11\n]\\|$\\)") (group 1 2) (modes quote (python-mode)) (tab-stop)) (make-assignment (regexp . "^\\s-*\\w+\\(\\s-*\\):?=\\(\\s-*\\)\\([^\11\n \\]\\|$\\)") (group 1 2) (modes quote (makefile-mode)) (tab-stop)) (c-comma-delimiter (regexp . ",\\(\\s-*\\)[^/ \11\n]") (repeat . t) (modes . align-c++-modes) (run-if . #f(compiled-function () #))) (basic-comma-delimiter (regexp . ",\\(\\s-*\\)[^# \11\n]") (repeat . t) (modes append align-perl-modes '(python-mode)) (run-if . #f(compiled-function () #))) (c++-comment (regexp . "\\(\\s-*\\)\\(//.*\\|/\\*.*\\*/\\s-*\\)$") (modes . align-c++-modes) (column . comment-column) (valid . #f(compiled-function () #))) (c-chain-logic (regexp . "\\(\\s-*\\)\\(&&\\|||\\|\\\\|\\\\)") (modes . align-c++-modes) (valid . #f(compiled-function () #))) (perl-chain-logic (regexp . "\\(\\s-*\\)\\(&&\\|||\\|\\\\|\\\\)") (modes . align-perl-modes) (valid . #f(compiled-function () #))) (python-chain-logic (regexp . "\\(\\s-*\\)\\(\\\\|\\\\)") (modes quote (python-mode)) (valid . #f(compiled-function () #))) (c-macro-line-continuation (regexp . "\\(\\s-*\\)\\\\$") (modes . align-c++-modes) (column . c-backslash-column)) (basic-line-continuation (regexp . "\\(\\s-*\\)\\\\$") (modes quote (python-mode makefile-mode))) (tex-record-separator (regexp . #f(compiled-function (end reverse) #)) (group 1 2) (modes . align-tex-modes) (repeat . t)) (tex-tabbing-separator (regexp . #f(compiled-function (end reverse) #)) (group 1 2) (modes . align-tex-modes) (repeat . t) (run-if . #f(compiled-function () #))) (tex-record-break (regexp . "\\(\\s-*\\)\\\\\\\\") (modes . align-tex-modes)) (text-column (regexp . "\\(^\\|\\S-\\)\\([ \11]+\\)\\(\\S-\\|$\\)") (group . 2) (modes . align-text-modes) (repeat . t) (run-if . #f(compiled-function () #))) (text-dollar-figure (regexp . "\\$?\\(\\s-+[0-9]+\\)\\.") (modes . align-text-modes) (justify . t) (run-if . #f(compiled-function () #))) (css-declaration (regexp . "^\\s-*\\(?:\\w-?\\)+:\\(\\s-*\\).*;") (group 1) (modes quote (css-mode html-mode)))) ((exc-dq-string (regexp . "\"\\([^\"\n]+\\)\"") (repeat . t) (modes . align-dq-string-modes)) (exc-sq-string (regexp . "'\\([^'\n]+\\)'") (repeat . t) (modes . align-sq-string-modes)) (exc-open-comment (regexp . #f(compiled-function (end reverse) #)) (modes . align-open-comment-modes)) (exc-c-comment (regexp . "/\\*\\(.+\\)\\*/") (repeat . t) (modes . align-c++-modes)) (exc-c-func-params (regexp . "(\\([^)\n]+\\))") (repeat . t) (modes . align-c++-modes)) (exc-c-macro (regexp . "^\\s-*#\\s-*\\(if\\w*\\|endif\\)\\(.*\\)$") (group . 2) (modes . align-c++-modes)))) align(1 34) (save-current-buffer (set-buffer buffer) (c-ts-mode) (insert "int main (int argc,\nchar *argv[])") (align (point-min) (point-max))) (let ((buffer (generate-new-buffer "temp.c"))) (save-current-buffer (set-buffer buffer) (c-ts-mode) (insert "int main (int argc,\nchar *argv[])") (align (point-min) (point-max)))) eval-buffer(# nil "/home/sadiq/test.el" nil t) load-with-code-conversion("/home/sadiq/test.el" "/home/sadiq/test.el" nil t) load("/home/sadiq/test.el" nil t) command-line-1(("-l" "test.el")) command-line() normal-top-level() Wrong type argument: stringp, nil