Giter VIP home page Giter VIP logo

markmacro's Introduction

Hi, I'm ManateeLazyCat

About Me

I often use English name Andy Stewart, my Chinese name is 王勇.

Here are some ideas to get you started:

  • Self-study computer and programming technology
  • Mobile game developer (2005 ~ 2007)
  • Create a clothing factory (2007 ~ 2009)
  • Pre-CTO of deepin operating system (2010 ~ 2018)
  • Own several IT companies now (2019 ~ now)
  • Like self-driving tour, live with kind wife and cute daughter
  • A lot of time on EAF and lsp-bridge

Skills: Python、C、C++、Emacs Lisp、Haskell、Golang、Vala、JavaScript、Ruby、Lua and more

Welcome to my Chinese blog: manateelazycat.github.io

Coding Life

Github Stats

Most Used Languages

Recent Activity

markmacro's People

Contributors

elilif avatar manateelazycat avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

elilif

markmacro's Issues

使用宏重构后的版本,选中的内容不正确

今天pull了最新的代码,发现执行 markmacro-mark-words 以及 markmacro-mark-lines 后选中的内容不正确,看了一下 markmacro-mark-objects 这个宏,由于中间执行了一次 deactivate-mark,导致第二次执行的时候获取的区域是错误的,应该还是需要一个 let 去暂存一下 mark-bound 执行结果

;; 以markmacro-mark-lines为例,mark-bound内容为:
(if (region-active-p)
    (cons (region-beginning) (region-end))   ; 第一次会用选中区域
  (cons (point-min) (point-max))             ; 第二次会用这个,会直接选中整个buffer

(cl-defmacro markmacro-mark-objects (mark-bound func)
  `(when ,mark-bound
     (when (region-active-p)
       (deactivate-mark))                    ; 这里关闭了 region

     (dolist (bound (funcall ,func ,mark-bound))
       (let* ((overlay (make-overlay (car bound) (cdr bound))))
         (overlay-put overlay 'face 'markmacro-mark-face)
         (add-to-list 'markmacro-overlays overlay t)))

     (markmacro-select-last-overlay)))

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.