Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't error when previewing buffer without file #201

Merged
merged 1 commit into from
Jun 15, 2017

Conversation

xiongtx
Copy link
Contributor

@xiongtx xiongtx commented Jun 15, 2017

Fixes #200.

@xiongtx xiongtx force-pushed the 200-markdown-mode-live-preview branch from 96f9d4f to 39e3fd0 Compare June 15, 2017 04:07
@jrblevin
Copy link
Owner

jrblevin commented Jun 15, 2017

Thanks for this. It looks OK to me, but user-error is not defined on Emacs 24.1 and 24.2, so the CI tests are failing. Can you please fix that? Two possibilities are:

  1. Maybe just use error instead?
  2. Add a markdown-user-error defalias that falls back to error when user-error is not bound. See the "Compatibility" section of the code for some examples. Something like this should work:
(eval-and-compile
  (defalias 'markdown-user-error
    (if (fboundp 'user-error)
        'user-error
      'error)))

Update: I see you added a second commit now. My comments above refer to 96f9d4f.

@xiongtx xiongtx force-pushed the 200-markdown-mode-live-preview branch 2 times, most recently from 36c3381 to f5d8022 Compare June 15, 2017 05:12
@xiongtx xiongtx force-pushed the 200-markdown-mode-live-preview branch from f5d8022 to 69d62f9 Compare June 15, 2017 05:14
@xiongtx
Copy link
Contributor Author

xiongtx commented Jun 15, 2017

Yeah, I tried to use skip-unless but that caused the Emacs 24.3 test to fail as well.

In the end I just went with error. At some point support for Emacs <24.3 should probably be dropped.

@jrblevin jrblevin merged commit 95f2e13 into jrblevin:master Jun 15, 2017
@xiongtx xiongtx deleted the 200-markdown-mode-live-preview branch June 15, 2017 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants