about summary refs log tree commit diff stats
path: root/.emacs.d/lisp/init-minibuffer.el
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2024-10-18 16:05:46 +0100
committerDavid Morgan <djm_uk@protonmail.com>2024-10-18 16:05:46 +0100
commit524e8e432b22ea64f1a15a58da6efa0cf99c8dc8 (patch)
treeaff9afbd61738077476f6b3c6141315f7e8725c1 /.emacs.d/lisp/init-minibuffer.el
parenta258d3bb3252dcaa78c2a88c315c77358f51d475 (diff)
downloaddotfiles-524e8e432b22ea64f1a15a58da6efa0cf99c8dc8.tar.gz
Make function into a command
Diffstat (limited to '.emacs.d/lisp/init-minibuffer.el')
-rw-r--r--.emacs.d/lisp/init-minibuffer.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-minibuffer.el b/.emacs.d/lisp/init-minibuffer.el
index 41a8984..66aabf8 100644
--- a/.emacs.d/lisp/init-minibuffer.el
+++ b/.emacs.d/lisp/init-minibuffer.el
@@ -547,6 +547,7 @@ See `+become' and the functions that call it (e.g. `+become-consult-line')."
   (defun embark-dwim-beginning-of-list ()
     "`embark-dwim' at the beginning of the current list.
 With a prefix argument, moves up `current-prefix-arg' sexps first."
+    (interactive)
     (progn
       (when current-prefix-arg
         (sp-backward-up-sexp current-prefix-arg))
d2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
-- simple immediate-mode buttons

Button_handlers = {}

-- draw button and queue up event handlers
function button(name, params)
  love.graphics.setColor(params.color[1], params.color[2], params.color[3])
  love.graphics.rectangle('fill', params.x,params.y, params.w,params.h, 5,5)
  if params.icon then params.icon(params.x, params.y) end
  table.insert(Button_handlers, params)
end

-- process button event handlers
function propagate_to_button_handlers(x, y, mouse_button)
  for _,ev in ipairs(Button_handlers) do
    if x>ev.x and x<ev.x+ev.w and y>ev.y and y<ev.y+ev.h then
      if ev.onpress1 and mouse_button == 1 then ev.onpress1() end
    end
  end
end