update packages
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
;; -*- no-byte-compile: t; lexical-binding: nil -*-
|
||||
(define-package "string-inflection" "20240816.523"
|
||||
(define-package "string-inflection" "20250630.555"
|
||||
"Underscore -> UPCASE -> CamelCase -> lowerCamelCase conversion of names."
|
||||
()
|
||||
:url "https://github.com/akicho8/string-inflection"
|
||||
:commit "4cc92e1ecd3d165b55235b51ae65ac09a0364958"
|
||||
:revdesc "4cc92e1ecd3d"
|
||||
:commit "02ab7b2ea8530c63c20556c1afb795924e08dfca"
|
||||
:revdesc "02ab7b2ea853"
|
||||
:keywords '("elisp")
|
||||
:authors '(("akicho8" . "akicho8@gmail.com"))
|
||||
:maintainers '(("akicho8" . "akicho8@gmail.com")))
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
;; Author: akicho8 <akicho8@gmail.com>
|
||||
;; Keywords: elisp
|
||||
;; Package-Version: 20240816.523
|
||||
;; Package-Revision: 4cc92e1ecd3d
|
||||
;; Package-Version: 20250630.555
|
||||
;; Package-Revision: 02ab7b2ea853
|
||||
|
||||
;; This file is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
@@ -113,6 +113,15 @@ This can be `remain' – remain at the initial position but not beyond the end o
|
||||
:group 'string-inflection
|
||||
:type '(choice (const remain) (const beginning) (const end)))
|
||||
|
||||
(defcustom string-inflection-bounds-function (lambda () (bounds-of-thing-at-point 'symbol))
|
||||
"The function used select strings for inflections.
|
||||
|
||||
It should take no arguments and return a cons cell, the car of which should be
|
||||
the point in the current buffer of the beginning of the string, and the cdr the
|
||||
point in the current buffer of the end of the string."
|
||||
:group 'string-inflection
|
||||
:type 'function)
|
||||
|
||||
;; --------------------------------------------------------------------------------
|
||||
|
||||
;;;###autoload
|
||||
@@ -214,8 +223,8 @@ This can be `remain' – remain at the initial position but not beyond the end o
|
||||
(let ((orig-point (point)))
|
||||
(insert (funcall inflect-func (string-inflection-get-current-word)))
|
||||
(pcase string-inflection-final-position
|
||||
('remain (goto-char (min orig-point (cdr (bounds-of-thing-at-point 'symbol)))))
|
||||
('beginning (goto-char (car (bounds-of-thing-at-point 'symbol)))))))
|
||||
('remain (goto-char (min orig-point (cdr (funcall string-inflection-bounds-function)))))
|
||||
('beginning (goto-char (car (funcall string-inflection-bounds-function)))))))
|
||||
|
||||
(defun string-inflection--region (inflect-func)
|
||||
"Perform INFLECT-FUNC for all occurrences in the region."
|
||||
@@ -227,7 +236,7 @@ This can be `remain' – remain at the initial position but not beyond the end o
|
||||
(insert (funcall inflect-func (string-inflection-get-current-word-limited-by start end)))
|
||||
(setq end (+ end (- (length (symbol-name (symbol-at-point))) orig-length)))
|
||||
(forward-symbol 1)
|
||||
(if-let* ((bounds (bounds-of-thing-at-point 'symbol)))
|
||||
(if-let* ((bounds (funcall string-inflection-bounds-function)))
|
||||
(goto-char (car bounds)))))
|
||||
(let ((new-region
|
||||
(pcase string-inflection-final-position
|
||||
@@ -242,7 +251,7 @@ This can be `remain' – remain at the initial position but not beyond the end o
|
||||
(defun string-inflection-get-current-word ()
|
||||
"Gets the symbol near the cursor"
|
||||
(interactive)
|
||||
(if-let* ((bounds (bounds-of-thing-at-point 'symbol))
|
||||
(if-let* ((bounds (funcall string-inflection-bounds-function))
|
||||
(start (car bounds))
|
||||
(end (cdr bounds))
|
||||
(str (buffer-substring start end)))
|
||||
@@ -254,7 +263,7 @@ This can be `remain' – remain at the initial position but not beyond the end o
|
||||
(defun string-inflection-get-current-word-limited-by (reg-start reg-end)
|
||||
"Gets the symbol near the cursor limited by REG-START and REG-END."
|
||||
(interactive)
|
||||
(if-let* ((bounds (bounds-of-thing-at-point 'symbol))
|
||||
(if-let* ((bounds (funcall string-inflection-bounds-function))
|
||||
(start (max (car bounds) reg-start))
|
||||
(end (min (cdr bounds) reg-end))
|
||||
(str (buffer-substring start end)))
|
||||
|
||||
Reference in New Issue
Block a user