unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: 16201@debbugs.gnu.org
Subject: bug#16201: 24.3.50; error expanding pcase with a pred clause
Date: Fri, 20 Dec 2013 15:45:10 +0100	[thread overview]
Message-ID: <87txe3h98p.fsf@web.de> (raw)


Hi,

sorry if this is a known issue.

In emacs -Q (current trunk), save the following snipped

--8<---------------cut here---------------start------------->8---
(require 'pcase)

(defun test-buffer-file-name ()
  (pcase buffer-file-name
    (`nil                   'not-a-file)
    ((pred file-writable-p) 'writable)
    (_                      'not-writable)))
--8<---------------cut here---------------end--------------->8---

into a file.  Then, M-: (byte-compile-file buffer-file-name).  You get
an error:

  pcase-bug.el:3:1:Error: Wrong type argument: stringp, nil

Same with C-x C-e with point after the defun.

BTW, (require 'pcase) is necessary in the recipe.  If pcase has not yet
been loaded, the error doesn't happen.  Instead you can compile or eval
the defun (once), and it works as expected!


Thanks,

Michael.




In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.4)
 of 2013-12-20 on drachen
Windowing system distributor `The X.Org Foundation', version 11.0.11403000
System Description:	Debian GNU/Linux testing (jessie)

Configured using:
 `configure --prefix=/usr/local/built/'

Important settings:
  value of $LC_ALL: de_DE.utf8
  value of $LC_COLLATE: C
  value of $LC_TIME: C
  value of $LANG: de_DE.utf8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp






             reply	other threads:[~2013-12-20 14:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20 14:45 Michael Heerdegen [this message]
2013-12-21 11:54 ` bug#16201: 24.3.50; error expanding pcase with a pred clause Michael Heerdegen
2014-01-03  4:41 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87txe3h98p.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=16201@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).