517 |
(setq field-list (cdr field-list)))) |
(setq field-list (cdr field-list)))) |
518 |
(gnats-clear-edit-buffer) |
(gnats-clear-edit-buffer) |
519 |
(gnats-get-pr (get gnats-server-conn 'pr-number)) |
(gnats-get-pr (get gnats-server-conn 'pr-number)) |
520 |
(gnats-edit-mode))) |
(gnats-edit-mode t))) |
521 |
|
|
522 |
(defun gnats-apply-or-submit () |
(defun gnats-apply-or-submit () |
523 |
"If in edit mode apply the current set of changes, or submit the new PR." |
"If in edit mode apply the current set of changes, or submit the new PR." |
703 |
(defvar gnats-edit-mode-hook nil |
(defvar gnats-edit-mode-hook nil |
704 |
"Hook run by `gnats-edit-mode'.") |
"Hook run by `gnats-edit-mode'.") |
705 |
|
|
706 |
(defun gnats-edit-mode () |
(defun gnats-edit-mode (&optional quietp) |
707 |
"Major mode for editing PRs. |
"Major mode for editing PRs. |
708 |
Press \\[gnats-apply-or-submit] to submit your changes." |
Press \\[gnats-apply-or-submit] to submit your changes." |
709 |
;; Should we be doing this here? By the time the mode is specified |
;; Should we be doing this here? By the time the mode is specified |
725 |
(make-local-variable 'after-change-functions) |
(make-local-variable 'after-change-functions) |
726 |
(setq after-change-functions |
(setq after-change-functions |
727 |
(cons 'gnats-extend-properties after-change-functions)) |
(cons 'gnats-extend-properties after-change-functions)) |
728 |
(message "Press `C-c C-c' to submit your changes.") |
(unless quietp |
729 |
|
(message "Press `C-c C-c' to submit your changes.")) |
730 |
(run-hooks 'gnats-edit-mode-hook)) |
(run-hooks 'gnats-edit-mode-hook)) |
731 |
(put 'gnats-edit-mode 'mode-class 'special) |
(put 'gnats-edit-mode 'mode-class 'special) |
732 |
|
|
1617 |
(goto-char (point-min)))))) |
(goto-char (point-min)))))) |
1618 |
|
|
1619 |
;;;###autoload |
;;;###autoload |
1620 |
|
(defun unlock-database () |
1621 |
|
"Unlock the whole database." |
1622 |
|
(interactive) |
1623 |
|
(gnats-send-command "UNDB")) |
1624 |
|
|
1625 |
|
;;;###autoload |
1626 |
(defun unlock-pr (pr) |
(defun unlock-pr (pr) |
1627 |
"Unlock the problem report PR." |
"Unlock the problem report PR." |
1628 |
(interactive "nPR Number: ") |
(interactive "sPR Number: ") |
1629 |
(gnats-send-command "UNLK" pr)) |
(gnats-send-command "UNLK" pr)) |
1630 |
|
|
1631 |
(defun gnats-change-database (database host port user) |
(defun gnats-change-database (database host port user) |
1641 |
gnats-port port |
gnats-port port |
1642 |
gnats-user user)) |
gnats-user user)) |
1643 |
|
|
1644 |
|
(defun gnats-show-connection () |
1645 |
|
"Show the server connection buffer associated with the current buffer. |
1646 |
|
You can use this function to view the communication with gnatsd in case of |
1647 |
|
problems." |
1648 |
|
(interactive) |
1649 |
|
(let ((buffer (get gnats-server-conn 'server-buffer))) |
1650 |
|
(if buffer |
1651 |
|
(switch-to-buffer buffer) |
1652 |
|
(error "No connection associated with this buffer")))) |
1653 |
|
|
1654 |
|
|
1655 |
|
|
1656 |
|
|
1657 |
(defvar gnats-dbconfig-mode-map nil |
(defvar gnats-dbconfig-mode-map nil |