Code Monkey home page Code Monkey logo

ahk-mode's People

Contributors

bbatsov avatar driftcrow avatar duianto avatar mattfidler avatar punassuming avatar syohex avatar tarsius avatar weissp 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ahk-mode's Issues

Check if auto-complete-mode is installed

Hi,

Currently auto-complete-mode is a requirement:

(eval-after-load "auto-complete-mode"
  (progn
    (require 'auto-complete-config) 
    (add-to-list 'ac-modes 'ahk-mode)))

I'm on Emacs 24.3 and I don't have auto-complete-mode installed. Could you please check if it is installed first:

(featurep 'auto-complete-mode
          (eval-after-load "auto-complete-mode"
            (progn
              (require 'auto-complete-config) 
              (add-to-list 'ac-modes 'ahk-mode))))

install failure

hi
i tried installing and got:
Install package `ahk-mode-20150409.1012'? (y or n) y
Contacting host: melpa.milkbox.net:80
Making version-control local to ahk-mode-autoloads.el while let-bound!
Generating autoloads for ahk-mode.el...
forward-sexp: Scan error: "Unbalanced parentheses", 3648, 33041
When done with a buffer, type M-x server-edit
Error during redisplay: (jit-lock-function 3278) signaled (scan-error "Unbalanced parentheses" 3614 33007)
preceding-sexp: End of file during parsing

i downloaded the zip and had a look.... i think the problem is here:
;;; Requirements

(eval-when-compile
(require 'font-lock)
(require 'cl)
(require 'thingatpt )
(require 'rx)

cheers

jack

Error on compile

Hi, love your AutoHotKey mode, just wanted to ask whether there was a way to fix the compile function?
When I run C-c C-k it gives me ShellExecute failed: The system cannot find the file specified.
Do you know which file it is referring to? My binaries are in default install location...

It really isn't essential, I can just go down to my taskbar and do it myself, but it is a nice-to-have, you know?

(the problem is probably me being on windows isn't it πŸ™ƒ)

Doesn't seem to trigger prog-mode-hook hooks

I have a variety of functionality attached to prog-mode-hook and for some reason I noticed that this mode, despite seemingly deriving from it, doesn't trigger those hook handlers.

M-j (default-indent-new-line) on a comment line/block

Description:

Pressing M-j on a comment line or in a comment block causes issues.

Reproduction steps:

  1. Open a new buffer: C-x b test RET
  2. Switch to ahk mode: M-x ahk-mode RET
  3. Start a comment by pressing:
    M-; (comment-dwim)
    ; (semicolon space) is inserted
  4. Start a new comment line by pressing:
    M-j (default-indent-new-line)

Observed:

;*/
/* 

Expected:

;
;

That's what happens in for example:

  • emacs-lisp-mode
;;
;;
  • python-mode
#
#

Comment block

After typing a comment block manually:

/*  */

when M-j is pressed, with the cursor in the block.

Then two newlines are added (possibly expected so that one can start typing in the middle of the block).

/*

*/

But there's an error message:

comment-normalize-vars: Args out of range: "", 1, nil

There is no error message if the comment block is added with: C-c C-b

/*  */

when the cursor is in the block and M-j is pressed,
then the first lines block is ended and the cursor is in the block on the second line.

/**/
/**/

But the error returns when pressing M-j in a manually typed comment block,
in a new .ahk file, or if ahk mode is re-enabled: M-x ahk-mode RET

System:

ahk-mode version 1.5.6
GNU Emacs 27.1 (build 1, x86_64-w64-mingw32) of 2020-08-21

ahk-lookup-web ahkscript.org "This site can’t be reached"

Calling M-x ahk-lookup-web on for example the word sleep,
opens the url: http://ahkscript.org/docs/commands/sleep.htm

But the page shows: This site can’t be reached

https://downforeveryoneorjustme.com/ahkscript.org says:

Ahkscript.org Status
Is ahkscript.org down right now?
It's not just you! ahkscript.org is down.

If http://ahkscript.org is handled by this repositories authors/maintainers, then is it a temporary issue that will be fixed?

Or if the cause of the unreachable site is unknown.
Would it be better to redirect ahk-lookup-web to http://autohotkey.com?

https://github.com/ralesi/ahk-mode/blob/377f79484cc43458f66c1ba5a61459b77e363591/ahk-mode.el#L222

Because when the domain name is changed to http://autohotkey.com
then a page with the expected documentation opens:
https://www.autohotkey.com/docs/commands/Sleep.htm

company-mode, Search failed: "\<\w+"" with args (prefix)

When company-mode is enabled.
Typing a semicolon in an empty ahk-mode buffer shows:

Company: An error occurred in auto-begin
Company: backend company-capf error "Search failed: "<\w+"" with args (prefix)

Reproduction steps

With these two packages installed:
ahk-mode
company-mode (https://github.com/company-mode/company-mode)

  • Open a new buffer: C-x b test RET
  • Enable the two packages:
  • M-x ahk-mode RET
  • M-x company-mode RET
  • Type a semicolon: ;
    the following lines appear in the messages buffer (C-h e):

Company: An error occurred in auto-begin
Company: backend company-capf error "Search failed: "\<\w+"" with args (prefix)

  • Enable debug-on-error from the Eval prompt:
    S-M-; (setq debug-on-error t) RET

  • Erase the semicolon: <backspace>

  • Type a semicolon: ;
    A *Backtrace* buffer opens:

Debugger entered--Lisp error: (search-failed "\<\w+")
re-search-backward("\<\w+")
ahk-completion-at-point()
completion--capf-wrapper(ahk-completion-at-point optimist)
run-hook-wrapped(completion--capf-wrapper ahk-completion-at-point optimist)
company--capf-data-real()
company--capf-data()
company-capf(prefix)
apply(company-capf prefix)
company-call-backend-raw(prefix)
apply(company-call-backend-raw prefix)
company--force-sync(company-call-backend-raw (prefix) company-capf)
company-call-backend(prefix)
company--begin-new()
company--perform()
company-auto-begin()
company-idle-begin(# #<window 3 on test> 8 2)
apply(company-idle-begin (# #<window 3 on test> 8 2))
timer-event-handler([t 24650 31286 705585 nil company-idle-begin (# #<window 3 on test> 8 2) nil 0])

System info

ahk-mode version 1.5.6
Company version: 0.9.13
GNU Emacs 27.1 (build 1, x86_64-w64-mingw32) of 2020-08-21
Windows 10 Version 2004

Defaulted value for tab-width is ignored

I have (setq-default tab-width 2) but for some reason it's interpreted as being set to its out-of-the-box default value of 8. I realized I could fix this by setting ahk-indentation but I think it's a bug for this to be happening at all.

Looking at the source I notice a call to kill-all-local-variables which at least sounds like the culprit.

(and, or, not) are colored blue, when written at the start, middle or end of a word

Description :octocat:

"and", "or", and "not" are colored blue, when they are written at the start, middle or end of a word.

Reproduction guide πŸͺ²

  • Start Emacs
  • Open an .ahk file or create a new one
  • Type: android_storage_knot

Observed behaviour: πŸ‘€ πŸ’”

emacs_2016-10-08_19-25-34

Expected behaviour: ❀️ πŸ˜„
"and", "or", and "not" should keep the default text color when there isn't whitespace before and after them.

They should however keep the blue color when there is whitespace before and after, like it currently does, as shown in the screenshot above.

System Info πŸ’»

  • OS: windows-nt
  • Emacs: 25.1.1
  • Spacemacs: 0.200.0
  • Spacemacs branch: develop (rev. 405e90d)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(autohotkey emacs-lisp git helm)

Theme:
spacemacs-dark (the default spacemacs theme)

Notes:

In the xahk-mode package, "and", "or", and "not" doesn't change color in words.

But commenting doesn't work very well there, it uses /* */ style comments, but there's problems when one tries to toggle off the comments, sometimes it shows the message: Can’t find the comment end, and other times it adds another set of comments: /* /\* test *\/ */.

So i prefer this ahk-mode package, since the ; comments can be toggled on and off without any issues.

add autoload cookie def to (define-derived-mode ahk-mode) to avoid error

Hello, thanks for taking up this emacs package.

Please add a autoload cookie def to (define-derived-mode ahk-mode...) so that the file specification does not produce an error on opening an .ahk file.

Currently as a workaround I do this:

    (use-package ahk-mode
        :commands ahk-mode)

in my startup.

License of the package

Hi,

Could not find any other contact info so opening an issue for this license request.

In a thread in the emacs-devel maillist, the licensing situation for emacs packages provided through Emacs package archives has been under focus. I have volunteered to contact the authors of packages that have a license that is incompatible with Emacs, which is now under GPL-3+.

See https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg01069.html

So I wonder if you could consider to change the license of your package to GPL-3+?

function_names() written with white space before them aren't colored magenta

Description :octocat:

When a function_name() is written with white space before it, then it is written with the default gray text color, but when there isn't any white space before a function_name(), then it gets a magenta color, and that makes it easier to see where a function starts.

Reproduction guide πŸͺ²

  • Start Emacs
  • Open an ahk file or create a new one
  • Type a function name, for example: function_name()
  • Add or remove white space before it (indenting and unindenting also works)

Observed behaviour: πŸ‘€ πŸ’”

emacs_2016-10-08_19-54-10

(notes about the image:
The orange dots indicate white space, and the $ symbol indicates the end of a line, they can be toggled on/off in spacemacs by pressing SPC t w.)

Expected behaviour: ❀️ πŸ˜„

Function names should probably be colored magenta whether there is white space before them or not.

System Info πŸ’»

  • OS: windows-nt
  • Emacs: 25.1.1
  • Spacemacs: 0.200.0
  • Spacemacs branch: develop (rev. 405e90d)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(autohotkey emacs-lisp git helm)

Theme:
spacemacs-dark (the default spacemacs theme)

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.