Function: makefile-beginning-of-command

makefile-beginning-of-command is an interactive and byte-compiled function defined in makefile-edit.el.gz.

Signature

(makefile-beginning-of-command)

Documentation

Move to the beginning of the current command.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/ede/makefile-edit.el.gz
;;; makefile-edit.el --- Makefile editing/scanning commands.  -*- lexical-binding: t; -*-

;; Copyright (C) 2009-2025 Free Software Foundation, Inc.

;; Author: Eric M. Ludlam <zappo@gnu.org>

;; This file is part of GNU Emacs.

;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:
;;
;; Utilities for editing a Makefile for EDE Makefile management commands.
;;
;; Derived from project-am.el.
;;
;; Makefile editing and scanning commands
;;
;; Formatting of a makefile
;;
;; 1) Creating an automakefile, stick in a top level comment about
;;    being created by Emacs.
;; 2) Leave order of variable contents alone, except for SOURCE
;;    SOURCE always keep in the order of .c, .h, the other stuff.

;;; Things to do
;; makefile-fill-paragraph -- refill a macro with backslashes
;; makefile-insert-macro -- insert "foo = "


;;; Code:

(defun makefile-beginning-of-command ()
  "Move to the beginning of the current command."
  (interactive)
  (if (save-excursion
	(forward-line -1)
	(makefile-line-continued-p))
      (forward-line -1))
  (beginning-of-line)
  (if (not (makefile-line-continued-p))
      nil
    (while (and (makefile-line-continued-p)
		(not (bobp)))
      (forward-line -1))
    (forward-line 1)))