Giter Site home page Giter Site logo

cl-lib-highlight's People

Contributors

purcell avatar skeeto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cl-lib-highlight's Issues

Incorrect warning highlighting

The original function will only highlight tokens if:

  1. they constitute the whole word.
  2. they are in the head position of an s-expression.

This means that (replace-regexp-in-string ...) will get a warning overlay, even though it shouldn't. (mapcar 'replace ...) will not be highlighted, even though it should.

I suggest this fix:

(defun cl-lib-highlight-warn-cl-initialize ()
  "Mark all of the old cl functions with `flyspell-incorrect'."
  (require 'flyspell)
  (let* ((opt (regexp-opt (mapcar #'symbol-name cl-lib-highlight-cl) t))
         (old (list (concat "\\_<" opt "\\_>")
                    '(1 'flyspell-incorrect))))
    (font-lock-add-keywords 'emacs-lisp-mode (list old))
    (font-lock-add-keywords 'lisp-interaction-mode (list old))))

which should cater for hyphens and such.

Appears to require Emacs 24

cl-lib 0.3 doesn't seem to have cl-flet (?), so on Emacs 23.3, I get a warning at compilation time:

cl-lib-highlight.el:90:4:Warning: `(opt (syms) (regexp-opt (mapcar (function
    symbol-name) syms) t))' is a malformed function

and then an invalid function error at the same line when loading cl-lib-highlight.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.