punassuming / ahk-mode Goto Github PK
View Code? Open in Web Editor NEWAutotHotkey major mode for emacs
AutotHotkey major mode for emacs
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))))
Hi,
I get this error when I open an .ahk file.
Windows Server 2012 R2 U1, german
Spacemacs 0.103.6
Emacs 24.5 (x64)
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
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 π)
I'm running command ahk-run-script
from Arch Linux on ahk script file.
I installed package ironahk-git
https://github.com/Paris/IronAHK
Error: RT
When beginning a line with (LTrim
to allow a text block across multiple lines, the text is only font-locked as a comment for a few lines.
I can't figure out why this is happening. By default imenu ignores comments assuming the syntax table is correctly defined.
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.
Pressing M-j on a comment line or in a comment block causes issues.
C-x b
test
RET
M-x
ahk-mode
RET
M-;
(comment-dwim
);
(semicolon space) is insertedM-j
(default-indent-new-line
);*/
/*
;
;
That's what happens in for example:
emacs-lisp-mode
;;
;;
python-mode
#
#
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
ahk-mode version 1.5.6
GNU Emacs 27.1 (build 1, x86_64-w64-mingw32) of 2020-08-21
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
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)
With these two packages installed:
ahk-mode
company-mode
(https://github.com/company-mode/company-mode)
C-x b
test
RET
M-x
ahk-mode
RET
M-x
company-mode
RET
;
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])
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
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", and "not" are colored blue, when they are written at the start, middle or end of a word.
android_storage_knot
Observed behaviour: π π
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.
(autohotkey emacs-lisp git helm)
Theme:
spacemacs-dark (the default spacemacs theme)
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.
Fix indentation algorithm
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.
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+?
Support use of both ;
and /* */
for comments.
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.
function_name()
Observed behaviour: π π
(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.
(autohotkey emacs-lisp git helm)
Theme:
spacemacs-dark (the default spacemacs theme)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.