diff options
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/.emacs.d/init/ycp-prog.el | 2 | ||||
-rw-r--r-- | emacs/.emacs.d/init/ycp-web.el | 6 | ||||
-rw-r--r-- | emacs/.emacs.d/lisp/my/my-mariadb.el | 39 |
3 files changed, 46 insertions, 1 deletions
diff --git a/emacs/.emacs.d/init/ycp-prog.el b/emacs/.emacs.d/init/ycp-prog.el index 3f4369d..811a414 100644 --- a/emacs/.emacs.d/init/ycp-prog.el +++ b/emacs/.emacs.d/init/ycp-prog.el @@ -477,6 +477,8 @@ (define-key gud-mode-map (kbd "C-c C-z") 'my-gdb-mysql-parse-frame) (add-to-list 'grep-files-aliases '("mtr" . "*.inc *.test *.cnf *.result *.rdiff")) + (add-to-list 'grep-files-aliases + '("mtrt" . "*.inc *.test")) ) ;;; bison diff --git a/emacs/.emacs.d/init/ycp-web.el b/emacs/.emacs.d/init/ycp-web.el index b322aa0..2e56b19 100644 --- a/emacs/.emacs.d/init/ycp-web.el +++ b/emacs/.emacs.d/init/ycp-web.el @@ -86,7 +86,11 @@ (my-override org-jira--render-issue) (my-override org-jira-update-worklogs-from-org-clocks) (my-keybind org-jira-entry-mode-map "C-c ig" 'org-jira-get-issue) -) + ;; `org-jira-mode' displays many whitespace-only lines in comments + ;; it pulls. + (add-hook 'org-jira-mode-hook + (lambda () (setq show-trailing-whitespace nil))) + ) (my-package eww (:delay 60) diff --git a/emacs/.emacs.d/lisp/my/my-mariadb.el b/emacs/.emacs.d/lisp/my/my-mariadb.el index bd9fd76..355b89e 100644 --- a/emacs/.emacs.d/lisp/my/my-mariadb.el +++ b/emacs/.emacs.d/lisp/my/my-mariadb.el @@ -115,5 +115,44 @@ (goto-char old-frame) (gdb-select-frame))))) +(defun my-mdev-29502-seek-next () + (save-excursion + (while (re-search-forward "\\(\\ *\\)SPIDER_CLEAR_FILE_POS(&\\(.*\\)->mta_conn_mutex_file_pos); +\\ *pthread_mutex_unlock(&\\2->mta_conn_mutex);" nil t) + (replace-match "\\1spider_conn_mutex_unlock(\\2);"))) + (save-excursion + (while (re-search-forward "\\(\\ *\\)DBUG_ASSERT(!\\(.*\\)->mta_conn_mutex_lock_already); +\\ *DBUG_ASSERT(!\\2->mta_conn_mutex_unlock_later); +\\ *\\2->mta_conn_mutex_lock_already = TRUE; +\\ *\\2->mta_conn_mutex_unlock_later = TRUE;" nil t) + (replace-match "\\1spider_conn_mutex_locked(\\2);"))) + (save-excursion + (while (re-search-forward "\\(\\ *\\)DBUG_ASSERT(\\(.*\\)->mta_conn_mutex_lock_already); +\\ *DBUG_ASSERT(\\2->mta_conn_mutex_unlock_later); +\\ *\\2->mta_conn_mutex_lock_already = FALSE; +\\ *\\2->mta_conn_mutex_unlock_later = FALSE;" nil t) + (replace-match "\\1spider_conn_mutex_unlocking(\\2);"))) + (save-excursion + (while (re-search-forward "\\(\\ *\\)pthread_mutex_lock(&\\(.*\\)->mta_conn_mutex); +\\ *SPIDER_SET_FILE_POS(&\\2->mta_conn_mutex_file_pos);" nil t) + (replace-match "\\1spider_conn_mutex_lock(\\2);"))) + ) + +(defun my-mdev-29502-need-lock () + (save-excursion + (while (re-search-forward "\\(\\ *\\)if ([^!].*need_lock_before_set_sql_for_exec(.*" nil t) + (beginning-of-line) + (kill-sexp 3) + (kill-line))) + (save-excursion + (while (re-search-forward "\\(\\ *\\)if (!.*need_lock_before_set_sql_for_exec(.*" nil t) + (beginning-of-line) + (kill-sexp 2) + (kill-line 2) + (c-indent-line-or-region) + (beginning-of-line 3) + (kill-line 1) + ))) + (provide 'my-mariadb) ;;; my-mariadb.el ends here |