From aa559800214a0f932d77d0d3534bd77dd378e5e7 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 19 Mar 2020 17:32:09 -0700 Subject: emacs: move/delete some functions Some are moved to the libraries, some are deleted. --- emacs.d/custom/fcuny-defuns.el | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'emacs.d/custom') diff --git a/emacs.d/custom/fcuny-defuns.el b/emacs.d/custom/fcuny-defuns.el index 955650c..48a9d97 100644 --- a/emacs.d/custom/fcuny-defuns.el +++ b/emacs.d/custom/fcuny-defuns.el @@ -1,21 +1,3 @@ -(defun fcuny/rename-this-buffer-and-file () - "Renames current buffer and file it is visiting." - (interactive) - (let ((name (buffer-name)) - (filename (buffer-file-name)) - (read-file-name-function 'read-file-name-default)) - (if (not (and filename (file-exists-p filename))) - (error "Buffer '%s' is not visiting a file!" name) - (let ((new-name (read-file-name "New name: " filename))) - (cond ((get-buffer new-name) - (error "A buffer named '%s' already exists!" new-name)) - (t - (rename-file filename new-name 1) - (rename-buffer new-name) - (set-visited-file-name new-name) - (set-buffer-modified-p nil) - (message "File '%s' successfully renamed to '%s'" name (file-name-nondirectory new-name)))))))) - (defun fcuny/remove-mysql-columns () "Removes from text. This is useful when I want to drop the column separator from some text coming from a mysql query." (interactive) @@ -33,11 +15,6 @@ "Returns t if this is a work machine" (string-match "tw-mbp.*" (system-name))) -(defun fcuny/check-source-predicate-python-p () - (and (executable-find "check.pex") - (buffer-file-name) - (string-match "src/source/.*\.py$" (buffer-file-name)))) - (defun fcuny/build-python-checker () "Compiles a newer version of the checker for Python." (interactive) @@ -74,18 +51,5 @@ (decode-coding-string title 'utf-8)) (concat "[[" url "][" title "]]")))) -(defun fcuny/uniquify-region-lines (beg end) - "Remove duplicate adjacent lines in region." - (interactive "*r") - (save-excursion - (goto-char beg) - (while (re-search-forward "^\\(.*\n\\)\\1+" end t) - (replace-match "\\1")))) - -(defun fcuny/gocs () - """Custom function to research a term using go/cs" - (interactive) - (let ((text (read-string "Search for: " (thing-at-point 'word)))) - (browse-url (format "http://go/cs/%s" text)))) (provide 'fcuny-defuns) -- cgit 1.4.1